.knowledge-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 27, 38, 0.58);
}

.knowledge-guide-overlay,
.knowledge-guide-overlay * {
    box-sizing: border-box;
}

.knowledge-guide-dialog {
    position: relative;
    width: min(440px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 24px;
    border: 1px solid #dfe4ec;
    border-radius: 6px;
    background: #fff;
    color: #202938;
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.2);
}

.knowledge-guide-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #667085;
    font-size: 26px;
    line-height: 36px;
}

.knowledge-guide-dialog[dir="rtl"] .knowledge-guide-close {
    right: auto;
    left: 10px;
}

.knowledge-guide-dialog[dir="rtl"] .knowledge-guide-title {
    margin-right: 0;
    margin-left: 32px;
}

.knowledge-guide-title {
    margin: 0 32px 10px 0;
    color: #172033;
    font-size: 20px;
    line-height: 1.4;
}

.knowledge-guide-message {
    margin: 0;
    color: #536174;
    font-size: 14px;
    line-height: 1.7;
}

.knowledge-guide-qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #e4e9f0;
    background: #f8fafc;
}

.knowledge-guide-qr-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-bottom: 16px;
    border: 1px solid #cfd7e3;
    border-radius: 4px;
    overflow: hidden;
}

.knowledge-guide-qr-mode {
    min-height: 38px;
    padding: 7px 10px;
    border: 0;
    border-right: 1px solid #cfd7e3;
    background: #fff;
    color: #475467;
    font-size: 13px;
    font-weight: 600;
}

.knowledge-guide-qr-mode:last-child {
    border-right: 0;
}

.knowledge-guide-qr-mode[aria-pressed="true"] {
    background: #0665d0;
    color: #fff;
}

.knowledge-guide-qr-mode:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid #8bbcf2;
    outline-offset: -2px;
}

.knowledge-guide-qr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.knowledge-guide-qr {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
}

.knowledge-guide-qr-label,
.knowledge-guide-qr-unavailable {
    margin: 10px 0 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.knowledge-guide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.knowledge-guide-button {
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #cfd7e3;
    border-radius: 4px;
    background: #fff;
    color: #344054;
    font-size: 14px;
    font-weight: 600;
}

.knowledge-guide-button:hover,
.knowledge-guide-button:focus {
    border-color: #7aaef0;
    outline: 2px solid #8bbcf2;
    outline-offset: 2px;
    color: #054d9e;
}

.knowledge-guide-button-primary {
    border-color: #0665d0;
    background: #0665d0;
    color: #fff;
}

.knowledge-guide-button-primary:hover,
.knowledge-guide-button-primary:focus {
    border-color: #054d9e;
    background: #054d9e;
    color: #fff;
}

.knowledge-guide-copy-input {
    position: fixed;
    left: -10000px;
    top: 0;
}

.knowledge-guide-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

iframe[src^="https://js.jiesuo.one/s/"] {
    display: block;
    width: 100%;
    height: 700px !important;
    border: 0;
}

div:has(> iframe[src^="https://js.jiesuo.one/s/"]) {
    height: 700px !important;
}

@media (max-width: 480px) {
    iframe[src^="https://js.jiesuo.one/s/"],
    div:has(> iframe[src^="https://js.jiesuo.one/s/"]) {
        height: 760px !important;
    }

    .knowledge-guide-dialog {
        padding: 20px;
    }

    .knowledge-guide-actions,
    .knowledge-guide-button {
        width: 100%;
    }
}
