html.zsd-dialog-open { overflow: hidden; }
.zsd-modal {
    box-sizing: border-box;
    width: 368px;
    max-width: calc(100% - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 22px;
    overflow: auto;
    border: 1px solid var(--muted-border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--main-bg-color, #fff);
    color: var(--main-color, #272b30);
    box-shadow: 0 16px 64px #0003;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0;
}
.zsd-modal::backdrop { background: #0007; }
.zsd-modal [hidden] { display: none !important; }
.zsd-heading { display: flex; align-items: center; gap: 10px; }
.zsd-heading-icon { color: var(--focus-color, #287cdb); font-size: 22px; }
.zsd-heading h2 { flex: 1; min-width: 0; margin: 0; font-size: 19px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.zsd-icon-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--muted-color, #727980);
    font: inherit;
    cursor: pointer;
}
.zsd-icon-button:hover { background: var(--muted-bg-color, #f1f3f5); color: var(--focus-color, #287cdb); }
.zsd-icon-button:focus-visible { outline: 2px solid var(--focus-color, #287cdb); outline-offset: 2px; }
.zsd-icon-button:disabled { opacity: .45; cursor: wait; }
.zsd-resource { margin: 12px 0 18px; color: var(--muted-color, #727980); text-align: center; overflow-wrap: anywhere; }
.zsd-qr {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 256px;
    max-width: 100%;
    aspect-ratio: 1;
    margin: 0 auto;
    padding: 16px;
    border-radius: 4px;
    background: #fff;
    color: #727980;
}
.zsd-qr img { display: block; width: 100%; height: auto; max-width: 224px; aspect-ratio: 1; }
.zsd-qr > span { font-size: 24px; }
.zsd-message { min-height: 21px; margin: 10px 0 0; text-align: center; overflow-wrap: anywhere; color: var(--muted-color, #727980); }
.zsd-error { color: #d44444; }
.dark-theme .zsd-error { color: #ff8b8b; }
.zsd-ripro { --focus-color: var(--primary-color, var(--primary, #287cdb)); }
.dark-open .zsd-ripro {
    --main-bg-color: #293042;
    --main-color: #c6cfd8;
    --muted-color: #adb5bd;
    --muted-border-color: #3a4258;
    --muted-bg-color: #3a4258;
}
.dark-open .zsd-ripro .zsd-error { color: #ff8b8b; }
.zsd-note { margin: 8px 0; text-align: center; color: var(--muted-color, #727980); overflow-wrap: anywhere; }
.zsd-code { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-top: 1px solid var(--muted-border-color, #e5e7eb); }
.zsd-code > span { color: var(--muted-color, #727980); overflow-wrap: anywhere; }
.zsd-code strong { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.zsd-footer { display: flex; justify-content: center; margin-top: 12px; }
.zsd-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 100%;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--muted-border-color, #e5e7eb);
    border-radius: 4px;
    background: var(--muted-bg-color, #f1f3f5);
    color: var(--main-color, #272b30);
    font: inherit;
    line-height: 1.4;
    text-decoration: none;
    overflow-wrap: anywhere;
    cursor: pointer;
}
.zsd-action-button:hover { color: var(--focus-color, #287cdb); }
.zsd-action-button:focus-visible { outline: 2px solid var(--focus-color, #287cdb); outline-offset: 2px; }
.zsd-action-button:disabled { opacity: .45; cursor: wait; }
.zsd-copy-input { position: fixed; opacity: 0; width: 1px; height: 1px; padding: 0; }
@media (max-height: 520px) {
    .zsd-modal { padding: 14px 20px; }
    .zsd-qr { width: 180px; padding: 12px; }
    .zsd-resource { margin: 8px 0; }
    .zsd-message { margin-top: 6px; }
}
