
  .jkh-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 480px;
    margin: 0 auto;
    padding: 15px 12px 23px;
    color: #1e293b;
  }
  .jkh-widget .logo-block {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    margin-bottom: 5px;
  }
  .jkh-widget .logo-icon {
    font-size: 36px;
    line-height: 1;
  }
  .jkh-widget h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
  }
  .jkh-widget .jkh-subtitle {
    text-align: left;
    color: #64748b;
    font-size: 11px;
    margin: 6px 0 18px 0;
  }
  .jkh-widget .topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
  }
  .jkh-widget .topic-card {
    flex: 1 1 calc(50% - 8px);
    min-width: 105px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 11px 8px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
  }
  .jkh-widget .topic-card.active {
    background: #0f172a;
    color: white;
    border-color: #0f172a;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.2);
  }
  .jkh-widget .topic-card .topic-text {
    display: flex;
    flex-direction: column;
  }
  .jkh-widget .topic-card .topic-title {
    font-size: 11px;
    font-weight: 600;
  }
  .jkh-widget .topic-card .topic-desc {
    font-size: 8px;
    font-weight: 400;
    opacity: 0.7;
    margin-top: 2px;
  }
  .jkh-widget .topic-icon {
    font-size: 26px;
    line-height: 1;
    display: inline-block;
    width: 1.2em;
    text-align: center;
    flex-shrink: 0;
  }
  .jkh-widget .form-panel {
    background: #ffffff;
    border-radius: 15px;
    padding: 15px 12px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.06);
    margin-bottom: 15px;
  }
  .jkh-widget .form-panel h3 {
    margin: 0 0 12px;
    font-size: 14px;
    text-align: left;
  }
  .jkh-widget .form-group {
    margin-bottom: 11px;
  }
  .jkh-widget .form-group label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 3px;
    color: #334155;
  }
  .jkh-widget .form-group input,
  .jkh-widget .form-group textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    font-size: 11px;
    background: #f8fafc;
    box-sizing: border-box;
  }
  .jkh-widget .form-group input:focus,
  .jkh-widget .form-group textarea:focus {
    outline: none;
    border-color: #0f172a;
    background: #fff;
  }
  .jkh-widget input:not(:placeholder-shown):not(.error),
  .jkh-widget textarea:not(:placeholder-shown):not(.error) {
    background: #e0f2fe;
    border-color: #0ea5e9;
  }
  .jkh-widget input.error,
  .jkh-widget textarea.error {
    background: #fff;
    border-color: #ef4444 !important;
  }
  .jkh-widget .form-group textarea {
    resize: vertical;
    min-height: 68px;
  }
  .jkh-widget .address-street-row {
    margin-bottom: 5px;
  }
  .jkh-widget .address-street-row input {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    font-size: 11px;
    background: #f8fafc;
    box-sizing: border-box;
  }
  .jkh-widget .address-details-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    overflow-x: auto;
  }
  .jkh-widget .detail-wrapper {
    position: relative;
    flex: 1 1 0;
    min-width: 30px;
  }
  .jkh-widget .detail-wrapper input {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    font-size: 9px;
    background: #f8fafc;
    box-sizing: border-box;
    text-align: left;
  }
  .jkh-widget .detail-wrapper input:focus {
    outline: none;
    border-color: #0f172a;
    background: #fff;
  }
  .jkh-widget .error-icon {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #ef4444;
    display: none;
    pointer-events: none;
  }
  .jkh-widget .detail-wrapper input.error ~ .error-icon {
    display: block;
  }
  .jkh-widget .field-error-msg {
    font-size: 9px;
    color: #ef4444;
    margin-top: 3px;
    display: none;
    align-items: center;
    gap: 3px;
  }
  .jkh-widget .field-error-msg.visible {
    display: flex;
  }
  .jkh-widget .radio-group {
    margin-bottom: 11px;
  }
  .jkh-widget .radio-group label.main-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
  }
  .jkh-widget .radio-options {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
    flex-wrap: wrap;
  }
  .jkh-widget .radio-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
  }
  .jkh-widget #contactField {
    display: none;
  }
  .jkh-widget .file-upload {
    margin-bottom: 12px;
  }
  .jkh-widget .file-upload label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #334155;
  }
  .jkh-widget .file-upload input[type="file"] {
    display: none;
  }
  .jkh-widget .file-upload .upload-btn {
    display: inline-block;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 9px;
    padding: 8px 14px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
    color: #334155;
  }
  .jkh-widget .file-upload .upload-btn:hover {
    background: #e2e8f0;
  }
  .jkh-widget .file-list {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
  }
  .jkh-widget .file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 9px;
    margin-bottom: 3px;
    font-size: 10px;
  }
  .jkh-widget .file-list li .remove-file {
    cursor: pointer;
    color: #ef4444;
    font-weight: bold;
    margin-left: 8px;
  }
  .jkh-widget .submit-btn {
    width: 100%;
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 11px;
    padding: 11px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
  }
  .jkh-widget .submit-btn:hover {
    background: #1e293b;
  }
  .jkh-widget .form-note {
    font-size: 9px;
    color: #94a3b8;
    margin-top: 8px;
    text-align: center;
  }
  .jkh-widget .error-msg {
    color: #ef4444;
    font-size: 10px;
    margin-top: 3px;
    display: none;
  }
  .jkh-widget .contacts-block {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    text-align: left;
    font-size: 10px;
    line-height: 1.5;
    color: #334155;
  }
  .jkh-widget .contacts-block h4 {
    margin: 0 0 8px 0;
    font-size: 11px;
    font-weight: 600;
  }
  .jkh-widget .contacts-block p {
    margin: 3px 0;
  }
  .jkh-widget .contacts-block a {
    color: #0f172a;
    text-decoration: none;
    font-weight: 500;
  }
  .jkh-widget .hidden-iframe {
    position: absolute;
    width: 0;
    height: 0;
    border: 0;
    visibility: hidden;
  }

  /* ——— Кнопки-иконки мессенджеров (слева, 40px) ——— */
  .jkh-widget .messenger-icons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    margin: 12px 0 14px;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
  }
  .jkh-widget .msg-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
  }
  .jkh-widget .msg-icon:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  }
  .jkh-widget .msg-icon:active {
    transform: scale(0.95);
  }
  .jkh-widget .msg-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
  }
  .jkh-widget .msg-icon.phone { background: #0f172a; }
  .jkh-widget .msg-icon.max   { background: transparent; overflow: hidden; }
  .jkh-widget .msg-icon.email { background: #ea4335; }

/* Изоляция виджета и повышение доступности */
.jkh-widget, .jkh-widget * { box-sizing: border-box; }
.jkh-widget { width: 100%; min-width: 0; }
.jkh-widget .topic-card { font-family: inherit; color: inherit; appearance: none; }
.jkh-widget .topic-card.active { color: #fff; }
.jkh-widget .topic-card:focus-visible, .jkh-widget .msg-icon:focus-visible,
.jkh-widget .upload-btn:focus-visible, .jkh-widget .submit-btn:focus-visible { outline: 3px solid #0284c7; outline-offset: 3px; }
.jkh-widget .detail-wrapper { min-width: 0; }
.jkh-widget .address-details-row { flex-wrap: wrap; overflow: visible; }
.jkh-widget .detail-wrapper { flex: 1 1 70px; }
.jkh-widget .detail-wrapper input { min-height: 35px; }
.jkh-widget .form-status { margin-top: 12px; padding: 10px; border-radius: 8px; font-size: 12px; display: none; }
.jkh-widget .form-status.show { display: block; }
.jkh-widget .form-status.success { background: #ecfdf5; color: #065f46; }
.jkh-widget .form-status.failure { background: #fef2f2; color: #991b1b; }
.jkh-widget .form-status.pending { background: #eff6ff; color: #1d4ed8; }
.jkh-widget .submit-btn:disabled { opacity: .65; cursor: wait; }
.jkh-widget .file-list li { min-width: 0; gap: 8px; }
.jkh-widget .file-list .file-name { overflow-wrap: anywhere; }
.jkh-widget .file-list .remove-file { background: transparent; border: 0; font-size: 17px; cursor: pointer; color: #b91c1c; }
.jkh-widget .form-group textarea.error, .jkh-widget .form-group input.error { border-color: #ef4444 !important; }
.jkh-widget .field-error-msg { margin-top: 4px; }
.jkh-widget #fileInput { position: absolute; width: 1px; height: 1px; opacity: 0; clip-path: inset(50%); }
.jkh-widget .upload-btn { display: inline-flex; align-items: center; }
.jkh-widget .msg-icon svg { display: block; }
.jkh-widget .form-panel h3 { line-height: 1.4; }
@media(max-width: 380px) { .jkh-widget .messenger-icons { gap: 8px; } .jkh-widget .msg-icon { width: 40px; height: 40px; } }
@media(max-width: 320px) { .jkh-widget .topic-card { flex-basis: 100%; } }
.jkh-widget .topic-card[data-topic="other"] { flex-basis: 100%; }
.jkh-widget .topic-desc { font-size: 10px; }
.jkh-widget .topic-title { font-size: 12px; }
.jkh-widget .form-group label, .jkh-widget .file-upload label, .jkh-widget .radio-group label.main-label { font-size: 11px; }
.jkh-widget .form-group input, .jkh-widget .form-group textarea,
.jkh-widget .address-street-row input, .jkh-widget .detail-wrapper input { font-size: 12px; }
.jkh-widget .detail-wrapper input { padding-left: 7px; padding-right: 6px; }
.jkh-widget .form-note { font-size: 10px; }

/* Контакты: данные слева, портрет справа; фотография всегда 2:3 */
.jkh-widget .contacts-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(78px, 22%, 104px);
  align-items: start;
  column-gap: 12px;
}
.jkh-widget .contacts-intro-text { min-width: 0; }
.jkh-widget .contacts-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .12);
}
/* Все пять иконок рядом с именем, слева от портрета — без переноса. */
.jkh-widget .contacts-intro-text > .messenger-icons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-content: start;
  align-items: center;
  gap: clamp(3px, 1vw, 8px);
  margin: 12px 0 4px;
  max-width: 252px;
  min-width: 0;
  width: 100%;
}
.jkh-widget .contacts-intro-text > .messenger-icons .msg-icon {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  min-width: 0;
  max-width: 44px;
  justify-self: start;
  flex: none;
}
.jkh-widget .contacts-intro-text > .messenger-icons .msg-icon svg {
  width: 56%;
  height: 56%;
}
@media (max-width: 380px) {
  .jkh-widget .contacts-intro { column-gap: 10px; }
}

/* Официальный значок MAX: используем исходный логотип, а не букву «M». */
.jkh-widget .msg-icon.max img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}
/* Номера ОДС: первая строка целиком, вторая выровнена по правому краю первой. */
.jkh-widget .ods-contacts {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 100%;
  margin: 8px 0 6px;
  font-size: 1em;
  line-height: 1.55;
}
.jkh-widget .ods-line {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0 0.45em;
}
.jkh-widget .ods-line-secondary {
  justify-content: flex-end;
}
.jkh-widget .ods-phone {
  white-space: nowrap;
}
.jkh-widget .ods-contacts a {
  color: #0765af;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 360px) {
  .jkh-widget .ods-contacts { font-size: 10px; }
  .jkh-widget .ods-line { column-gap: 0.3em; }
}
