a {
    color: var(--text-color);
}

.container {
    width: 80%;
    max-width: 1300px;
    margin: 0 auto;
    margin-bottom: 100px;
    position: relative;
    z-index: 1;
}

.container>div:last-child {
    margin-bottom: 0;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-5);
    padding: var(--space-5) 0;
}

.header h1 {
    font-size: var(--font-size-display);
    margin: 0 0 0 var(--rounded-title-inset);
}

.header h1 a {
    color: inherit;
    text-decoration: none;
    background-image: var(--heading-text-gradient);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

.nav {
    display: flex;
    gap: var(--space-5);
    margin-right: var(--rounded-title-inset);
}

.nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background-image: var(--heading-text-gradient);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    transition: transform var(--nav-transition-time) var(--transition-function);
}

.nav a:hover {
    transform: scale(var(--nav-scale-hover));
}


.section {
    --reveal-surface-radius: var(--reveal-outline-radius-section);
    border-radius: var(--section-rounding);
    padding: var(--section-padding);
    margin-bottom: calc(var(--space-5) * 2);
}

.product-page-section {
    container-type: inline-size;
}

.section h2 {
    font-size: var(--font-size-xlarge);
    margin: var(--title-optical-trim-start) 0 var(--space-5) var(--section-title-inset);
    padding: 0;
    display: block;
}

.success-section h2 {
    color: var(--buy-color);
}

.success-section {
    --reveal-outline-rgb: 39, 174, 96;
    --reveal-baseline: 0.16;
}

.error-section h2 {
    color: var(--error-color);
}

.error-section {
    --reveal-outline-rgb: 220, 53, 69;
    --reveal-baseline: 0.18;
}

.warning-section h2 {
    color: var(--warning-color);
}

.warning-section {
    --reveal-outline-rgb: 243, 156, 18;
    --reveal-baseline: 0.18;
}

.section>p,
.section>h3,
.section>ul {
    margin-left: 0;
}

.section .product {
    margin-bottom: var(--space-5);
}

.section .product:last-child {
    margin-bottom: 0;
}

.product {
    position: relative;
    display: flex;
    flex-direction: column;
    --reveal-surface-radius: var(--reveal-outline-radius-item);
    border-radius: var(--item-rounding);
    overflow: hidden;
    padding: 0;
    height: auto;
}

.product-content {
    display: flex;
    flex-grow: 1;
    min-width: 0;
}

.product img {
    width: 255px;
    height: 100%;
    border-right: 1px solid var(--border-color);
    object-fit: cover;
    border-top-left-radius: var(--item-rounding);
    border-bottom-left-radius: var(--item-rounding);
    box-sizing: border-box;
}

.product img.rounded-bottom-right {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: var(--item-rounding);
}

.product img.rounded-mobile {
    border-top-left-radius: var(--item-rounding);
    border-top-right-radius: var(--item-rounding);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}


h3 {
    font-size: var(--font-size-xlarge);
    margin: 0;
    padding: 0;
}

.product-details h3 {
    margin: var(--title-optical-trim-start) 0 0;
    letter-spacing: 0;
    font-family: "Google Sans Flex", Arial, sans-serif;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    line-height: 1.55;
}

p,
li {
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-light);
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.product-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
    padding: var(--card-padding);
}

.product-details h2 {
    letter-spacing: 0;
    font-family: "Google Sans Flex", Arial, sans-serif;
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-semibold);
    line-height: 1.25;
    margin: var(--title-optical-trim-start) 0 0;
    padding: 0;
    display: block;
    text-transform: none;
}

.product-details p {
    font-family: "Google Sans Flex", Arial, sans-serif;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-light);
    line-height: 1.72;
    margin: 0;
    color: var(--text-alpha-75);
}

.product-details-no-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: 0;
}

.store-sections {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    margin-top: 0;
    margin-bottom: 0;
}

.store-sections .product {
    flex: 1;
    margin-bottom: 0;
    min-width: 0;
}

.product-page-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-5);
    align-items: stretch;
}

.product-page-grid+.product {
    margin-top: var(--space-5);
}

.product-page-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    flex: 1 2 32rem;
    min-width: 0;
}

.product-page-main .product-details>div:first-child {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.product-page-main .product-content {
    flex-direction: column;
}

.product-page-main .product img {
    flex-basis: 100%;
    width: 100%;
    max-width: none;
    height: auto;
    border-radius: var(--item-rounding) var(--item-rounding) 0 0;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
}

.product-hero-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--surface-color);
    border-radius: var(--item-rounding) var(--item-rounding) 0 0;
    border-bottom: 0;
    overflow: hidden;
}

.product-hero-video iframe,
.product-hero-video video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}

.product-page-grid>.product,
.product-page-main>.product {
    margin-bottom: 0;
    min-width: 0;
}

.product-features {
    flex: 1 1 32rem;
    min-width: 0;
    display: flex;
    min-height: 0;
    box-sizing: border-box;
}

.product-features .product-content {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    box-sizing: border-box;
}

.product-features .product-details {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    min-height: 0;
    padding: var(--card-padding) 0 0;
    overflow: hidden;
    box-sizing: border-box;
}

@container (max-width: 48rem) {
    .product-page-grid {
        flex-direction: column;
    }

    .product-page-main,
    .product-features {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }

    .product-feature-panel.active {
        display: flex;
        min-height: 0;
    }

    .product-feature-viewport {
        max-height: clamp(20rem, 65vh, 36rem);
        min-height: 0;
    }

    .product-features-scroll {
        min-height: 0;
    }
}

.product-feature-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0 var(--card-padding) 16px;
    overflow: visible;
    align-items: flex-start;
}

.product-feature-tab {
    --reveal-surface-radius: var(--reveal-outline-radius-button);
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--button-rounding);
    background: transparent;
    color: var(--text-alpha-80);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
    white-space: nowrap;
    min-height: var(--button-control-height);
    padding: var(--button-padding-block) var(--button-padding-inline);
    transition: filter var(--transition-time) var(--transition-function),
        transform var(--transition-time) var(--transition-function),
        border-color var(--transition-time) var(--transition-function);
}

.product-feature-tab:hover {
    color: var(--text-alpha-95);
    transform: scale(var(--scale-hover));
}

.product-feature-tab.active {
    --reveal-baseline: 0.32;
    --reveal-cursor-light-alpha: 0;
    --reveal-cursor-light-alpha-soft: 0;
    color: var(--text-color);
}

.product-feature-panel {
    position: relative;
    display: none;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    border-top: 0;
    border-radius: 0 0 var(--item-rounding) var(--item-rounding);
}

.product-feature-panel.active {
    display: block;
}

.product-feature-viewport {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.product-features-scroll,
body.plugin-ui .pages-list {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.product-features-scroll {
    --feature-fade-size: 24px;
    --feature-mask-content: linear-gradient(to bottom,
            transparent 0,
            black var(--feature-fade-size),
            black calc(100% - var(--feature-fade-size)),
            transparent 100%);
    flex: 1 1 auto;
    min-width: 0;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: var(--feature-mask-content);
    mask-image: var(--feature-mask-content);
}

.product-features-scroll:has(.product-changelog-view) {
    -webkit-mask-image: linear-gradient(to bottom,
            black 0,
            black calc(100% - var(--feature-fade-size)),
            transparent 100%);
    mask-image: linear-gradient(to bottom,
            black 0,
            black calc(100% - var(--feature-fade-size)),
            transparent 100%);
}

.product-features-scroll::-webkit-scrollbar,
body.plugin-ui .pages-list::-webkit-scrollbar {
    display: none;
    width: 0;
}

/* Custom scrollbar */
.product-features-scrollbar,
body.plugin-ui .custom-scrollbar {
    bottom: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    transform: translateX(100%);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    width: var(--scrollbar-width);
    will-change: transform, opacity;
}

.product-features-scrollbar {
    top: var(--features-scrollbar-offset, 0);
}

.product-features-scroll:hover~.product-features-scrollbar,
.docs-sidebar:hover>.product-features-scrollbar,
.product-features-scrollbar:hover,
.product-features-scrollbar.is-dragging,
body.plugin-ui .pages-list:hover ~ .custom-scrollbar,
body.plugin-ui .custom-scrollbar:hover,
body.plugin-ui .custom-scrollbar.is-dragging {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.product-features-scrollbar-track,
body.plugin-ui .custom-scrollbar-track {
    bottom: var(--scrollbar-inset-block);
    cursor: pointer;
    position: absolute;
    top: var(--scrollbar-inset-block);
    right: 0;
    width: 100%;
}

.product-features-scrollbar-track::before,
body.plugin-ui .custom-scrollbar-track::before {
    background: var(--surface-alpha-08);
    border-radius: 999px;
    bottom: 0;
    content: "";
    pointer-events: none;
    position: absolute;
    top: 0;
    right: var(--scrollbar-inset-end);
    width: var(--scrollbar-visual-width);
}

.product-features-scrollbar-thumb,
body.plugin-ui .custom-scrollbar-thumb {
    cursor: grab;
    height: 40px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    touch-action: none;
    will-change: transform;
}

.product-features-scrollbar-thumb::before,
body.plugin-ui .custom-scrollbar-thumb::before {
    background: rgba(var(--surface-fg-rgb), 0.30);
    border-radius: 999px;
    bottom: 0;
    content: "";
    pointer-events: none;
    position: absolute;
    top: 0;
    right: var(--scrollbar-inset-end);
    transition: background 0.15s ease;
    width: var(--scrollbar-visual-width);
}

.product-features-scrollbar-thumb:hover::before,
.product-features-scrollbar:hover .product-features-scrollbar-thumb::before,
.product-features-scrollbar.is-dragging .product-features-scrollbar-thumb::before,
body.plugin-ui .custom-scrollbar-thumb:hover::before,
body.plugin-ui .custom-scrollbar:hover .custom-scrollbar-thumb::before,
body.plugin-ui .custom-scrollbar.is-dragging .custom-scrollbar-thumb::before {
    background: rgba(var(--surface-fg-rgb), 0.50);
}

.product-features-scrollbar.is-dragging .product-features-scrollbar-thumb,
body.plugin-ui .custom-scrollbar.is-dragging .custom-scrollbar-thumb {
    cursor: grabbing;
}

.product-changelog {
    min-width: 0;
}

.product-changelog-view {
    width: 100%;
    min-width: 0;
}

.product-changelog-toolbar {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    flex-shrink: 0;
    padding: 14px var(--card-padding);
    border-bottom: 0;
    background: transparent;
    border-radius: 0;
}

.product-changelog-search {
    --reveal-surface-radius: var(--reveal-outline-radius-button);
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: var(--button-control-height);
    padding: var(--button-padding-block) var(--button-padding-inline);
    border: 0;
    border-radius: var(--button-rounding);
    background: transparent;
    color: var(--text-alpha-50);
    font-size: var(--font-size-base);
    line-height: 1.2;
}

.product-changelog-search::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: var(--reveal-outline-thickness) solid rgba(var(--reveal-outline-rgb), var(--reveal-baseline, var(--reveal-outline-baseline)));
    pointer-events: none;
    z-index: 2;
}

.product-changelog-search::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: var(--reveal-outline-thickness);
    background:
        radial-gradient(
            circle var(--reveal-light-radius) at var(--reveal-light-x) var(--reveal-light-y),
            rgba(var(--cursor-light-rgb), var(--reveal-cursor-light-alpha)) 0%,
            rgba(var(--cursor-light-rgb), var(--reveal-cursor-light-alpha-soft)) 34%,
            rgba(var(--cursor-light-rgb), 0) 72%
        );
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    pointer-events: none;
    z-index: 3;
}

.product-changelog-search>* {
    position: relative;
    z-index: 1;
}

.product-changelog-range {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0;
    margin-left: auto;
    padding-left: 8px;
    border-left: 0;
    color: var(--text-alpha-65);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.product-changelog-search-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.product-changelog-search input {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-alpha-95);
    font: inherit;
    font-size: var(--font-size-base);
    line-height: 1.2;
    padding: 0;
}

.product-changelog-search input::-webkit-search-cancel-button {
    appearance: none;
    -webkit-appearance: none;
}

.product-changelog-search input::placeholder {
    color: var(--text-alpha-40);
}

.product-changelog-search-clear {
    position: relative;
    display: inline-flex;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-alpha-65);
    cursor: pointer;
    transition: color var(--transition-time) var(--transition-function);
}

.product-changelog-search-clear[hidden] {
    display: none;
}

.product-changelog-search-clear:hover {
    color: var(--text-color);
}

.product-changelog-section-filter {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    width: calc(100% + var(--card-padding));
    min-height: var(--button-control-height);
    margin-right: calc(-1 * var(--card-padding));
    padding-right: var(--card-padding);
    padding-bottom: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
}

.product-changelog-section-filter::-webkit-scrollbar {
    display: none;
}

.product-changelog-section-filter.is-dragging {
    cursor: grabbing;
}

.product-changelog-version-to {
    margin: 0 0.45rem;
    color: var(--text-alpha-50);
}

.product-changelog-version-dropdown {
    position: relative;
    flex: 0 0 auto;
}

.product-changelog-version-dropdown summary::-webkit-details-marker {
    display: none;
}

.product-changelog-version-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0 0.15rem;
    border: 0;
    border-radius: var(--button-rounding);
    background: transparent;
    color: var(--text-alpha-95);
    cursor: pointer;
    font: inherit;
    font-weight: var(--font-weight-regular);
    line-height: 1.2;
    list-style: none;
    text-align: center;
    transition: color var(--transition-time) var(--transition-function);
}

.product-changelog-version-trigger:hover,
.product-changelog-version-trigger:focus-visible {
    color: var(--text-color);
}

.product-changelog-version-current {
    display: inline-block;
}

.product-changelog-version-option {
    justify-content: center;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.product-changelog-version-option.is-selected {
    background: var(--surface-alpha-06);
    color: var(--text-alpha-95);
}

.product-changelog-section-chip {
    flex: 0 0 auto;
    background: transparent;
}

.product-changelog-section-chip:hover,
.product-changelog-section-chip.active {
    background: transparent;
}

.product-changelog-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.product-changelog-release {
    position: relative;
    padding: 0 0 18px;
    border-bottom: 0;
    color: var(--text-alpha-80);
}

.product-changelog-release.is-empty {
    margin-top: -18px;
    padding: 14px 0;
}

.product-changelog-release-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.product-changelog-release.is-empty .product-changelog-release-header {
    margin-bottom: 0;
}

.product-changelog-release-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.product-changelog-release-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: var(--warning-color);
}

.product-changelog-release-version {
    color: var(--text-alpha-95);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
}

.product-changelog-release-date {
    flex: 0 0 auto;
    color: var(--text-alpha-50);
    font-size: var(--font-size-base);
}

.product-changelog-entry,
.product-changelog-description {
    min-width: 0;
    margin: 0;
    color: var(--text-alpha-80);
    font-size: var(--font-size-base);
    line-height: 1.58;
    overflow-wrap: anywhere;
    word-break: normal;
}

.product-changelog-entry+.product-changelog-entry {
    margin-top: 14px;
}

.product-changelog-description {
    white-space: pre-wrap;
}

.product-changelog-entry-badge {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: var(--font-size-tiny);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    vertical-align: 0.08em;
}

.product-changelog-entry-badge.added {
    background: rgba(25, 135, 84, 1);
    color: #48f08a;
}

.product-changelog-entry-badge.changed {
    background: rgba(146, 114, 16, 1);
    color: #ffe45a;
}

.product-changelog-entry-badge.deprecated {
    background: rgba(173, 99, 24, 1);
    color: #ffba67;
}

.product-changelog-entry-badge.removed {
    background: rgba(139, 36, 36, 1);
    color: #ff7878;
}

.product-changelog-entry-badge.fixed {
    background: rgba(31, 93, 151, 1);
    color: #74beff;
}

.product-changelog-entry-badge.security {
    background: rgba(100, 54, 154, 1);
    color: #c793ff;
}

.product-changelog-entry-badge.notes {
    background: rgba(83, 88, 98, 1);
    color: #d7dde8;
}

.product-changelog-entry-badge.knownIssues {
    background: rgba(175, 91, 25, 1);
    color: #ffae63;
}

:root[data-theme="light"] .product-changelog-entry-badge.added {
    background: rgba(25, 135, 84, 0.75);
}

:root[data-theme="light"] .product-changelog-entry-badge.changed {
    background: rgba(146, 114, 16, 0.75);
}

:root[data-theme="light"] .product-changelog-entry-badge.deprecated {
    background: rgba(173, 99, 24, 0.75);
}

:root[data-theme="light"] .product-changelog-entry-badge.removed {
    background: rgba(139, 36, 36, 0.75);
}

:root[data-theme="light"] .product-changelog-entry-badge.fixed {
    background: rgba(31, 93, 151, 0.75);
}

:root[data-theme="light"] .product-changelog-entry-badge.security {
    background: rgba(100, 54, 154, 0.75);
}

:root[data-theme="light"] .product-changelog-entry-badge.notes {
    background: rgba(83, 88, 98, 0.75);
}

:root[data-theme="light"] .product-changelog-entry-badge.knownIssues {
    background: rgba(175, 91, 25, 0.75);
}

.product-changelog-code {
    display: inline;
    padding: 0.1em 0.38em;
    border-radius: 5px;
    background: var(--code-block-bg);
    color: var(--code-block-fg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
}

.product-changelog-entry a {
    color: var(--link-color);
    text-underline-offset: 3px;
}

.product-changelog-more {
    padding: 12px 2px;
    color: var(--text-alpha-50);
    font-size: var(--font-size-base);
    text-align: center;
}

.product-changelog-status {
    padding: 18px 2px;
    color: var(--text-muted);
}

.product-changelog-status.error {
    color: var(--error-color);
}

.product-feature-table-wrap {
    width: 100%;
    padding-top: calc(var(--card-padding) - var(--space-4) + var(--space-2));
    padding-inline-start: calc(var(--card-padding) - var(--space-4) + var(--space-2));
}

.product-feature-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-base);
}

.product-feature-table tbody tr {
    border-bottom: 0;
}

.product-feature-table tbody td {
    position: relative;
    padding: 14px 16px 14px 0;
    color: var(--text-alpha-80);
    vertical-align: top;
    line-height: 1.72;
}

.product-feature-table tbody tr:first-child td {
    padding-top: 0;
}

.product-feature-group-row td {
    padding-bottom: 8px;
    color: var(--text-color);
}

.product-feature-group-row .feature-group-label {
    padding: 0;
    border-bottom: none;
}

.product-feature-subitem-row td {
    padding-left: 30px;
}

.section > .legal-last-updated {
    margin: calc(-1 * var(--space-3)) 0 var(--space-5) var(--rounded-title-inset);
    color: var(--text-alpha-50);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: 1.45;
}

.legal-content .product-details ul {
    display: block;
    list-style: disc;
    margin: 0 0 0 1.25rem;
    padding: 0;
}

.legal-content .product-details li {
    display: list-item;
    padding: 0;
    margin: 0 0 0.5em;
    color: var(--text-alpha-75);
    transition: none;
}

.legal-content .product-details li::after {
    display: none;
}

.legal-content .product-details li:hover {
    color: var(--text-alpha-75);
}

/* ========================================
   Product Card Grid (homepage)
   ======================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}

.product-card {
    --reveal-surface-radius: var(--reveal-outline-radius-item);
    --scale-hover: 1.0125;
    border-radius: var(--item-rounding);
    overflow: visible;
}

.product-card::before,
.product-card__link {
    transform: translateZ(0);
    transform-origin: center;
    transition: transform var(--transition-time) var(--transition-function);
    will-change: transform;
}

.product-card:hover::before,
.product-card:hover .product-card__link {
    transform: translateZ(0) scale(var(--scale-hover));
}

.product-card__link {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border-radius: inherit;
    overflow: hidden;
    position: relative;
    z-index: 1;
    text-decoration: none;
    color: var(--text-color);
    cursor: pointer;
}

.product-card__link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.product-card__image-link {
    position: relative;
    display: block;
    overflow: hidden;
    line-height: 0;
    background: rgba(20, 22, 24, 0.98);
}

.product-card__loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--loader-overlay-bg);
    opacity: 1;
    visibility: visible;
    transition:
        opacity 360ms ease,
        visibility 360ms ease;
    z-index: 3;
    pointer-events: none;
}

.product-card__loader {
    width: 42px;
    height: 42px;
    border: 3px solid var(--surface-alpha-18);
    border-top-color: rgba(var(--text-fg-rgb), 0.92);
    border-radius: 50%;
    animation: product-card-loader-spin 0.85s linear infinite;
    box-shadow: 0 0 28px var(--surface-alpha-12);
}

.product-card__image-link img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    border-radius: 0;
    border-right: none;
    border-bottom: 0;
    transition:
        transform var(--transition-time) var(--transition-function),
        filter var(--transition-time) var(--transition-function);
}

.product-card__image-link[data-image-state='loading'] img {
    transform: scale(1.06);
    filter: brightness(0.76) saturate(0.92);
}

.product-card__image-link[data-image-state='loaded'] .product-card__loading-overlay,
.product-hero-video[data-video-state='loaded'] .product-card__loading-overlay {
    opacity: 0;
    visibility: hidden;
}

.product-card__body {
    padding: var(--card-padding);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.product-card__title {
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-bold);
    margin: var(--title-optical-trim-start) 0 0;
}

.product-card__desc {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-light);
    color: var(--text-alpha-75);
    flex-grow: 1;
    margin: 0;
    line-height: 1.5;
}

@keyframes product-card-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Feature Grid (product pages)
   ======================================== */

.product-details ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 var(--space-8);
}

.product-details li {
    position: relative;
    padding: 6px 0;
    margin: 0;
    font-family: "Google Sans Flex", Arial, sans-serif;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-light);
    line-height: 1.72;
    color: var(--text-alpha-65);
    border-bottom: 0;
    transition: color var(--transition-time) var(--transition-function);
}


.product-details li:hover {
    color: var(--text-alpha-95);
}

/* Feature groups (subsections inside the feature list) */
.product-details li.feature-group {
    grid-column: 1 / -1;
    display: block;
    border-bottom: none;
    padding-bottom: 0;
}

.feature-group-label {
    position: relative;
    display: block;
    font-family: "Google Sans Flex", Arial, sans-serif;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--text-color);
    padding: 6px 0 4px;
    border-bottom: 0;
}

.feature-group>ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 var(--space-8);
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 700px) {
    .product-details ul {
        grid-template-columns: 1fr;
    }

    .feature-group>ul {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   FAQ Accordion (product pages)
   ======================================== */

.product-faq {
    margin-top: calc(var(--space-5) * 3);
}

.product-faq__header {
    margin-bottom: var(--space-8);
    text-align: center;
}

.product-faq__title {
    font-family: "Google Sans Flex", Arial, sans-serif;
    font-size: var(--font-size-heading);
    font-weight: var(--font-weight-semibold);
    line-height: 1.12;
    letter-spacing: 0;
    color: var(--text-color);
    background-image: var(--heading-text-gradient);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    margin: 0;
    padding: 0;
}

.product-faq__intro {
    max-width: 44rem;
    margin: var(--space-2) auto 0;
    color: var(--text-alpha-65);
    font-family: "Google Sans Flex", Arial, sans-serif;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-light);
    line-height: 1.72;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
    margin-top: 0;
}

@media (max-width: 800px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

.faq-grid details {
    --reveal-surface-radius: var(--reveal-outline-radius-item);
    border-radius: var(--item-rounding);
    overflow: hidden;
    background-color: transparent;
    transition:
        background-color var(--transition-time) var(--transition-function),
        height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-grid details[open] {
    background-color: transparent;
}

.faq-grid details summary {
    list-style: none;
    padding: 16px 18px;
    cursor: pointer;
    font-family: "Google Sans Flex", Arial, sans-serif;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    user-select: none;
    color: var(--text-alpha-80);
    line-height: 1.5;
    transition: color var(--transition-time) var(--transition-function),
        background-color var(--transition-time) var(--transition-function);
}

.faq-grid details summary::-webkit-details-marker {
    display: none;
}

.faq-grid details summary::after {
    content: "";
    width: 1em;
    height: 1em;
    background: currentColor;
    color: var(--text-alpha-65);
    flex-shrink: 0;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4.5v15m7.5-7.5h-15' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4.5v15m7.5-7.5h-15' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: color var(--transition-time) var(--transition-function),
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-grid details.is-open summary::after {
    color: var(--text-alpha-65);
    transform: rotate(45deg);
}

.faq-grid details summary:hover {
    color: var(--text-color);
    background-color: transparent;
}

.faq-grid details summary:hover::after {
    color: var(--text-alpha-65);
}

.faq-grid details.is-open summary {
    color: var(--text-color);
}

/* Answer content */
.faq-grid details p {
    padding: 0 18px 18px 18px;
    margin: 0;
    font-family: "Google Sans Flex", Arial, sans-serif;
    font-weight: var(--font-weight-light);
    font-size: var(--font-size-base);
    line-height: 1.72;
    color: var(--text-alpha-65);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.faq-grid details[open] p {
    opacity: 1;
    transform: translateY(0);
}

.faq-grid details p a {
    color: var(--link-color);
    text-decoration: none;
}

.faq-grid details p a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .product-faq__title {
        font-size: var(--font-size-heading);
    }
}

@media (max-width: 560px) {
    .product-faq__title {
        font-size: var(--font-size-heading);
    }

    .faq-grid details p {
        padding-right: 0;
    }
}


/* ========================================
   Breadcrumb
   ======================================== */

.breadcrumb {
    font-size: var(--font-size-base);
    color: var(--text-alpha-50);
    margin: 0 0 var(--space-5) var(--rounded-title-inset);
    padding: 4px 0;
}

.breadcrumb a {
    color: var(--text-alpha-50);
    text-decoration: none;
    transition: color var(--transition-time) var(--transition-function);
}

.breadcrumb a:hover {
    color: var(--text-color);
}

.breadcrumb span {
    margin: 0 6px;
}

.buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0;
}

.buttons :is(a, button),
body.plugin-ui .buy-btn,
body.plugin-ui .export-btn,
body.plugin-ui .warning-btn {
    --button-light-x: -999px;
    --button-light-y: -999px;
    align-items: center;
    border-radius: var(--button-rounding);
    display: inline-flex;
    justify-content: center;
    line-height: var(--line-height-control);
    overflow: hidden;
    padding: var(--button-padding-block) var(--button-padding-inline);
    position: relative;
    text-decoration: none;
}

/* Native reset for <button> children so <a> and <button> render identically. */
.buttons button,
body.plugin-ui .buy-btn,
body.plugin-ui .export-btn,
body.plugin-ui .warning-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    margin: 0;
}

.buttons :is(a, button) {
    transition: transform var(--transition-time) var(--transition-function);
    background-color: var(--primary-color);
    color: #ffffff;
    min-height: var(--button-control-height);
    font-weight: var(--font-weight-button);
    font-size: var(--font-size-base);
    white-space: nowrap;
    will-change: transform;
}

.buttons :is(a, button)>* {
    position: relative;
    z-index: 1;
}

.buttons :is(a, button)::after,
.buy-btn::after,
.export-btn::after,
.warning-btn::after,
.settings-btn::after,
.refresh-btn::after,
.settings-close-btn::after,
.figma-user-id-visibility-btn::after,
.figma-user-id-copy-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle var(--button-reveal-radius) at var(--button-light-x) var(--button-light-y),
            rgba(var(--cursor-light-rgb), var(--button-cursor-light-alpha)) 0%,
            rgba(var(--cursor-light-rgb), var(--button-cursor-light-alpha-soft)) 36%,
            rgba(var(--cursor-light-rgb), 0) 72%);
    border-radius: inherit;
    pointer-events: none;
}

.settings-btn::after,
.refresh-btn::after,
.settings-close-btn::after,
.figma-user-id-visibility-btn::after,
.figma-user-id-copy-btn::after {
    opacity: 0;
    transition: opacity var(--transition-time) var(--transition-function);
}

.settings-btn:hover::after,
.settings-btn:focus-visible::after,
.refresh-btn:hover::after,
.refresh-btn:focus-visible::after,
.settings-close-btn:hover::after,
.settings-close-btn:focus-visible::after,
.figma-user-id-visibility-btn:hover::after,
.figma-user-id-visibility-btn:focus-visible::after,
.figma-user-id-copy-btn:hover::after,
.figma-user-id-copy-btn:focus-visible::after {
    opacity: 1;
}

.buttons :is(a, button):hover {
    transform: scale(var(--scale-hover));
}

.buttons :is(a, button).is-pressed,
.buttons :is(a, button).is-pressed:hover {
    transform: scale(0.95);
}

.buttons :is(a, button).youtube-button {
    background-color: var(--youtube-color);
}

.buttons :is(a, button).buy-button {
    background-color: var(--buy-color);
}

.buttons :is(a, button).discord-button {
    background-color: var(--discord-color);
}

.buttons :is(a, button).telegram-button {
    background-color: var(--telegram-color);
}

.buttons :is(a, button).github-button {
    background-color: var(--github-color);
}

.footer {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 100px;
    opacity: 0.25;
    font-weight: var(--font-weight-light);
    position: relative;
    z-index: 1;
}

.footer p {
    margin: 0;
}

.footer a {
    color: var(--text-color);
}

/* :visited only applies to <a>; harmless when child is <button>. */
.buttons a:visited {
    color: #ffffff;
}

/* ========================================
   Result Panels (Success / Error)
   ======================================== */

.result-panel {
    --reveal-surface-radius: var(--reveal-outline-radius-item);
    border-radius: var(--item-rounding);
    padding: var(--card-padding);
    background-color: transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.result-panel .panel-header {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin-bottom: 0;
}

.result-panel .panel-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-close);
    flex-shrink: 0;
}

.result-panel .panel-title {
    flex: 1;
}

.result-panel .panel-title h2,
.result-panel>h2 {
    margin: var(--title-optical-trim-start) 0 0;
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-semibold);
    display: block;
}

.result-panel .panel-subtitle {
    margin: 0;
    color: var(--text-alpha-60);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
}

.result-panel .panel-content {
    margin-bottom: 0;
    line-height: 1.6;
}

.result-panel .panel-content p {
    margin: 0 0 10px 0;
}

.result-panel .panel-actions,
.result-panel>.buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 0;
}

.result-panel .panel-actions .btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--button-rounding);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    transition: filter var(--transition-time) var(--transition-function), transform var(--transition-time) var(--transition-function);
    cursor: pointer;
    border: none;
}

.result-panel .panel-actions .btn:hover {
    filter: brightness(var(--brightness-hover));
    transform: scale(var(--scale-hover));
}

.result-panel .panel-actions .btn-primary {
    background-color: var(--buy-color);
    color: var(--text-color);
}

.result-panel .panel-actions .btn-secondary {
    background: var(--primary-color);
    color: var(--text-color);
}

.result-panel .panel-actions .buy-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--button-rounding);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    transition: filter var(--transition-time) var(--transition-function), transform var(--transition-time) var(--transition-function);
    cursor: pointer;
    border: none;
    background-color: var(--buy-color);
    color: var(--text-color);
}

.result-panel .panel-actions .buy-button:hover {
    filter: brightness(var(--brightness-hover));
    transform: scale(var(--scale-hover));
}

/* Success Panel */
.success-panel {
    --reveal-outline-rgb: 39, 174, 96;
    --reveal-baseline: 0.16;
}

.success-panel .panel-title h2,
.success-panel>h2 {
    color: var(--buy-color);
}

.success-panel .panel-icon.success-icon {
    background: var(--success-icon-gradient);
    color: var(--text-color);
}

/* Error Panel */
.error-panel {
    --reveal-outline-rgb: 220, 53, 69;
    --reveal-baseline: 0.18;
}

.error-panel .panel-title h2,
.error-panel>h2 {
    color: var(--error-color);
}

.error-panel .panel-icon.error-icon {
    background: var(--error-icon-gradient);
    color: var(--text-color);
}

.warning-panel {
    --reveal-outline-rgb: 243, 156, 18;
    --reveal-baseline: 0.18;
}

.warning-panel h2 {
    color: var(--warning-color);
}

/* ========================================
   Receipt Card (for Stripe success page)
   ======================================== */

.receipt-card {
    --reveal-surface-radius: var(--reveal-outline-radius-item);
    border-radius: var(--item-rounding);
    padding: var(--space-8);
    background: transparent;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

/* Keep result-panel spacing local so global .section heading rules do not leak in. */
.result-panel> :first-child {
    margin-top: 0;
}

.result-panel .buttons {
    margin-bottom: 0px;
}

.result-panel .receipt-card {
    margin-top: 0;
}

.receipt-card .receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.receipt-card .receipt-header-left h3 {
    margin: 0 0 10px 0;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    color: var(--text-muted);
}

.receipt-card .receipt-amount {
    font-size: var(--font-size-hero);
    font-weight: var(--font-weight-bold);
    margin: 0 0 5px 0;
}

.receipt-card .receipt-date {
    color: var(--text-muted);
    font-size: var(--font-size-small);
    margin: 0;
}

.receipt-card .receipt-icon {
    width: 60px;
    height: 60px;
    background: var(--surface-alpha-05);
    border-radius: var(--button-rounding);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-icon);
    color: var(--text-muted);
}

.receipt-card .receipt-actions {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.receipt-card .receipt-actions a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-size: var(--font-size-base);
    transition: opacity 0.3s ease;
}

.receipt-card .receipt-actions a:hover {
    opacity: 0.7;
}

.receipt-card .receipt-actions .download-icon {
    font-size: var(--font-size-large);
}

.receipt-card .receipt-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.receipt-card .receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.receipt-card .receipt-label {
    color: var(--text-muted);
    font-size: var(--font-size-base);
}

.receipt-card .receipt-value {
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
}

.receipt-card .receipt-value .payment-brand {
    font-weight: var(--font-weight-bold);
    margin-right: 5px;
}

/* ========================================
   Admin Panel
   ======================================== */

.admin-accent {
    color: var(--buy-color);
}

/* Login */
.admin-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: 16px;
}

.admin-login h2 {
    font-size: var(--font-size-xlarge);
    margin: 0;
}

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0 0 var(--space-5);
}

.admin-page-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-page-header-info form {
    margin: 0;
}

.admin-email-label {
    color: var(--text-muted);
    font-size: var(--font-size-small);
}

/* ========================================
   Product image loader (partners / support)
   ======================================== */

.product__image-wrap {
    position: relative;
    display: block;
    flex: 0 0 255px;
    width: 255px;
    min-width: 255px;
    height: 100%;
    line-height: 0;
    isolation: isolate;
    overflow: hidden;
    border-top-left-radius: var(--item-rounding);
    border-bottom-left-radius: var(--item-rounding);
    box-sizing: border-box;
}

.product__image-wrap:has(.rounded-bottom-right) {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: var(--item-rounding);
}

.product__image-wrap:has(.rounded-mobile) {
    border-top-right-radius: var(--item-rounding);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.product__image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform var(--transition-time) var(--transition-function),
        filter var(--transition-time) var(--transition-function);
}

.product__image-wrap[data-image-state='loading'] img {
    transform: scale(1.06);
    filter: brightness(0.76) saturate(0.92);
}

.product__loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--loader-overlay-bg);
    opacity: 1;
    visibility: visible;
    transition:
        opacity 360ms ease,
        visibility 360ms ease;
    z-index: 3;
    pointer-events: none;
}

.product__image-wrap[data-image-state='loaded'] .product__loading-overlay {
    opacity: 0;
    visibility: hidden;
}

.product__loader {
    width: 42px;
    height: 42px;
    border: 3px solid var(--surface-alpha-18);
    border-top-color: rgba(var(--text-fg-rgb), 0.92);
    border-radius: 50%;
    animation: product-card-loader-spin 0.85s linear infinite;
    box-shadow: 0 0 28px var(--surface-alpha-12);
}

@media (max-width: 54rem) {
    .product__image-wrap {
        width: 100%;
        min-width: 0;
        flex-basis: auto;
        height: auto;
        border-radius: var(--item-rounding) var(--item-rounding) 0 0;
        border-bottom: 1px solid var(--border-color);
    }

    .product__image-wrap img {
        height: auto;
    }
}

/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */

body.plugin-ui *,
body.plugin-ui *::before,
body.plugin-ui *::after {
    box-sizing: border-box;
}

html:has(> body.plugin-ui),
body.plugin-ui {
    height: 100%;
    margin: 0;
}

body.plugin-ui {
    background: var(--auth-page-background);
    color: var(--text-color);
    font-family: "Google Sans Flex", Arial, sans-serif;
    font-feature-settings: "rlig" 1, "calt" 1;
    font-optical-sizing: auto;
    font-size: var(--font-size-ui);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-body);
    overflow: hidden;
}

body.plugin-ui.no-ambient-light {
    background: var(--background-color);
}

:root:not([data-theme="light"]) body.plugin-ui #bg-canvas {
    display: block;
}

body.plugin-ui.no-ambient-light #bg-canvas {
    display: none;
}

body.plugin-ui button,
body.plugin-ui input,
body.plugin-ui select {
    font: inherit;
}

body.plugin-ui button {
    -webkit-appearance: none;
    appearance: none;
}

body.plugin-ui .language-switcher__trigger {
    min-height: 0;
    min-width: 0;
    padding: var(--space-2);
}

.plugin-ui .container {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    max-width: none;
    min-height: 0;
    width: 100%;
}

body.plugin-ui .header-bar {
    align-items: center;
    background: transparent;
    display: flex;
    flex-shrink: 0;
    gap: var(--space-3);
    min-height: 58px;
    padding: var(--space-4);
}

body.plugin-ui .license-info-bar {
    align-items: center;
    display: flex;
    flex: 1;
    gap: var(--space-2);
    min-width: 0;
}

body.plugin-ui .mastergo-legacy-license-controls {
    display: none !important;
}

body.plugin-ui .mastergo-purchase-control {
    display: none !important;
}

body.plugin-ui .invoice-form-section {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}

body.plugin-ui .invoice-form-section[hidden] {
    display: none !important;
}

body.plugin-ui .header-bar .invoice-form-section {
    max-width: 390px;
}

body.plugin-ui .invoice-form-label {
    color: var(--text-alpha-95);
    font-size: var(--font-size-tiny);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-tight);
}

body.plugin-ui .invoice-form-row {
    align-items: center;
    display: flex;
    min-width: 0;
}

body.plugin-ui .invoice-form-input-shell {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    flex: 1 1 170px;
}

body.plugin-ui .invoice-form-input {
    width: 100%;
}

body.plugin-ui .invoice-form-submit {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    min-height: var(--form-control-height);
    padding: 0 var(--space-4);
    white-space: nowrap;
}

body.plugin-ui .invoice-form-status {
    color: var(--text-muted);
    font-size: var(--font-size-micro);
    line-height: var(--line-height-tight);
    min-height: var(--line-height-tight);
}

body.plugin-ui .invoice-form-status[data-state="error"] {
    color: var(--error-color);
}

body.plugin-ui .invoice-form-status[data-state="success"] {
    color: var(--buy-color);
}

body.plugin-ui .license-wrapper {
    display: inline-block;
    position: relative;
}

body.plugin-ui .license-text,
body.plugin-ui .version-info {
    color: var(--text-muted);
    font-size: var(--font-size-tiny);
    font-weight: var(--font-weight-light);
    line-height: var(--line-height-body);
    min-width: 0;
}

body.plugin-ui .license-text {
    flex: 1;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

body.plugin-ui .license-text.warning {
    color: var(--text-muted);
}

/* Premium / Unlimited state — outer flex container only handles
   layout (icon + label + gap). The gradient-clipped text lives on
   the inner .license-label so the gradient is sized to just the
   glyph run. Painting the gradient on the parent instead would
   stretch it over icon + gap + text, pushing the visible blue stop
   under the icon and leaving the text in the purple→pink tail. */
body.plugin-ui .license-text.is-premium {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}

/* Gradient-clipped premium label. */
body.plugin-ui .license-label {
    background-image: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--accent-pink);
    -webkit-text-fill-color: transparent;
    font-weight: var(--font-weight-semibold);
}

/* Gradient-painted checkmark icon. The accent gradient is laid down
   as the element's background and a checkmark SVG is used as a
   mask, so the icon inherits the exact brand palette without
   inlining colour stops. Stays cross-browser by exposing both the
   prefixed and unprefixed mask properties. */
body.plugin-ui .license-check {
    background: var(--accent-gradient);
    display: inline-block;
    flex-shrink: 0;
    height: var(--space-3);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m4.5 12.75 6 6 9-13.5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m4.5 12.75 6 6 9-13.5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    width: var(--space-3);
}

body.plugin-ui .version-info-value--beta,
body.plugin-ui .version-info-value--buggy {
    color: var(--warning-color);
}

body.plugin-ui .version-info {
    bottom: var(--space-6);
    left: var(--space-8);
    position: fixed;
    white-space: nowrap;
    z-index: 20;
}

body.plugin-ui .version-info-value--stable-current {
    color: var(--text-muted);
}

body.plugin-ui .version-info-row {
    cursor: default;
    display: block;
    line-height: var(--line-height-popup);
}

body.plugin-ui .version-info-value--current {
    color: var(--text-alpha-95);
}

body.plugin-ui .buy-btn,
body.plugin-ui .export-btn,
body.plugin-ui .warning-btn {
    /* Force the gradient to span the full border-box. The default
       background-origin: padding-box would otherwise clamp the
       gradient at the inside of the padding, leaving the padded
       border-band painted with the start/end colors of the gradient
       — visible as a 1-2px inverted-color ring around the button. */
    background-clip: border-box;
    background-origin: border-box;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-tiny);
    font-weight: var(--font-weight-medium);
    outline: none;
    transition:
        filter var(--transition-time) var(--transition-function),
        transform var(--transition-time) var(--transition-function),
        box-shadow var(--transition-time) var(--transition-function);
}

body.plugin-ui .buy-btn:focus-visible,
body.plugin-ui .export-btn:focus-visible,
body.plugin-ui .warning-btn:focus-visible {
    outline: calc(var(--space-1) / 2) solid var(--text-alpha-60);
    outline-offset: calc(var(--space-1) / 2);
}

body.plugin-ui .buy-btn::before,
body.plugin-ui .export-btn::before,
body.plugin-ui .warning-btn-yes::before {
    background: linear-gradient(90deg, transparent, rgba(var(--surface-fg-rgb), 0.20), transparent);
    content: "";
    inset: 0 auto 0 -100%;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: left var(--animation-time-medium) var(--transition-function);
    width: 100%;
}

body.plugin-ui .buy-btn:hover::before,
body.plugin-ui .export-btn:hover::before,
body.plugin-ui .warning-btn-yes:hover::before {
    left: 100%;
    opacity: 1;
}

body.plugin-ui .buy-btn {
    background: var(--accent-gradient);
    box-shadow: none;
    color: var(--on-accent-color);
    flex-shrink: 0;
}

body.plugin-ui .buy-btn:hover,
body.plugin-ui .export-btn:hover,
body.plugin-ui .warning-btn:hover {
    filter: brightness(var(--brightness-hover));
    transform: scale(var(--scale-hover));
}

/* Hover halo follows the 135deg gradient of the button itself: pink
   bloom from the bottom-right corner (gradient end), blue bloom from
   the top-left corner (gradient start). The first shadow keeps the
   same slot as the rest-state pink shadow so transitions interpolate
   cleanly between the two states. */
body.plugin-ui .buy-btn:hover,
body.plugin-ui .warning-btn-yes:hover {
    box-shadow:
        8px 8px 28px rgba(255, 0, 126, 0.19),
        -6px -4px 24px rgba(74, 150, 182, 0.15);
}

body.plugin-ui .export-btn:hover {
    box-shadow:
        6px 6px 22px rgba(255, 0, 126, 0.15),
        -5px -3px 20px rgba(74, 150, 182, 0.11);
}

body.plugin-ui .settings-btn,
body.plugin-ui .refresh-btn,
body.plugin-ui .settings-close-btn,
body.plugin-ui .error-copy-btn,
body.plugin-ui .figma-user-id-visibility-btn,
body.plugin-ui .figma-user-id-copy-btn {
    --button-light-x: -999px;
    --button-light-y: -999px;
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--button-rounding);
    color: var(--text-subtle);
    cursor: pointer;
    display: inline-flex;
    flex-shrink: 0;
    height: var(--space-8);
    justify-content: center;
    overflow: hidden;
    padding: 0;
    position: relative;
    transition:
        background var(--transition-time) var(--transition-function),
        border-color var(--transition-time) var(--transition-function),
        color var(--transition-time) var(--transition-function),
        transform var(--transition-time) var(--transition-function);
    width: var(--space-8);
}

body.plugin-ui .settings-btn:hover,
body.plugin-ui .refresh-btn:hover,
body.plugin-ui .settings-close-btn:hover,
body.plugin-ui .error-copy-btn:hover,
body.plugin-ui .figma-user-id-visibility-btn:hover,
body.plugin-ui .figma-user-id-copy-btn:hover {
    background: var(--surface-alpha-06);
    border-color: transparent;
    color: var(--text-color);
    transform: scale(var(--scale-hover));
}

body.plugin-ui .main-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--space-4);
    min-height: 0;
    overflow: hidden;
    padding: var(--space-4);
}

body.plugin-ui .section {
    background: transparent;
    border: 0;
    border-radius: var(--section-rounding);
    flex-shrink: 0;
    margin-bottom: 0;
    padding: var(--space-4);
}

body.plugin-ui .section.expandable {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 120px;
    overflow: hidden;
}

body.plugin-ui .section-title-row {
    align-items: center;
    display: flex;
    gap: var(--space-3);
    justify-content: space-between;
    margin-bottom: var(--space-3);
    margin-top: var(--title-optical-trim-start);
}

body.plugin-ui .section-title {
    font-size: var(--font-size-tiny);
    margin: 0;
    text-transform: uppercase;
}

body.plugin-ui .section-title,
body.plugin-ui .settings-overlay-header span {
    background-image: var(--heading-text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--text-color);
    font-weight: var(--font-weight-bold);
    -webkit-text-fill-color: transparent;
}

body.plugin-ui .selection-toolbar {
    align-items: center;
    display: flex;
    margin-bottom: var(--space-3);
}

body.plugin-ui .selection-toggle {
    align-items: center;
    color: var(--text-alpha-65);
    cursor: pointer;
    display: inline-flex;
    gap: var(--space-2);
    min-width: 0;
    user-select: none;
}

body.plugin-ui .selection-toggle span {
    font-size: var(--font-size-tiny);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.plugin-ui input[type="checkbox"] {
    --reveal-surface-radius: var(--space-1);
    -webkit-appearance: none;
    appearance: none;
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--reveal-surface-radius);
    color: var(--text-color);
    cursor: pointer;
    display: inline-flex;
    flex-shrink: 0;
    height: var(--space-4);
    justify-content: center;
    margin: 0;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    transition:
        background var(--transition-time) var(--transition-function);
    width: var(--space-4);
}

body.plugin-ui input[type="checkbox"]::before {
    background:
        radial-gradient(circle var(--reveal-light-radius) at var(--reveal-light-x) var(--reveal-light-y),
            rgba(var(--cursor-light-rgb), var(--reveal-cursor-light-alpha)) 0%,
            rgba(var(--cursor-light-rgb), var(--reveal-cursor-light-alpha-soft)) 34%,
            rgba(var(--cursor-light-rgb), 0) 72%),
        rgba(var(--reveal-outline-rgb), var(--reveal-baseline, var(--reveal-outline-baseline)));
    z-index: 1;
}

body.plugin-ui input[type="checkbox"]:checked {
    background: var(--accent-gradient);
    /* Keep the gradient spanning the full control while the shared
       reveal outline is painted by ::before. */
    background-origin: border-box;
    background-clip: border-box;
    color: var(--on-accent-color);
}

body.plugin-ui input[type="checkbox"]:checked::after {
    border-bottom: calc(var(--space-1) / 2) solid currentColor;
    border-right: calc(var(--space-1) / 2) solid currentColor;
    content: "";
    height: var(--space-2);
    margin-top: -2px;
    position: relative;
    transform: rotate(45deg);
    width: var(--space-1);
    z-index: 2;
}

body.plugin-ui input[type="checkbox"]:indeterminate {
    background: var(--accent-gradient);
    background-origin: border-box;
    background-clip: border-box;
    color: var(--on-accent-color);
}

body.plugin-ui input[type="checkbox"]:indeterminate::after {
    background: currentColor;
    border-radius: 999px;
    content: "";
    height: calc(var(--space-1) / 2);
    position: relative;
    width: var(--space-2);
    z-index: 2;
}

body.plugin-ui .search-container {
    display: none;
    padding: 0 0 var(--space-3);
}

body.plugin-ui .search-box {
    --reveal-surface-radius: var(--button-rounding);
    align-items: center;
    background: transparent;
    border-radius: var(--button-rounding);
    display: flex;
    height: var(--form-control-height);
    padding: 0 var(--space-2) 0 var(--space-3);
    transition:
        background var(--transition-time) var(--transition-function);
}

body.plugin-ui .search-box:focus-within {
    background: var(--surface-alpha-03);
}

body.plugin-ui .search-box input,
body.plugin-ui .figma-user-id-input,
body.plugin-ui .number-input {
    background: transparent;
    border: 0;
    color: var(--text-alpha-95);
    flex: 1;
    font-size: var(--font-size-tiny);
    min-width: 0;
    outline: 0;
}

body.plugin-ui .search-box input {
    padding: 0;
}

body.plugin-ui .search-box input::placeholder {
    color: var(--text-alpha-50);
}

body.plugin-ui .search-clear {
    align-items: center;
    border-radius: 999px;
    color: var(--text-alpha-50);
    cursor: pointer;
    display: none;
    font-size: var(--font-size-ui);
    height: var(--space-6);
    justify-content: center;
    line-height: 1;
    width: var(--space-6);
}

body.plugin-ui .search-clear:hover {
    background: var(--surface-alpha-06);
    color: var(--text-color);
}

body.plugin-ui .pages-list-viewport {
    --reveal-surface-radius: var(--item-rounding);
    background: transparent;
    border-radius: var(--item-rounding);
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

body.plugin-ui .pages-list {
    --pages-fade-size: 24px;
    --pages-mask-content: linear-gradient(to bottom,
            transparent 0,
            black var(--pages-fade-size),
            black calc(100% - var(--pages-fade-size)),
            transparent 100%);
    background: transparent;
    height: 100%;
    padding: 6px var(--scrollbar-width) 6px 6px;
    -webkit-mask-image: var(--pages-mask-content);
    mask-image: var(--pages-mask-content);
}

body.plugin-ui .page-item,
body.plugin-ui .node-item {
    align-items: center;
    border-radius: var(--button-rounding);
    cursor: pointer;
    display: flex;
    gap: var(--space-2);
    min-height: 36px;
    min-width: 0;
    padding: 6px;
    transition:
        background var(--transition-time) var(--transition-function),
        transform var(--transition-time) var(--transition-function);
}

body.plugin-ui .page-item:hover,
body.plugin-ui .node-item:hover {
    background: var(--surface-alpha-05);
}

body.plugin-ui .page-item label,
body.plugin-ui .node-item label {
    color: var(--text-alpha-80);
    cursor: pointer;
    flex: 1;
    font-size: var(--font-size-tiny);
    line-height: var(--line-height-tight);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.plugin-ui .page-item label {
    color: var(--text-alpha-95);
    font-weight: var(--font-weight-bold);
}

body.plugin-ui .node-item {
    margin-left: var(--tree-node-indent);
    min-height: var(--form-control-height);
    padding-left: 6px;
}

body.plugin-ui .node-item label {
    color: var(--text-alpha-65);
    font-weight: var(--font-weight-regular);
}

body.plugin-ui .toggle,
body.plugin-ui .page-spacer {
    align-items: center;
    color: var(--text-alpha-50);
    display: inline-flex;
    flex-shrink: 0;
    height: var(--space-4);
    justify-content: center;
    line-height: 1;
    transition:
        color var(--transition-time) var(--transition-function),
        transform var(--transition-time) var(--transition-function);
    width: var(--space-4);
}

body.plugin-ui .toggle {
    font-size: var(--font-size-xxs);
}

body.plugin-ui .toggle:hover {
    color: var(--text-color);
}

body.plugin-ui .page-item.expanded .toggle {
    transform: rotate(90deg);
}

body.plugin-ui .page-children {
    display: none;
}

body.plugin-ui .page-item.expanded + .page-children {
    display: block;
}

body.plugin-ui .settings-row,
body.plugin-ui .settings-item {
    align-items: center;
    display: flex;
    gap: var(--space-3);
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

body.plugin-ui .settings-row:last-child,
body.plugin-ui .settings-item:last-child {
    margin-bottom: 0;
}

body.plugin-ui .settings-row label,
body.plugin-ui .settings-item label {
    color: var(--text-alpha-80);
    flex: 1;
    font-size: var(--font-size-tiny);
    min-width: 0;
}

body.plugin-ui .figma-user-id-control {
    align-items: center;
    display: flex;
    flex: 0 1 270px;
    gap: var(--space-2);
    min-width: 0;
    position: relative;
}

body.plugin-ui .figma-user-id-input-shell,
body.plugin-ui .number-input-shell {
    --reveal-surface-radius: var(--button-rounding);
    background: var(--surface-color);
    border-radius: var(--button-rounding);
    display: flex;
    min-width: 0;
    transition: background var(--transition-time) var(--transition-function);
}

body.plugin-ui .figma-user-id-input-shell {
    flex: 1;
}

body.plugin-ui .figma-user-id-input-shell:focus-within,
body.plugin-ui .number-input-shell:focus-within {
    background: var(--surface-alpha-03);
}

body.plugin-ui .number-input-shell {
    flex: 0 0 calc(var(--space-8) * 3.5);
}

body.plugin-ui .figma-user-id-input,
body.plugin-ui .number-input {
    min-height: var(--form-control-height);
    padding: var(--space-2) var(--space-3);
}

body.plugin-ui .figma-user-id-input {
    user-select: text;
}

body.plugin-ui .figma-user-id-visibility-btn,
body.plugin-ui .figma-user-id-copy-btn {
    color: var(--text-subtle);
    height: var(--form-control-height);
    width: var(--form-control-height);
}

body.plugin-ui .figma-user-id-visibility-btn.is-visible {
    background: var(--surface-alpha-06);
    color: var(--text-color);
}

body.plugin-ui .figma-user-id-tooltip {
    --reveal-surface-radius: var(--button-rounding);
    background: var(--panel-bg);
    border: 0;
    border-radius: var(--button-rounding);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    color: var(--text-alpha-95);
    font-size: var(--font-size-tiny);
    opacity: 0;
    padding: 6px 9px;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: calc(100% + var(--space-2));
    transform: translateY(var(--space-1));
    transition:
        opacity 0.16s ease,
        transform 0.16s ease;
    white-space: nowrap;
    z-index: 30;
}

body.plugin-ui .figma-user-id-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

body.plugin-ui .slider-container {
    align-items: center;
    display: flex;
    gap: var(--space-3);
    width: var(--slider-width);
}

body.plugin-ui .slider-wrapper {
    flex: 1;
    min-width: 0;
    position: relative;
}

body.plugin-ui .scale-slider {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    display: block;
    height: var(--slider-height);
    outline: 0;
    width: 100%;
}

body.plugin-ui .scale-slider::-webkit-slider-runnable-track {
    /* The gradient is drawn full-width (single source of truth in
       --accent-gradient-horizontal), and the portion past the thumb
       is covered by an opaque overlay using the inactive track color.
       This way the X coordinate of the thumb maps to the exact same
       pixel of the gradient that JS samples for --thumb-color, so
       track and thumb can never drift out of sync. */
    background:
        linear-gradient(to right,
            transparent 0 var(--slider-progress, 100%),
            var(--surface-alpha-12) var(--slider-progress, 100%) 100%),
        var(--accent-gradient-horizontal);
    border-radius: 999px;
    height: var(--slider-track-height);
}

body.plugin-ui .scale-slider::-moz-range-track {
    background:
        linear-gradient(to right,
            transparent 0 var(--slider-progress, 100%),
            var(--surface-alpha-12) var(--slider-progress, 100%) 100%),
        var(--accent-gradient-horizontal);
    border-radius: 999px;
    height: var(--slider-track-height);
}

body.plugin-ui .scale-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    /* Solid fill that mirrors the track-gradient color at the current
       thumb position. JS sets --thumb-color (rgb()) and
       --thumb-color-rgb ("r, g, b" — used to build alpha glows) on the
       slider element on every input event. */
    background: var(--thumb-color, var(--accent-pink));
    border: 0;
    border-radius: 50%;
    box-shadow: var(--slider-thumb-glow);
    height: var(--slider-thumb-size);
    margin-top: var(--slider-thumb-offset);
    transition:
        filter var(--transition-time) var(--transition-function),
        transform var(--transition-time) var(--transition-function);
    width: var(--slider-thumb-size);
}

body.plugin-ui .scale-slider::-moz-range-thumb {
    background: var(--thumb-color, var(--accent-pink));
    border: 0;
    border-radius: 50%;
    box-shadow: var(--slider-thumb-glow);
    height: var(--slider-thumb-size);
    transition:
        filter var(--transition-time) var(--transition-function),
        transform var(--transition-time) var(--transition-function);
    width: var(--slider-thumb-size);
}

body.plugin-ui .scale-slider::-webkit-slider-thumb:hover {
    filter: brightness(var(--brightness-hover));
    transform: scale(var(--slider-thumb-hover-scale));
}

body.plugin-ui .scale-slider::-moz-range-thumb:hover {
    filter: brightness(var(--brightness-hover));
    transform: scale(var(--slider-thumb-hover-scale));
}

body.plugin-ui .scale-slider:disabled {
    cursor: not-allowed;
    opacity: var(--slider-disabled-opacity);
}

body.plugin-ui .scale-value {
    color: var(--text-color);
    flex-shrink: 0;
    font-size: var(--font-size-tiny);
    font-weight: var(--font-weight-bold);
    min-width: var(--form-control-height);
    text-align: right;
}

body.plugin-ui .progress-section {
    display: none;
}

body.plugin-ui .progress-section.active {
    display: block;
}

body.plugin-ui .progress-bar {
    background: var(--surface-alpha-10);
    border-radius: 999px;
    height: var(--space-2);
    margin-bottom: var(--space-2);
    overflow: hidden;
}

body.plugin-ui .progress-fill {
    background: var(--accent-gradient-horizontal);
    box-shadow: 0 0 14px rgba(255, 0, 126, 0.14);
    height: 100%;
    transition: width var(--transition-time) var(--transition-function);
    width: 0%;
}

body.plugin-ui .progress-text,
body.plugin-ui .status-message {
    color: var(--text-muted);
    font-size: var(--font-size-tiny);
    text-align: center;
}

body.plugin-ui .status-message {
    padding: var(--space-5);
}

body.plugin-ui .export-btn {
    background: var(--accent-gradient-soft);
    box-shadow: none;
    color: var(--on-accent-color);
    align-self: flex-end;
    flex-shrink: 0;
    min-height: var(--form-control-height);
    min-width: 112px;
    white-space: nowrap;
    width: auto;
}

body.plugin-ui .export-btn:disabled {
    background: var(--surface-alpha-10);
    box-shadow: none;
    color: var(--text-alpha-50);
    cursor: not-allowed;
    filter: none;
    transform: none;
}

body.plugin-ui .export-btn:disabled::before {
    display: none;
}

body.plugin-ui .error-message {
    --reveal-outline-rgb: 220, 53, 69;
    --reveal-surface-radius: var(--item-rounding);
    background: color-mix(in srgb, var(--error-color) 8%, transparent);
    border-radius: var(--item-rounding);
    color: color-mix(in srgb, var(--error-color) 58%, var(--text-color));
    display: none;
    gap: var(--space-2);
    margin: 0;
    max-height: 180px;
    overflow: hidden;
    padding: var(--space-3);
}

body.plugin-ui .error-message.active {
    display: flex;
}

body.plugin-ui .error-text {
    flex: 1;
    max-height: 148px;
    min-width: 0;
    overflow: auto;
    padding-right: var(--space-1);
    user-select: text;
    white-space: pre-wrap;
    word-break: break-word;
}

body.plugin-ui .error-copy-btn {
    align-self: flex-start;
    color: color-mix(in srgb, var(--error-color) 58%, var(--text-color));
    height: var(--font-size-close);
    position: sticky;
    top: 0;
    width: var(--font-size-close);
}

body.plugin-ui .error-copy-btn.copied {
    color: var(--buy-color);
}

body.plugin-ui .error-copy-btn.copied svg {
    display: none;
}

body.plugin-ui .error-copy-btn.copied::after {
    content: "";
    width: 1em;
    height: 1em;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m4.5 12.75 6 6 9-13.5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m4.5 12.75 6 6 9-13.5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

body.plugin-ui .settings-overlay {
    background: var(--auth-page-background);
    bottom: 0;
    display: none;
    flex-direction: column;
    left: 0;
    opacity: 0;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateY(10px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
    z-index: 1000;
}

body.plugin-ui:not(.no-ambient-light):has(> #bg-canvas.ready) .settings-overlay {
    background: transparent;
}

body.plugin-ui:not(.no-ambient-light):has(.settings-overlay.active) .container {
    visibility: hidden;
}

body.plugin-ui .settings-overlay.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

body.plugin-ui .settings-overlay-header {
    align-items: center;
    background: transparent;
    display: flex;
    flex-shrink: 0;
    justify-content: space-between;
    min-height: 58px;
    padding: var(--space-4);
}

body.plugin-ui .settings-overlay-header span {
    font-size: var(--font-size-ui);
}

body.plugin-ui .settings-overlay-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-4);
}

body.plugin-ui .settings-divider {
    background: transparent;
    height: 1px;
    margin: var(--space-4) 0;
}

body.plugin-ui .settings-link-btn {
    --reveal-surface-radius: var(--button-rounding);
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--button-rounding);
    color: var(--text-alpha-95);
    cursor: pointer;
    display: flex;
    font-family: inherit;
    font-size: var(--font-size-tiny);
    font-weight: var(--font-weight-medium);
    gap: var(--space-3);
    line-height: var(--line-height-control);
    margin-bottom: var(--space-2);
    min-height: 42px;
    padding: 10px 18px;
    text-decoration: none;
    transition:
        background var(--transition-time) var(--transition-function),
        filter var(--transition-time) var(--transition-function),
        transform var(--transition-time) var(--transition-function);
    width: 100%;
}

body.plugin-ui .settings-link-btn:hover {
    background: var(--surface-alpha-05);
    filter: brightness(var(--brightness-hover));
    transform: scale(var(--scale-hover));
}

body.plugin-ui .settings-link-btn svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

body.plugin-ui .settings-link-btn--danger {
    color: color-mix(in srgb, var(--error-color) 45%, var(--text-color));
}

body.plugin-ui .debug-flags-container {
    display: grid;
    gap: var(--space-1) var(--space-2);
    grid-template-columns: 1fr 1fr;
}

body.plugin-ui .debug-flag-row {
    align-items: center;
    border-radius: var(--button-rounding);
    cursor: pointer;
    display: flex;
    gap: 6px;
    min-width: 0;
    padding: 6px;
    transition: background var(--transition-time) var(--transition-function);
}

body.plugin-ui .debug-flag-row:hover {
    background: var(--surface-alpha-06);
}

body.plugin-ui .debug-flag-checkbox {
    accent-color: var(--buy-color);
    cursor: pointer;
    flex-shrink: 0;
}

body.plugin-ui .debug-flag-row label {
    color: var(--text-alpha-65);
    cursor: pointer;
    font-size: var(--font-size-tiny);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.plugin-ui .warning-text {
    color: var(--text-alpha-95);
    font-size: var(--font-size-ui);
    line-height: var(--line-height-loose);
    margin: 0 0 var(--space-5);
    text-align: center;
}

body.plugin-ui .warning-buttons {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

body.plugin-ui .warning-btn {
    flex: 1;
    max-width: 150px;
    min-height: 42px;
}

body.plugin-ui .warning-btn-yes {
    background: var(--accent-gradient);
    box-shadow: none;
    color: var(--on-accent-color);
}

body.plugin-ui .warning-btn-no {
    background: var(--surface-color);
    border: 0;
    color: var(--text-alpha-95);
}

body.plugin-ui .license-info-panel,
body.plugin-ui .version-popup {
    --reveal-surface-radius: calc(var(--button-rounding) + 6px);
    background: var(--panel-bg);
    border: 0;
    border-radius: var(--reveal-surface-radius);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
    color: var(--text-alpha-95);
    isolation: isolate;
    z-index: 2000;
}

body.plugin-ui .license-info-panel {
    left: 0;
    margin-top: var(--space-2);
    min-width: 140px;
    padding: var(--space-2);
    position: absolute;
    top: 100%;
}

body.plugin-ui .version-popup {
    display: none;
    font-size: var(--font-size-tiny);
    line-height: var(--line-height-popup);
    max-height: var(--reveal-light-radius);
    max-width: 360px;
    min-width: 260px;
    overflow: hidden;
    padding: 10px var(--space-3);
    position: fixed;
    white-space: normal;
}

body.plugin-ui .version-popup--visible {
    display: block;
}

body.plugin-ui .version-popup-header {
    align-items: center;
    display: flex;
}

body.plugin-ui .version-popup-title {
    color: var(--text-color);
    flex: 1;
    font-size: var(--font-size-ui);
    font-weight: var(--font-weight-bold);
    min-width: 0;
}

body.plugin-ui .version-popup-meta {
    color: var(--text-muted);
    flex-shrink: 0;
    font-size: var(--font-size-tiny);
    margin-left: var(--space-2);
}

body.plugin-ui .version-popup-scroll {
    margin-top: var(--space-2);
    max-height: 292px;
    overflow-x: hidden;
    overflow-y: auto;
}

body.plugin-ui .version-popup-description,
body.plugin-ui .version-popup-item {
    color: var(--text-alpha-80);
    font-size: var(--font-size-tiny);
    white-space: pre-wrap;
}

body.plugin-ui .version-popup-item {
    margin-right: var(--space-1);
    margin-top: 10px;
    min-width: 0;
    width: 100%;
}

body.plugin-ui .version-popup-prefix,
body.plugin-ui .version-popup-code {
    font-weight: var(--font-weight-bold);
}

body.plugin-ui .version-popup-code {
    color: var(--warning-color);
}

body.plugin-ui .version-popup-item a {
    color: var(--link-color);
}

body.plugin-ui *::-webkit-scrollbar {
    height: var(--space-2);
    width: var(--space-2);
}

body.plugin-ui *::-webkit-scrollbar-track {
    background: transparent;
}

body.plugin-ui *::-webkit-scrollbar-thumb {
    background: rgba(var(--surface-fg-rgb), 0.22);
    border-radius: 999px;
}

body.plugin-ui *::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--surface-fg-rgb), 0.36);
}

@media (max-width: 360px) {
    body.plugin-ui .header-bar,
body.plugin-ui .main-content,
body.plugin-ui .settings-overlay-header,
body.plugin-ui .settings-overlay-content {
        padding: var(--space-3);
    }

    body.plugin-ui .section {
        padding: var(--space-3);
    }

    body.plugin-ui .slider-container {
        width: var(--compact-slider-width);
    }
}
