body.xdao-share-open {
    overflow: hidden !important;
}

.xdao-share-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483200;
    display: none;
    place-items: center;
    padding: 18px;
    background: rgba(5, 7, 12, 0.86);
    backdrop-filter: blur(14px);
}

.xdao-share-overlay.is-open {
    display: grid;
}

.xdao-share-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(1240px, 100%);
    height: min(900px, calc(100dvh - 36px));
    max-height: calc(100dvh - 36px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    color: #f8fafc;
    background: #0c1018;
    box-shadow: 0 34px 120px rgba(0, 0, 0, 0.52);
}

.xdao-share-header,
.xdao-share-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.035);
}

.xdao-share-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.xdao-share-footer {
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.xdao-share-footer .is-community {
    margin-right: auto;
}

.xdao-share-title strong,
.xdao-share-title span {
    display: block;
}

.xdao-share-title strong {
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.xdao-share-title span {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.57);
    font-size: 0.74rem;
}

.xdao-share-body {
    min-height: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 2%, rgba(230, 106, 71, 0.13), transparent 30%),
        #090c12;
}

.xdao-share-workspace {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    min-height: 0;
    height: 100%;
}

.xdao-share-settings {
    min-width: 0;
    overflow: auto;
    padding: 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.025);
    scrollbar-width: thin;
}

.xdao-share-local-note {
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
    padding: 12px 13px;
    border: 1px solid rgba(87, 223, 168, 0.22);
    border-radius: 14px;
    background: rgba(87, 223, 168, 0.07);
}

.xdao-share-local-note strong {
    color: #79e7b9;
    font-size: 0.78rem;
}

.xdao-share-local-note span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.7rem;
    line-height: 1.5;
}

.xdao-share-fieldset {
    min-width: 0;
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.035);
}

.xdao-share-fieldset:last-child {
    margin-bottom: 0;
}

.xdao-share-fieldset legend {
    padding: 0 7px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.76rem;
    font-weight: 850;
}

.xdao-share-style-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.xdao-share-style-choice {
    position: relative;
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.xdao-share-style-choice:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.22);
}

.xdao-share-style-choice:has(input:checked) {
    border-color: rgba(240, 195, 108, 0.72);
    background: rgba(240, 195, 108, 0.09);
    box-shadow: 0 0 0 2px rgba(240, 195, 108, 0.08);
}

.xdao-share-style-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.xdao-share-style-choice > span:last-child {
    min-width: 0;
}

.xdao-share-style-choice strong,
.xdao-share-style-choice small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xdao-share-style-choice strong {
    color: #fff;
    font-size: 0.68rem;
}

.xdao-share-style-choice small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.47);
    font-size: 0.59rem;
}

.xdao-share-style-swatch {
    display: block;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 9px;
}

.xdao-share-style-swatch.is-obsidian {
    background:
        radial-gradient(circle at 78% 20%, rgba(240, 195, 108, 0.75), transparent 28%),
        linear-gradient(135deg, #080b12, #24190f);
}

.xdao-share-style-swatch.is-ember {
    background:
        radial-gradient(circle at 76% 24%, rgba(255, 180, 94, 0.74), transparent 27%),
        linear-gradient(135deg, #170c0c, #f05b37);
}

.xdao-share-style-swatch.is-aurora {
    background:
        radial-gradient(circle at 76% 22%, rgba(113, 219, 255, 0.80), transparent 28%),
        linear-gradient(135deg, #071321, #392e82);
}

.xdao-share-control,
.xdao-share-range-field {
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
}

.xdao-share-control:last-child,
.xdao-share-range-field:last-child {
    margin-bottom: 0;
}

.xdao-share-control > span,
.xdao-share-range-field > span {
    color: rgba(255, 255, 255, 0.71);
    font-size: 0.7rem;
    font-weight: 760;
}

.xdao-share-control > span small {
    color: rgba(255, 255, 255, 0.40);
    font-size: 0.62rem;
}

.xdao-share-control input,
.xdao-share-control select {
    width: 100%;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    outline: 0;
    color: #f8fafc;
    background: #111721;
    font: inherit;
    font-size: 0.74rem;
}

.xdao-share-control select {
    color-scheme: dark;
}

.xdao-share-control input::placeholder {
    color: rgba(255, 255, 255, 0.30);
}

.xdao-share-control input:focus,
.xdao-share-control select:focus {
    border-color: rgba(230, 106, 71, 0.72);
    box-shadow: 0 0 0 3px rgba(230, 106, 71, 0.12);
}

.xdao-share-range-field > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.xdao-share-range-field output {
    color: #f0c36c;
    font-size: 0.82rem;
    font-weight: 900;
}

.xdao-share-range-field input {
    width: 100%;
    accent-color: #e66a47;
    cursor: pointer;
}

.xdao-share-range-field small {
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.63rem;
}

.xdao-share-switch-field {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-top: 14px;
    cursor: pointer;
}

.xdao-share-switch-field input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.xdao-share-switch-ui {
    position: relative;
    width: 42px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    transition: background 160ms ease, border-color 160ms ease;
}

.xdao-share-switch-ui::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.36);
    content: "";
    transition: transform 160ms ease;
}

.xdao-share-switch-field input:checked + .xdao-share-switch-ui {
    border-color: #e66a47;
    background: #e66a47;
}

.xdao-share-switch-field input:checked + .xdao-share-switch-ui::after {
    transform: translateX(18px);
}

.xdao-share-switch-field > span:last-child strong,
.xdao-share-switch-field > span:last-child small {
    display: block;
}

.xdao-share-switch-field > span:last-child strong {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.7rem;
}

.xdao-share-switch-field > span:last-child small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.43);
    font-size: 0.61rem;
}

.xdao-share-style-choice:focus-within,
.xdao-share-switch-field:focus-within .xdao-share-switch-ui {
    outline: 3px solid rgba(230, 106, 71, 0.42);
    outline-offset: 2px;
}

.xdao-share-preview {
    min-width: 0;
    overflow: auto;
    padding: 18px 24px 24px;
    scrollbar-width: thin;
}

.xdao-share-preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(100%, 430px);
    margin: 0 auto 12px;
}

.xdao-share-preview-heading strong,
.xdao-share-preview-heading span {
    display: block;
}

.xdao-share-preview-heading strong {
    font-size: 0.8rem;
}

.xdao-share-preview-heading div > span {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.64rem;
}

.xdao-share-preview-size {
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.62rem;
    white-space: nowrap;
}

.xdao-share-canvas-wrap {
    position: relative;
    width: min(100%, 430px);
    margin: 0 auto;
}

#xdaoShareCanvas {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    background: #11141d;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
}

.xdao-share-status {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    padding: 30px;
    border-radius: 18px;
    color: #fff;
    background: rgba(12, 16, 24, 0.86);
    font-weight: 800;
    text-align: center;
}

.xdao-share-status.is-visible {
    display: grid;
}

.xdao-share-close,
.xdao-share-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.xdao-share-close {
    flex: 0 0 auto;
}

.xdao-share-action.is-primary {
    border-color: transparent;
    background: linear-gradient(135deg, #e66a47, #bd492f);
    box-shadow: 0 10px 24px rgba(230, 106, 71, 0.22);
}

.xdao-share-action.is-community {
    color: #2d2413;
    border-color: rgba(244, 211, 126, 0.68);
    background: linear-gradient(135deg, #fff2bd, #d7a942);
}

.xdao-share-close:hover,
.xdao-share-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.xdao-share-close:focus-visible,
.xdao-share-action:focus-visible {
    outline: 3px solid rgba(230, 106, 71, 0.52);
    outline-offset: 3px;
}

.xdao-share-action:disabled {
    opacity: 0.54;
    cursor: wait;
    transform: none;
}

@media (max-width: 980px) {
    .xdao-share-body {
        overflow: auto;
    }

    .xdao-share-workspace {
        display: block;
        height: auto;
    }

    .xdao-share-settings {
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    }

    .xdao-share-preview {
        overflow: visible;
    }

    .xdao-share-canvas-wrap,
    .xdao-share-preview-heading {
        width: min(100%, 440px);
    }
}

@media (max-width: 700px) {
    .xdao-share-overlay {
        align-items: stretch;
        padding: 0;
    }

    .xdao-share-dialog {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .xdao-share-header,
    .xdao-share-footer {
        padding-right: max(12px, env(safe-area-inset-right));
        padding-left: max(12px, env(safe-area-inset-left));
    }

    .xdao-share-header {
        padding-top: max(12px, env(safe-area-inset-top));
        padding-bottom: 12px;
    }

    .xdao-share-title span {
        max-width: 270px;
    }

    .xdao-share-settings {
        padding: 14px;
    }

    .xdao-share-preview {
        padding: 16px 14px 22px;
    }

    .xdao-share-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-top: 12px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .xdao-share-footer {
        display: grid;
    }

    .xdao-share-footer .is-community {
        margin-right: 0;
    }

    .xdao-share-action {
        min-width: 0;
        padding: 0 9px;
    }

    .xdao-share-footer .xdao-share-action.is-primary {
        grid-column: 1 / -1;
    }
}

@media (max-width: 420px) {
    .xdao-share-style-grid {
        grid-template-columns: 1fr;
    }

    .xdao-share-style-choice {
        grid-template-columns: 74px minmax(0, 1fr);
        align-items: center;
    }

    .xdao-share-style-swatch {
        height: 42px;
    }
}
