
html.ui-premium {
    --pm-sheen: rgba(255, 255, 255, .55);
    --pm-hairline: inset 0 1px 0 rgba(255, 255, 255, .75);
    --pm-lift: 0 1px 2px rgba(20, 20, 30, .05), 0 6px 16px rgba(20, 20, 30, .06);
    --pm-lift-hover: 0 2px 4px rgba(20, 20, 30, .06), 0 12px 26px rgba(20, 20, 30, .09);
    --pm-small: 0 1px 2px rgba(20, 20, 30, .08);
    --pm-float: 0 2px 6px rgba(20, 20, 30, .06), 0 16px 36px rgba(20, 20, 30, .14);
    --pm-well: inset 0 1px 2px rgba(20, 20, 30, .14);
    --pm-accent-soft: color-mix(in srgb, rgb(var(--primary)) 22%, transparent);
    --pm-accent-glow: color-mix(in srgb, rgb(var(--primary)) 40%, transparent);
    --pm-accent-light: color-mix(in srgb, rgb(var(--primary)) 78%, #fff);
    --pm-bg-glow: color-mix(in srgb, rgb(var(--primary)) 9%, transparent);
}

html.ui-premium.dark {
    --pm-sheen: rgba(255, 255, 255, .045);
    --pm-hairline: inset 0 1px 0 rgba(255, 255, 255, .06);
    --pm-lift: 0 1px 2px rgba(0, 0, 0, .25), 0 6px 16px rgba(0, 0, 0, .28);
    --pm-lift-hover: 0 2px 4px rgba(0, 0, 0, .3), 0 14px 30px rgba(0, 0, 0, .38);
    --pm-small: 0 1px 2px rgba(0, 0, 0, .35);
    --pm-float: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 40px rgba(0, 0, 0, .5);
    --pm-well: inset 0 1px 3px rgba(0, 0, 0, .45);
    --pm-bg-glow: color-mix(in srgb, rgb(var(--primary)) 12%, transparent);
}

html.ui-premium body {
    background-image: radial-gradient(1100px 520px at 50% -110px, var(--pm-bg-glow), transparent 70%);
    background-repeat: no-repeat;
    background-attachment: fixed;
}

html.ui-premium body.capsule-active {
    background-image: none;
}

html.ui-premium body.capsule-active .page-capsule {
    background-image: radial-gradient(1100px 520px at 50% -110px, var(--pm-bg-glow), transparent 70%);
    background-repeat: no-repeat;
    background-attachment: local;
}

html.ui-premium :is(.settings-section, .theme-card, .button-style-card, .ms-tool-box, .sidebar) {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 55%);
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium :is(.dropdown, .notif-panel, .suggestions-list) {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 40%);
    box-shadow: var(--pm-float), var(--pm-hairline);
}

html.ui-premium :is(.theme-card, .button-style-card):hover {
    box-shadow: var(--pm-lift-hover), var(--pm-hairline);
}

html.ui-premium #resultsMain.web-results-mcard .result-card {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 55%);
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium #resultsMain.web-results-mcard .result-card:hover {
    box-shadow: var(--pm-lift-hover), var(--pm-hairline);
}

html.ui-premium #resultsMain.web-results-magazine .result-card {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 55%);
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium #resultsMain.web-results-magazine .result-card:hover {
    box-shadow: var(--pm-lift-hover), var(--pm-hairline);
}

html.ui-premium #resultsMain.web-results-magazine .result-card-featured {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 45%),
        linear-gradient(135deg, rgb(var(--primary) / 0.07) 0%, rgb(var(--primary) / 0.02) 100%);
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium #resultsMain.web-results-magazine .result-card-featured:hover {
    box-shadow: var(--pm-lift-hover), var(--pm-hairline);
}

html.ui-premium.dark #resultsMain.web-results-magazine .result-card-featured {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 45%),
        linear-gradient(135deg, rgb(var(--primary) / 0.12) 0%, rgb(var(--primary) / 0.04) 100%);
}

html.ui-premium #resultsMain.web-results-modern .result-card:hover {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 55%);
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium .image-card {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 55%);
    box-shadow: var(--pm-small), var(--pm-hairline);
    transition: transform 0.2s, box-shadow 0.2s;
}

html.ui-premium .image-card:hover {
    box-shadow: var(--pm-lift-hover), var(--pm-hairline);
}

html.ui-premium .video-thumb-wrap {
    box-shadow: var(--pm-small);
}

html.ui-premium .news-card {
    box-shadow: 0 1px 0 rgba(20, 20, 30, .04);
}

html.ui-premium.dark .news-card {
    box-shadow: 0 1px 0 rgba(0, 0, 0, .3);
}

html.ui-premium .related-chip {
    background-color: rgb(var(--card));
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 60%);
    box-shadow: var(--pm-small), var(--pm-hairline);
}

html.ui-premium .related-chip:hover {
    box-shadow: var(--pm-lift), var(--pm-hairline), 0 0 10px var(--pm-accent-soft);
}

html.ui-premium .ai-response-box-inner {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 45%);
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium .fsearch-inner-box {
    position: relative;
    isolation: isolate;
    box-shadow: var(--pm-float), var(--pm-hairline);
}

html.ui-premium .fsearch-inner-box::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 40%);
}

html.ui-premium .fsearch-submit-trigger {
    position: relative;
    isolation: isolate;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .25);
}

html.ui-premium .fsearch-submit-trigger::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .3), transparent 60%);
}

html.ui-premium .fsearch-nav-btn {
    position: relative;
    isolation: isolate;
    box-shadow: var(--pm-small);
}

html.ui-premium .fsearch-nav-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 60%);
}

html.ui-premium .fsearch-nav-btn.is-active {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .25);
}

html.ui-premium .fsearch-nav-btn.is-active::before {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .3), transparent 60%);
}

html.ui-premium #wiki-infobox {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 35%);
    box-shadow: var(--pm-float), var(--pm-hairline);
}

html.ui-premium .wi-header-card,
html.ui-premium .wi-desc-card {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 55%);
    box-shadow: var(--pm-small), var(--pm-hairline);
}

html.ui-premium .wi-facts {
    box-shadow: var(--pm-small), var(--pm-hairline);
}

html.ui-premium .wi-fact-row {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 65%);
}

html.ui-premium .wi-thumb {
    box-shadow: var(--pm-small);
}

html.ui-premium .wi-close {
    box-shadow: var(--pm-small);
}

html.ui-premium #wiki-mobile-btn {
    background-image: linear-gradient(155deg, var(--pm-accent-light), rgb(var(--primary)));
    box-shadow: var(--pm-float), inset 0 1px 0 rgba(255, 255, 255, .25);
}

html.ui-premium .customize-fab {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 55%);
    box-shadow: var(--pm-float), var(--pm-hairline);
}

html.ui-premium .mojeek-show-more-btn {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 60%);
    box-shadow: var(--pm-small), var(--pm-hairline);
}

html.ui-premium .mojeek-show-more-btn:hover:not(:disabled) {
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium .domain-tooltip-inner {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 40%);
    box-shadow: var(--pm-float), var(--pm-hairline);
}

html.ui-premium .ms-tool-btn {
    background-image: linear-gradient(155deg, var(--pm-accent-light), rgb(var(--primary)));
    box-shadow: 0 1px 2px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: opacity .2s, border-radius .2s, clip-path .2s, transform .15s, box-shadow .2s;
}

html.ui-premium .btn-primary {
    position: relative;
    isolation: isolate;
    transition: opacity .2s, border-radius .2s, clip-path .2s, transform .15s, box-shadow .2s;
}

html.ui-premium .btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .2), transparent 60%);
}

html.ui-premium :is(.btn-primary, .ms-tool-btn):hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--pm-accent-glow), inset 0 1px 0 rgba(255, 255, 255, .3);
}

html.ui-premium :is(.btn-primary, .ms-tool-btn):active {
    transform: translateY(0) scale(.98);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .14), inset 0 1px 3px rgba(0, 0, 0, .2);
}

html.ui-premium :is(.action-btn, .theme-switch-btn, .ms-tool-select, .ms-calc-key) {
    background-color: rgb(var(--card));
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 60%);
    box-shadow: var(--pm-small), var(--pm-hairline);
    transition: background-color .2s, border-color .2s, border-radius .2s, clip-path .2s, transform .15s, box-shadow .2s;
}

html.ui-premium .btn-secondary {
    box-shadow: var(--pm-small), var(--pm-hairline);
    transition: background-color .2s, border-color .2s, border-radius .2s, clip-path .2s, transform .15s, box-shadow .2s;
}

html.ui-premium :is(.btn-secondary, .action-btn, .theme-switch-btn, .ms-calc-key):hover {
    transform: translateY(-1px);
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium :is(.btn-secondary, .action-btn, .theme-switch-btn, .ms-calc-key):active {
    transform: translateY(0) scale(.98);
    box-shadow: var(--pm-well);
}

html.ui-premium :is(.icon-btn, .search-btn):hover {
    box-shadow: var(--pm-small), var(--pm-hairline);
}

html.ui-premium .time-btn {
    background-color: rgb(var(--card));
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 60%);
    box-shadow: var(--pm-small), var(--pm-hairline);
}

html.ui-premium .time-btn::before {
    background-image: linear-gradient(155deg, var(--pm-accent-light), rgb(var(--primary)));
}

html.ui-premium .time-btn.active {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .25);
}

html.ui-premium .toggle-input {
    box-shadow: inset 0 0 0 1px rgb(var(--border)), var(--pm-well);
}

html.ui-premium .toggle-input::before {
    background-image: linear-gradient(180deg, #fff, #e9e9f0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 0 0 .5px rgba(0, 0, 0, .06);
}

html.ui-premium .toggle-input:checked {
    background-image: linear-gradient(155deg, var(--pm-accent-light), rgb(var(--primary)));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 12px var(--pm-accent-glow);
}

html.ui-premium :is(.ssb-input, .ms-tool-input) {
    box-shadow: var(--pm-well);
}

html.ui-premium :is(.ssb-input, .ms-tool-input):focus {
    box-shadow: var(--pm-well), 0 0 0 3px var(--pm-accent-soft);
}

html.ui-premium .search-input {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 55%);
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium .search-input:focus {
    box-shadow: 0 0 0 3px var(--pm-accent-soft), 0 10px 26px -8px var(--pm-accent-glow);
}

html.ui-premium .search-header-input {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 55%);
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium .search-header-input:focus {
    box-shadow: 0 0 0 3px var(--pm-accent-soft), 0 10px 26px -8px var(--pm-accent-glow);
}

html.ui-premium .search-submit {
    background-image: linear-gradient(155deg, var(--pm-accent-light), rgb(var(--primary)));
    box-shadow: 0 1px 2px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .25);
}

html.ui-premium .search-submit:hover {
    box-shadow: 0 6px 18px var(--pm-accent-glow), inset 0 1px 0 rgba(255, 255, 255, .3);
}

@media (prefers-reduced-motion: reduce) {
    html.ui-premium :is(.btn-primary, .ms-tool-btn, .btn-secondary, .action-btn,
        .theme-switch-btn, .ms-calc-key):is(:hover, :active) {
        transform: none;
    }
}

html.ui-premium {
    --pm-c: rgb(var(--primary));
    --pm-raise-top: rgb(var(--card));
    --pm-raise-bottom: color-mix(in srgb, rgb(var(--card)) 95%, rgb(var(--fg)));
    --pm-raise-hover: color-mix(in srgb, rgb(var(--card)) 91%, rgb(var(--fg)));
    --pm-rim: rgba(255, 255, 255, .95);
    --pm-rim-shade: rgba(15, 23, 42, .07);
    --pm-inset: inset 0 1px 2px rgba(15, 23, 42, .08);
    --pm-c-ring: color-mix(in srgb, var(--pm-c) 22%, transparent);
    --pm-c-glow: color-mix(in srgb, var(--pm-c) 65%, transparent);

    --pm-solid: linear-gradient(155deg,
            color-mix(in srgb, var(--pm-c) 86%, black) 0%,
            var(--pm-c) 58%,
            color-mix(in srgb, var(--pm-c) 88%, white) 100%);
    --pm-solid-hover: linear-gradient(155deg,
            color-mix(in srgb, var(--pm-c) 92%, black) 0%,
            color-mix(in srgb, var(--pm-c) 94%, white) 58%,
            color-mix(in srgb, var(--pm-c) 80%, white) 100%);
    --pm-solid-press: linear-gradient(155deg,
            color-mix(in srgb, var(--pm-c) 82%, black) 0%,
            color-mix(in srgb, var(--pm-c) 92%, black) 100%);
    --pm-solid-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--pm-c) 80%, white),
        inset 0 1px 0 rgba(255, 255, 255, .32),
        inset 0 6px 8px -6px rgba(255, 255, 255, .3),
        inset 0 -2px 0 rgba(0, 0, 0, .12),
        0 1px 1px rgba(0, 0, 0, .18),
        0 6px 14px -8px color-mix(in srgb, var(--pm-c) 75%, black);
    --pm-key-neutral:
        inset 0 1px 0 rgba(255, 255, 255, .32),
        inset 0 6px 8px -6px rgba(255, 255, 255, .3),
        inset 0 -2px 0 rgba(0, 0, 0, .12),
        0 1px 1px rgba(0, 0, 0, .18),
        0 6px 14px -8px rgba(0, 0, 0, .35);
}

html.ui-premium.dark {
    --pm-raise-top: color-mix(in srgb, rgb(var(--card)) 92%, white);
    --pm-raise-bottom: rgb(var(--card));
    --pm-raise-hover: color-mix(in srgb, rgb(var(--card)) 86%, white);
    --pm-rim: rgba(255, 255, 255, .08);
    --pm-rim-shade: rgba(0, 0, 0, .45);
    --pm-inset: inset 0 1px 2px rgba(0, 0, 0, .4);
}

html.ui-premium :is(.ms-tool-btn, .confirm-btn-ok, .ms-calc-key.eq) {
    background-image: var(--pm-solid);
    box-shadow: var(--pm-solid-shadow);
}

html.ui-premium :is(.ms-tool-btn, .confirm-btn-ok, .ms-calc-key.eq):hover {
    opacity: 1;
    background-image: var(--pm-solid-hover);
    box-shadow: var(--pm-solid-shadow), 0 0 24px -6px var(--pm-c-glow);
}

html.ui-premium :is(.ms-tool-btn, .confirm-btn-ok, .ms-calc-key.eq):active {
    transform: translateY(1px);
    background-image: var(--pm-solid-press);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .22), inset 0 -1px 0 rgba(255, 255, 255, .12);
}

html.ui-premium .btn-primary {
    box-shadow: var(--pm-key-neutral);
}

html.ui-premium .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--pm-key-neutral), 0 10px 24px -10px color-mix(in srgb, var(--accent, rgb(var(--primary))) 55%, transparent);
}

html.ui-premium .btn-primary:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .22), inset 0 -1px 0 rgba(255, 255, 255, .12);
}

html.ui-premium :is(.action-btn, .theme-switch-btn, .ms-calc-key:not(.eq), .confirm-btn-cancel) {
    background-color: rgb(var(--card));
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-bottom));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -1px 0 var(--pm-rim-shade), var(--pm-small);
}

html.ui-premium :is(.action-btn, .theme-switch-btn, .ms-calc-key:not(.eq), .confirm-btn-cancel):hover {
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-hover));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -1px 0 var(--pm-rim-shade), var(--pm-lift);
}

html.ui-premium :is(.action-btn, .theme-switch-btn, .ms-calc-key:not(.eq), .confirm-btn-cancel):active {
    transform: translateY(1px);
    background-image: linear-gradient(180deg, var(--pm-raise-bottom), var(--pm-raise-bottom));
    box-shadow: inset 0 2px 4px var(--pm-rim-shade);
}

html.ui-premium .keyshort-input {
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-bottom));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -2px 0 var(--pm-rim-shade), 0 1px 1px var(--pm-rim-shade);
}

html.ui-premium .keyshort-clear-btn:hover {
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-bottom));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -1px 0 var(--pm-rim-shade), var(--pm-small);
}

html.ui-premium :is(.theme-card, .button-style-card):has(input:checked) {
    box-shadow: 0 0 0 3px var(--pm-c-ring), 0 0 22px -6px var(--pm-c-glow), var(--pm-lift), var(--pm-hairline);
}

html.ui-premium .sidebar-nav a.active {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pm-c) 18%, transparent),
        inset 0 1px 0 color-mix(in srgb, white 10%, transparent);
}

html.ui-premium .setting-row-icon {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pm-c) 20%, transparent),
        inset 0 1px 0 color-mix(in srgb, white 12%, transparent);
}

html.ui-premium .toggle-input {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .18), inset 0 0 0 1px rgb(var(--border));
}

html.ui-premium .toggle-input::before {
    background-image: linear-gradient(180deg, #fff, #eef1f5);
    box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(0, 0, 0, .3), 0 2px 6px rgba(0, 0, 0, .12);
}

html.ui-premium .toggle-input:checked {
    background-image: linear-gradient(155deg, color-mix(in srgb, var(--pm-c) 86%, black), var(--pm-c));
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .22), 0 0 14px -2px color-mix(in srgb, var(--pm-c) 45%, transparent);
}

html.ui-premium .theme-card-radio-dot {
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-bottom));
    box-shadow: inset 0 1px 0 var(--pm-rim), 0 1px 1px var(--pm-rim-shade);
}

html.ui-premium .theme-card:has(input:checked) .theme-card-radio-dot {
    background-image: var(--pm-solid);
    box-shadow: inset 0 0 0 3px rgb(var(--card)), 0 2px 6px -2px var(--pm-c-glow);
}

html.ui-premium .color-swatch {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -2px 3px rgba(0, 0, 0, .18), 0 1px 2px rgba(0, 0, 0, .2);
}

html.ui-premium .color-swatch.is-selected {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 0 0 2px rgb(var(--bg)), 0 0 0 4px rgb(var(--fg));
}

html.ui-premium .range-input {
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18);
}

html.ui-premium .range-input::-webkit-slider-thumb {
    background-image: var(--pm-solid);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pm-c) 80%, black),
        inset 0 1px 0 rgba(255, 255, 255, .35),
        0 2px 6px -1px color-mix(in srgb, var(--pm-c) 70%, black);
}

html.ui-premium .range-input::-moz-range-thumb {
    background-image: var(--pm-solid);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pm-c) 80%, black),
        inset 0 1px 0 rgba(255, 255, 255, .35),
        0 2px 6px -1px color-mix(in srgb, var(--pm-c) 70%, black);
}

html.ui-premium :is(.settings-section select, .settings-section textarea,
    .settings-section input[type="text"], .settings-section input[type="url"]) {
    box-shadow: var(--pm-inset);
}

html.ui-premium :is(.settings-section select, .settings-section textarea,
    .settings-section input[type="text"], .settings-section input[type="url"]):focus {
    border-color: var(--pm-c);
    box-shadow: 0 0 0 3px var(--pm-c-ring), inset 0 1px 2px rgba(0, 0, 0, .12);
}

html.ui-premium :is(.confirm-box, .kids-modal) {
    box-shadow: var(--pm-float), inset 0 1px 0 var(--pm-rim);
}

html.ui-premium .toast {
    box-shadow: var(--pm-float), inset 0 1px 0 rgba(255, 255, 255, .12);
}

@media (prefers-reduced-motion: reduce) {
    html.ui-premium :is(.ms-tool-btn, .confirm-btn-ok, .ms-calc-key, .btn-primary, .action-btn,
        .theme-switch-btn, .confirm-btn-cancel):active {
        transform: none;
    }
}

html.ui-premium-anim {
    --pm-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
    --pm-ease-bounce: cubic-bezier(.18, 1.8, .4, 1);
    --pm-ease-out: cubic-bezier(.22, 1, .36, 1);
    --pm-dur-fast: 120ms;
    --pm-dur-spring: 420ms;
}

html.ui-premium-anim :is(.btn-primary, .btn-secondary, .action-btn, .theme-switch-btn, .ms-tool-btn,
    .ms-calc-key, .confirm-btn-ok, .confirm-btn-cancel, .time-btn, .related-chip, .keyshort-input,
    .mojeek-show-more-btn, .icon-btn, .search-btn) {
    transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, opacity .2s,
        border-radius .2s, clip-path .2s, transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim :is(.btn-primary, .btn-secondary, .action-btn, .theme-switch-btn, .ms-tool-btn,
    .ms-calc-key, .confirm-btn-ok, .confirm-btn-cancel, .time-btn, .related-chip, .keyshort-input,
    .mojeek-show-more-btn):hover {
    transform: translateY(-1px);
}

html.ui-premium-anim :is(.btn-primary, .btn-secondary, .action-btn, .theme-switch-btn, .ms-tool-btn,
    .ms-calc-key, .confirm-btn-ok, .confirm-btn-cancel, .time-btn, .related-chip, .keyshort-input,
    .mojeek-show-more-btn, .icon-btn, .search-btn):active {
    transform: scale(.96);
    transition-duration: .2s, .2s, .2s, .2s, .2s, .2s, .2s, var(--pm-dur-fast);
}

html.ui-premium-anim :is(.theme-card, .button-style-card) {
    transition: border-color .2s, box-shadow .2s, transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim :is(.theme-card, .button-style-card):hover {
    transform: translateY(-2px);
}

html.ui-premium-anim :is(.theme-card, .button-style-card):active {
    transform: scale(.98);
}

html.ui-premium-anim .theme-card:has(input:checked) .theme-card-radio-dot {
    animation: pm-dot-pop var(--pm-dur-spring) var(--pm-ease-bounce);
}

html.ui-premium-anim .sidebar-nav a {
    transition: background-color .15s, color .15s, transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim .sidebar-nav a:active {
    transform: scale(.96);
}

html.ui-premium-anim .toggle-input::before {
    transition: left var(--pm-dur-spring) var(--pm-ease-spring), width var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim .toggle-input:active::before {
    width: 1.55rem;
}

html.ui-premium-anim .toggle-input:checked:active::before {
    left: 1.3rem;
}

html.ui-premium-anim .range-input::-webkit-slider-thumb {
    transition: transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim .range-input::-moz-range-thumb {
    transition: transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim .range-input:active::-webkit-slider-thumb {
    transform: scale(1.25);
}

html.ui-premium-anim .range-input:active::-moz-range-thumb {
    transform: scale(1.25);
}

html.ui-premium-anim .dropdown[role="menu"] {
    transform-origin: top left;
    transform: translateY(-4px) scale(.9);
    transition: opacity .2s, transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim .dropdown[role="menu"].open {
    transform: none;
}

html.ui-premium-anim .suggestions-list {
    transition: opacity .18s, transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim .confirm-box {
    transform: translateY(20px) scale(.92);
    transition: transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim #resultsMain .result-card:has(> .skeleton) {
    animation: pm-rise 640ms var(--pm-ease-spring) backwards;
}

html.ui-premium-anim #resultsMain .result-card:has(> .skeleton):nth-child(2) { animation-delay: 50ms; }
html.ui-premium-anim #resultsMain .result-card:has(> .skeleton):nth-child(3) { animation-delay: 100ms; }
html.ui-premium-anim #resultsMain .result-card:has(> .skeleton):nth-child(4) { animation-delay: 150ms; }
html.ui-premium-anim #resultsMain .result-card:has(> .skeleton):nth-child(5) { animation-delay: 200ms; }
html.ui-premium-anim #resultsMain .result-card:has(> .skeleton):nth-child(6) { animation-delay: 250ms; }
html.ui-premium-anim #resultsMain .result-card:has(> .skeleton):nth-child(n+7) { animation-delay: 300ms; }

html.ui-premium-anim .settings-section {
    animation: pm-rise 640ms var(--pm-ease-spring) backwards;
}

html.ui-premium-anim .settings-section:nth-of-type(2) { animation-delay: 40ms; }
html.ui-premium-anim .settings-section:nth-of-type(3) { animation-delay: 80ms; }
html.ui-premium-anim .settings-section:nth-of-type(n+4) { animation-delay: 120ms; }

@keyframes pm-rise {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.97);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pm-dot-pop {
    from { transform: scale(.4); }
    to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    html.ui-premium-anim *,
    html.ui-premium-anim *::before,
    html.ui-premium-anim *::after {
        animation: none !important;
        transition-duration: .01ms !important;
    }
}

html.ui-premium-anim .ai-response-box-inner {
    animation: pm-ai-in 720ms var(--pm-ease-spring) both;
    transform-origin: 50% 0;
}
html.ui-premium-anim .ai-response-box-inner > * {
    animation: pm-ai-content 520ms var(--pm-ease-out) 160ms both;
}
@keyframes pm-ai-in {
    0%   { opacity: 0; transform: translateY(14px) scale(.96); filter: blur(8px); }
    55%  { opacity: 1; filter: blur(0); }
    100% { opacity: 1; transform: none; filter: none; }
}
@keyframes pm-ai-content {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    html.ui-premium-anim .ai-response-box-inner,
    html.ui-premium-anim .ai-response-box-inner > * { animation: none; }
}

html.ui-premium-anim #dynamicSearchIcon {
    transform: none;
    translate: 0 -50%;
    transform-origin: 50% 50%;
}
html.ui-premium-anim #dynamicSearchIcon.pm-icon-out {
    animation: pm-icon-out 130ms var(--pm-ease-out) forwards;
}
html.ui-premium-anim #dynamicSearchIcon.pm-icon-in {
    animation: pm-icon-in 460ms var(--pm-ease-spring) both;
}
html.ui-premium-anim :is(.nav-btn, .fsearch-nav-btn).pm-tab-pop svg {
    animation: pm-tab-pop 450ms var(--pm-ease-bounce);
    transform-origin: 50% 60%;
}
@keyframes pm-icon-out {
    to { opacity: 0; rotate: -70deg; scale: .45; filter: blur(2px); }
}
@keyframes pm-icon-in {
    0%   { opacity: 0; rotate: 80deg; scale: .4; filter: blur(2px); }
    55%  { opacity: 1; filter: blur(0); }
    100% { opacity: 1; rotate: 0deg; scale: 1; filter: none; }
}
@keyframes pm-tab-pop {
    0%   { scale: 1; translate: 0 0; }
    35%  { scale: .78; translate: 0 1px; }
    100% { scale: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
    html.ui-premium-anim #dynamicSearchIcon,
    html.ui-premium-anim :is(.nav-btn, .fsearch-nav-btn) svg { animation: none !important; }
}

html.ui-premium-anim div#stickySearch {
    transform: translateX(-50%) translateY(110px) scale(.92);
    transform-origin: 50% 100%;
    transition: transform 320ms cubic-bezier(.4, 0, 1, 1), opacity 240ms ease;
}
html.ui-premium-anim div#stickySearch.is-active {
    transform: translateX(-50%) translateY(0) scale(1);
    transition: transform 640ms var(--pm-ease-spring), opacity 280ms ease;
}
html.ui-premium-anim div#stickySearch.is-active.nav-open {
    transform: translateX(-50%) translateY(110px) scale(.92);
    transition: transform 320ms cubic-bezier(.4, 0, 1, 1), opacity 240ms ease;
}
html.ui-premium-anim div#stickySearch.is-active .fsearch-submit-trigger {
    animation: pm-sticky-pop 520ms var(--pm-ease-spring) 90ms backwards;
}
html.ui-premium-anim div#stickySearch.is-active .fsearch-nav-btn {
    animation: pm-sticky-pop 480ms var(--pm-ease-spring) 120ms backwards;
}
html.ui-premium-anim div#stickySearch.is-active .fsearch-nav-btn:nth-child(2) { animation-delay: 160ms; }
html.ui-premium-anim div#stickySearch.is-active .fsearch-nav-btn:nth-child(3) { animation-delay: 200ms; }
html.ui-premium-anim div#stickySearch.is-active .fsearch-nav-btn:nth-child(4) { animation-delay: 240ms; }
@keyframes pm-sticky-pop {
    from { opacity: 0; transform: translateY(8px) scale(.8); }
    to   { opacity: 1; transform: none; }
}

html.ui-premium-anim div#stickySearch :is(.fsearch-submit-trigger, .fsearch-nav-btn) {
    transition: transform var(--pm-dur-spring) var(--pm-ease-spring), background-color 200ms ease;
}
html.ui-premium-anim div#stickySearch .fsearch-submit-trigger:hover { transform: scale(1.07); }
html.ui-premium-anim div#stickySearch .fsearch-nav-btn:hover { transform: translateY(-2px); }
html.ui-premium-anim div#stickySearch :is(.fsearch-submit-trigger, .fsearch-nav-btn):active {
    transform: scale(.92);
    transition-duration: 90ms;
}

@media (prefers-reduced-motion: reduce) {
    html.ui-premium-anim div#stickySearch,
    html.ui-premium-anim div#stickySearch.is-active {
        transform: translateX(-50%);
        transition: opacity 200ms ease;
    }
    html.ui-premium-anim div#stickySearch :is(.fsearch-submit-trigger, .fsearch-nav-btn) {
        animation: none;
        transform: none;
        transition: none;
    }
}

html.ui-premium .notif-overlay {
    background: rgba(0, 0, 0, .42);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
}

html.ui-premium .notif-overlay-inner {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 30%);
    box-shadow: var(--pm-float), 0 30px 80px -20px rgba(0, 0, 0, .35), inset 0 1px 0 var(--pm-rim);
}

html.ui-premium .notif-overlay-header {
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--pm-c) 6%, transparent), transparent);
}

html.ui-premium .notif-overlay-close {
    background-color: rgb(var(--card));
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-bottom));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -1px 0 var(--pm-rim-shade), var(--pm-small);
}

html.ui-premium .notif-overlay-close:hover {
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-hover));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -1px 0 var(--pm-rim-shade), var(--pm-lift);
}

html.ui-premium .notif-overlay-close:active {
    background-image: linear-gradient(180deg, var(--pm-raise-bottom), var(--pm-raise-bottom));
    box-shadow: inset 0 2px 4px var(--pm-rim-shade);
}

html.ui-premium .notif-overlay-mark {
    padding: .4rem .8rem;
    margin: -.4rem 0;
    border-radius: 999px;
    transition: background-color .2s, color .2s, box-shadow .2s;
}

html.ui-premium .notif-overlay-mark:hover {
    background: color-mix(in srgb, var(--pm-c) 10%, transparent);
    box-shadow: inset 0 0 0 1px var(--pm-c-ring);
}

html.ui-premium .notif-overlay-list {
    background-image: linear-gradient(90deg, transparent 70%, color-mix(in srgb, rgb(var(--fg)) 3%, transparent));
}

html.ui-premium .notif-item {
    position: relative;
}

html.ui-premium .notif-item:hover,
html.ui-premium .notif-item:focus-visible {
    background: color-mix(in srgb, rgb(var(--fg)) 5%, transparent);
}

html.ui-premium .notif-item.notif-unread {
    background: color-mix(in srgb, var(--pm-c) 6%, transparent);
}

html.ui-premium .notif-item.notif-item-active {
    background: linear-gradient(90deg, color-mix(in srgb, var(--pm-c) 16%, transparent), color-mix(in srgb, var(--pm-c) 5%, transparent));
    box-shadow: inset 3px 0 0 var(--pm-c);
}

html.ui-premium .notif-item.notif-item-active .notif-item-icon-wrap {
    color: var(--pm-c);
}

html.ui-premium .notif-unread-dot {
    box-shadow: 0 0 0 3px var(--pm-c-ring), 0 0 8px var(--pm-c-glow);
}

html.ui-premium .notif-preview-icon {
    width: 34px;
    height: 34px;
    padding: 7px;
    margin-right: .75rem;
    box-sizing: border-box;
    border-radius: 10px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--pm-c) 18%, transparent), color-mix(in srgb, var(--pm-c) 8%, transparent));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 0 0 1px var(--pm-c-ring), var(--pm-small);
}

html.ui-premium .notif-preview-icon:has(img) {
    padding: 0;
    background: none;
}

html.ui-premium .notif-preview-icon img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

html.ui-premium .notif-preview-date {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 999px;
    background: color-mix(in srgb, rgb(var(--fg)) 5%, transparent);
    box-shadow: var(--pm-inset);
}

html.ui-premium .notif-preview-link {
    padding: .55rem 1.1rem;
    border-radius: 999px;
    color: #fff;
    background-color: var(--pm-c);
    background-image: var(--pm-solid);
    box-shadow: var(--pm-solid-shadow);
}

html.ui-premium .notif-preview-link:hover {
    text-decoration: none;
    background-image: var(--pm-solid-hover);
    box-shadow: var(--pm-solid-shadow), 0 0 24px -6px var(--pm-c-glow);
}

html.ui-premium .notif-preview-action-btn {
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-bottom));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -1px 0 var(--pm-rim-shade), var(--pm-small);
}

html.ui-premium .notif-preview-action-btn:hover {
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-hover));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -1px 0 var(--pm-rim-shade), var(--pm-lift);
}

html.ui-premium .notif-preview-action-primary,
html.ui-premium .notif-preview-action-primary:hover {
    color: #fff;
    border-color: transparent;
    background-image: var(--pm-solid);
    box-shadow: var(--pm-solid-shadow);
}

html.ui-premium .notif-preview-action-primary:hover {
    filter: none;
    background-image: var(--pm-solid-hover);
    box-shadow: var(--pm-solid-shadow), 0 0 24px -6px var(--pm-c-glow);
}

html.ui-premium-anim .notif-overlay.notif-overlay-show {
    animation: pm-notif-fade 260ms ease both;
}

html.ui-premium-anim .notif-overlay-inner {
    animation: pm-notif-in 620ms var(--pm-ease-spring) both;
}

html.ui-premium-anim .notif-overlay.notif-overlay-closing {
    animation: pm-notif-fade 220ms ease reverse both;
}

html.ui-premium-anim .notif-overlay.notif-overlay-closing .notif-overlay-inner {
    animation: pm-notif-out 220ms cubic-bezier(.4, 0, 1, 1) both;
}

html.ui-premium-anim .notif-item-animate {
    animation: pm-notif-item 520ms var(--pm-ease-spring) backwards;
}

html.ui-premium-anim .notif-overlay-preview > * {
    animation: pm-notif-content 440ms var(--pm-ease-out) backwards;
}

html.ui-premium-anim .notif-overlay-preview > :nth-child(2) { animation-delay: 30ms; }
html.ui-premium-anim .notif-overlay-preview > :nth-child(3) { animation-delay: 60ms; }
html.ui-premium-anim .notif-overlay-preview > :nth-child(n+4) { animation-delay: 90ms; }

html.ui-premium-anim .notif-item {
    transition: background-color .2s, box-shadow .25s var(--pm-ease-out);
}

html.ui-premium-anim .notif-item:active {
    transform: scale(.985);
}

html.ui-premium-anim :is(.notif-overlay-close, .notif-preview-link, .notif-preview-action-btn) {
    transition: background-color .2s, box-shadow .2s, transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim .notif-overlay-close:hover { transform: rotate(90deg); }
html.ui-premium-anim :is(.notif-preview-link, .notif-preview-action-btn):hover { transform: translateY(-1px); }

html.ui-premium-anim :is(.notif-overlay-close, .notif-preview-link, .notif-preview-action-btn):active {
    transform: scale(.92);
    transition-duration: .2s, .2s, var(--pm-dur-fast);
}

@keyframes pm-notif-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes pm-notif-in {
    0%   { opacity: 0; transform: translateY(28px) scale(.94); filter: blur(10px); }
    50%  { opacity: 1; filter: blur(0); }
    100% { opacity: 1; transform: none; filter: none; }
}

@keyframes pm-notif-out {
    from { opacity: 1; transform: none; }
    to   { opacity: 0; transform: translateY(16px) scale(.96); }
}

@keyframes pm-notif-item {
    from { opacity: 0; transform: translateX(-14px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

@keyframes pm-notif-content {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

@media (max-width: 680px) {
    @keyframes pm-notif-in {
        from { transform: translateY(100%); }
        to   { transform: none; }
    }

    html.ui-premium-anim .notif-overlay-inner {
        animation: pm-notif-in 520ms var(--pm-ease-out) both;
    }

    html.ui-premium-anim .notif-overlay-preview {
        transition: transform 460ms var(--pm-ease-out);
    }
}

@media (prefers-reduced-motion: reduce) {
    html.ui-premium-anim :is(.notif-overlay, .notif-overlay-inner, .notif-item, .notif-overlay-preview > *) {
        animation: none !important;
    }
}

html.ui-premium :is(.ai-followup-chip, .chat-new-btn) {
    background-color: rgb(var(--card));
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-bottom));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -1px 0 var(--pm-rim-shade), var(--pm-small);
}

html.ui-premium :is(.ai-followup-chip, .chat-new-btn):hover {
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-hover));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -1px 0 var(--pm-rim-shade), var(--pm-lift), 0 0 0 3px var(--pm-c-ring);
}

html.ui-premium .ai-answer-text .ai-cite:hover {
    background-image: var(--pm-solid);
    box-shadow: var(--pm-solid-shadow);
}

html.ui-premium-anim :is(.ai-followup-chip, .chat-new-btn, .ai-answer-text .ai-cite) {
    transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim :is(.ai-followup-chip, .chat-new-btn):hover { transform: translateY(-2px); }
html.ui-premium-anim .ai-answer-text .ai-cite:hover { transform: scale(1.15); }

html.ui-premium-anim :is(.ai-followup-chip, .chat-new-btn):active {
    transform: scale(.95);
    transition-duration: .2s, .2s, .2s, .2s, var(--pm-dur-fast);
}

html.ui-premium-anim .ai-followups.is-visible .ai-followup-chip {
    animation: pm-sticky-pop 480ms var(--pm-ease-spring) backwards;
}
html.ui-premium-anim .ai-followups.is-visible .ai-followup-chip:nth-child(3) { animation-delay: 60ms; }
html.ui-premium-anim .ai-followups.is-visible .ai-followup-chip:nth-child(4) { animation-delay: 120ms; }

@media (prefers-reduced-motion: reduce) {
    html.ui-premium-anim .ai-followups.is-visible .ai-followup-chip { animation: none; }
}

html.ui-premium .ms-top {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 70%);
    box-shadow: inset 0 -1px 0 color-mix(in srgb, rgb(var(--border)) 70%, transparent);
}

html.ui-premium .ms-pill {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 60%);
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium .ms-pill:focus-within {
    box-shadow: var(--pm-lift), var(--pm-hairline), 0 0 0 3px var(--pm-c-ring);
}

html.ui-premium .ms-pill #searchInput,
html.ui-premium .ms-pill #searchInput:focus {
    box-shadow: none;
}

html.ui-premium .ms-submit {
    background-color: var(--pm-c);
    background-image: var(--pm-solid);
    box-shadow: var(--pm-solid-shadow);
}

html.ui-premium .ms-submit:active {
    opacity: 1;
    background-image: var(--pm-solid-press);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .22), inset 0 -1px 0 rgba(255, 255, 255, .12);
}

html.ui-premium .ms-back {
    background-color: rgb(var(--card));
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-bottom));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -1px 0 var(--pm-rim-shade), var(--pm-small);
}

html.ui-premium .ms-back:active {
    background-image: linear-gradient(180deg, var(--pm-raise-bottom), var(--pm-raise-bottom));
    box-shadow: inset 0 2px 4px var(--pm-rim-shade);
}

html.ui-premium :is(.type-chip, .ms-quick-btn) {
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-bottom));
    box-shadow: inset 0 1px 0 var(--pm-rim), var(--pm-small);
}

html.ui-premium .type-chip[aria-pressed="true"] {
    background-color: var(--pm-c);
    background-image: var(--pm-solid);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--pm-solid-shadow);
}

html.ui-premium .ms-page #suggestionsList li .sg-icon {
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-bottom));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -1px 0 var(--pm-rim-shade), var(--pm-small);
}

html.ui-premium .ms-start-logo {
    text-shadow: 0 8px 30px var(--pm-accent-soft);
}

html.ui-premium-anim :is(.ms-pill-btn, .ms-back, .type-chip, .ms-quick-btn) {
    transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, opacity .2s,
        transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim :is(.ms-pill-btn, .ms-back):active {
    transform: scale(.86);
    transition-duration: .2s, .2s, .2s, .2s, .2s, var(--pm-dur-fast);
}
html.ui-premium-anim :is(.type-chip, .ms-quick-btn):active { transform: scale(.94); }

html.ui-premium-anim .ms-bar {
    animation: pm-fade-in 360ms ease backwards;
}
html.ui-premium-anim .ms-start:not([hidden]) {
    animation: pm-fade-in 480ms ease 120ms backwards;
}

@keyframes pm-fade-in {
    from { opacity: 0; }
}

@keyframes pm-sheet-in {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

@keyframes pm-drawer-item {
    from { opacity: 0; transform: translateX(-18px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html.ui-premium-anim :is(.ms-bar, .ms-start) {
        animation: none;
    }
}

html.ui-premium .chat-user-msg {
    background-image: var(--pm-solid);
    box-shadow: var(--pm-solid-shadow);
}

html.ui-premium :is(.chat-ai-bubble .ai-response-box-inner, .chat-typing) {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 40%);
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium .chat-ai-bubble .error-msg {
    box-shadow: var(--pm-small), var(--pm-hairline);
}

html.ui-premium .chat-typing span {
    background: var(--pm-c);
}

html.ui-premium .ai-source-card:hover {
    background: color-mix(in srgb, var(--pm-c) 6%, transparent);
    box-shadow: inset 0 0 0 1px var(--pm-c-ring);
}

html.ui-premium .chat-input-wrap {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 60%);
    box-shadow: var(--pm-float), var(--pm-hairline);
}

html.ui-premium .chat-input-wrap:focus-within {
    box-shadow: var(--pm-float), var(--pm-hairline), 0 0 0 3px var(--pm-c-ring);
}

html.ui-premium .chat-send-btn:not(:disabled) {
    background-image: var(--pm-solid);
    box-shadow: var(--pm-solid-shadow);
}

html.ui-premium .chat-send-btn:hover:not(:disabled) {
    opacity: 1;
    background-image: var(--pm-solid-hover);
    box-shadow: var(--pm-solid-shadow), 0 0 22px -6px var(--pm-c-glow);
}

html.ui-premium .chat-send-btn:active:not(:disabled) {
    background-image: var(--pm-solid-press);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .22);
}

html.ui-premium .chat-empty-icon {
    filter: drop-shadow(0 0 24px var(--pm-c-glow));
}

html.ui-premium-anim .chat-turn {
    animation: none;
}

html.ui-premium-anim .chat-user-msg {
    transform-origin: 100% 100%;
    animation: pm-msg-user 460ms var(--pm-ease-spring) backwards;
}

html.ui-premium-anim .chat-ai-bubble,
html.ui-premium-anim .chat-typing {
    transform-origin: 0 0;
    animation: pm-msg-ai 560ms var(--pm-ease-spring) backwards;
}

html.ui-premium-anim .chat-ai-bubble .ai-response-box-inner {
    animation: none;
}

html.ui-premium-anim .ai-answer-after:not([style*="none"]) > * {
    animation: pm-sheet-in 480ms var(--pm-ease-spring) backwards;
}

html.ui-premium-anim .ai-answer-after > :nth-child(2) {
    animation-delay: 80ms;
}

html.ui-premium-anim .chat-empty-state {
    animation: pm-sheet-in 700ms var(--pm-ease-spring) backwards;
}

html.ui-premium-anim .chat-empty-icon {
    animation: pm-ai-float 4s ease-in-out infinite;
}

html.ui-premium-anim .chat-send-btn {
    transition: opacity .2s, background-color .2s, box-shadow .2s, transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim .chat-send-btn:hover:not(:disabled) {
    transform: translateY(-1px) rotate(-8deg);
}

html.ui-premium-anim .chat-send-btn:active:not(:disabled) {
    transform: scale(.86);
    transition-duration: .2s, .2s, .2s, var(--pm-dur-fast);
}

html.ui-premium-anim .chat-input-wrap {
    transition: border-color .25s, box-shadow .25s, transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim .chat-input-wrap:focus-within {
    transform: translateY(-2px);
}

html.ui-premium-anim .chat-memory-bar:not([hidden]) {
    animation: pm-sheet-in 420ms var(--pm-ease-spring) backwards;
}

@keyframes pm-msg-user {
    from { opacity: 0; transform: translateX(18px) scale(.9); }
    to   { opacity: 1; transform: none; }
}

@keyframes pm-msg-ai {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to   { opacity: 1; transform: none; }
}

@keyframes pm-ai-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

html.ui-premium .voice-mic-btn {
    background-image: radial-gradient(circle at 50% 30%, var(--pm-raise-top), var(--pm-raise-bottom) 75%);
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -3px 0 var(--pm-rim-shade),
        0 2px 4px rgba(0, 0, 0, .08), 0 18px 40px -12px rgba(0, 0, 0, .3);
}

html.ui-premium .voice-mic-btn:active {
    box-shadow: inset 0 3px 8px var(--pm-rim-shade), 0 2px 4px rgba(0, 0, 0, .08);
}

html.ui-premium .voice-mic-btn.listening {
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -3px 0 var(--pm-rim-shade),
        0 0 0 6px color-mix(in srgb, currentColor 14%, transparent),
        0 0 44px -6px color-mix(in srgb, currentColor 70%, transparent);
}

html.ui-premium .voice-hint {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 60%);
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium .btn-back {
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-bottom));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -1px 0 var(--pm-rim-shade), var(--pm-small);
}

html.ui-premium .btn-back:hover {
    background-image: linear-gradient(180deg, var(--pm-raise-top), var(--pm-raise-hover));
    box-shadow: inset 0 1px 0 var(--pm-rim), inset 0 -1px 0 var(--pm-rim-shade), var(--pm-lift);
}

html.ui-premium .voice-status-text {
    text-shadow: 0 10px 40px var(--pm-accent-soft);
}

html.ui-premium-anim .voice-mic-btn {
    transition: border-color .3s, box-shadow .35s, transform 560ms var(--pm-ease-bounce);
}

html.ui-premium-anim .voice-mic-btn:hover:not(.listening) {
    transform: translateY(-3px) scale(1.04);
}

html.ui-premium-anim .voice-mic-btn:active {
    transform: scale(.9);
    transition-duration: .3s, .35s, var(--pm-dur-fast);
}

html.ui-premium-anim .voice-mic-btn.listening {
    transform: scale(1.14);
}

html.ui-premium-anim .voice-mic-btn:not(.listening) .mic-icon {
    animation: pm-ai-float 3.2s ease-in-out infinite;
}

html.ui-premium-anim .voice-status-box,
html.ui-premium-anim .voice-hint {
    animation: pm-sheet-in 700ms var(--pm-ease-spring) backwards;
}

html.ui-premium-anim .voice-hint {
    animation-delay: 160ms;
}

html.ui-premium-anim .voice-mic-container {
    animation: pm-voice-in 800ms var(--pm-ease-bounce) 60ms backwards;
}

html.ui-premium-anim .transcript-active {
    animation: pm-sticky-pop 420ms var(--pm-ease-spring);
}

html.ui-premium-anim .btn-back {
    transition: background-color .2s, box-shadow .2s, transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim .btn-back:hover { transform: translateX(-2px); }
html.ui-premium-anim .btn-back:active { transform: scale(.94); }

@keyframes pm-voice-in {
    from { opacity: 0; transform: scale(.6); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html.ui-premium-anim :is(.chat-user-msg, .chat-ai-bubble, .chat-typing, .ai-answer-after > *,
        .chat-empty-state, .chat-empty-icon, .chat-memory-bar, .mic-icon, .voice-status-box,
        .voice-hint, .voice-mic-container, .transcript-active) {
        animation: none;
    }
}

html.ui-premium-anim #wiki-infobox {
    transition: opacity .3s ease, transform 640ms var(--pm-ease-spring);
}

html.ui-premium-anim #wiki-infobox.wi-closing {
    transition: opacity .26s ease, transform .32s cubic-bezier(.4, 0, 1, 1);
}

html.ui-premium-anim body.wi-sheet #wiki-infobox {
    transition: opacity .3s ease, transform 520ms var(--pm-ease-out);
}

html.ui-premium-anim #wiki-infobox.wi-visible #wikiContent > * {
    animation: pm-sheet-in 520ms var(--pm-ease-spring) backwards;
}

html.ui-premium-anim #wiki-infobox.wi-visible #wikiContent > :nth-child(1) { animation-delay: 90ms; }
html.ui-premium-anim #wiki-infobox.wi-visible #wikiContent > :nth-child(2) { animation-delay: 150ms; }
html.ui-premium-anim #wiki-infobox.wi-visible #wikiContent > :nth-child(3) { animation-delay: 210ms; }
html.ui-premium-anim #wiki-infobox.wi-visible #wikiContent > :nth-child(n+4) { animation-delay: 270ms; }

html.ui-premium-anim #wiki-infobox.wi-visible .wi-fact-row {
    animation: pm-drawer-item 460ms var(--pm-ease-spring) backwards;
}

html.ui-premium-anim #wiki-infobox.wi-visible .wi-fact-row:nth-child(1) { animation-delay: 260ms; }
html.ui-premium-anim #wiki-infobox.wi-visible .wi-fact-row:nth-child(2) { animation-delay: 300ms; }
html.ui-premium-anim #wiki-infobox.wi-visible .wi-fact-row:nth-child(3) { animation-delay: 340ms; }
html.ui-premium-anim #wiki-infobox.wi-visible .wi-fact-row:nth-child(4) { animation-delay: 380ms; }
html.ui-premium-anim #wiki-infobox.wi-visible .wi-fact-row:nth-child(n+5) { animation-delay: 420ms; }

html.ui-premium-anim .wi-thumb {
    transform: scale(.85);
    transition: opacity .4s ease, transform 560ms var(--pm-ease-bounce);
}

html.ui-premium-anim .wi-thumb.loaded {
    transform: none;
}

html.ui-premium-anim :is(.wi-close, .wi-link) {
    transition: background-color .2s, color .2s, opacity .2s, transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim .wi-close:hover { transform: rotate(90deg); }
html.ui-premium-anim .wi-close:active { transform: rotate(90deg) scale(.85); }
html.ui-premium-anim .wi-link:hover { transform: translateX(3px); }

html.ui-premium-anim #wiki-mobile-btn {
    transition: opacity .3s ease, box-shadow .2s, transform 560ms var(--pm-ease-bounce);
}

html.ui-premium-anim #wiki-mobile-btn.btn-visible:active {
    transform: scale(.88);
    transition-duration: .3s, .2s, var(--pm-dur-fast);
}

html.ui-premium #home-widgets .hw-card {
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 55%);
    box-shadow: var(--pm-lift), var(--pm-hairline);
}

html.ui-premium .hw-now-icon svg {
    filter: drop-shadow(0 0 10px var(--pm-accent-soft));
}

html.ui-premium .hw-article-img {
    box-shadow: var(--pm-small);
}

html.ui-premium .hw-cat {
    background-color: rgb(var(--card));
    background-image: linear-gradient(180deg, var(--pm-sheen), transparent 60%);
    box-shadow: var(--pm-small), var(--pm-hairline);
}

html.ui-premium .hw-cat:hover {
    box-shadow: var(--pm-lift), var(--pm-hairline), 0 0 10px var(--pm-accent-soft);
}

html.ui-premium-anim #home-widgets .hw-card {
    animation: pm-rise 640ms var(--pm-ease-spring) backwards;
}

html.ui-premium-anim #home-widgets .hw-card:nth-child(2) { animation-delay: 70ms; }
html.ui-premium-anim #home-widgets .hw-card:nth-child(3) { animation-delay: 140ms; }

html.ui-premium-anim #home-widgets .hw-card:not(.hw-skeleton) > * {
    animation: pm-sheet-in 520ms var(--pm-ease-spring) backwards;
}

html.ui-premium-anim #home-widgets .hw-card:not(.hw-skeleton) > :nth-child(2) { animation-delay: 60ms; }
html.ui-premium-anim #home-widgets .hw-card:not(.hw-skeleton) > :nth-child(n+3) { animation-delay: 120ms; }

html.ui-premium-anim #home-widgets .hw-card:not(.hw-skeleton) :is(.hw-article, .hw-fx-row) {
    animation: pm-drawer-item 460ms var(--pm-ease-spring) backwards;
}

html.ui-premium-anim #home-widgets .hw-card:not(.hw-skeleton) :is(.hw-article, .hw-fx-row):nth-child(1) { animation-delay: 140ms; }
html.ui-premium-anim #home-widgets .hw-card:not(.hw-skeleton) :is(.hw-article, .hw-fx-row):nth-child(2) { animation-delay: 190ms; }
html.ui-premium-anim #home-widgets .hw-card:not(.hw-skeleton) :is(.hw-article, .hw-fx-row):nth-child(n+3) { animation-delay: 240ms; }

html.ui-premium-anim #home-widgets .hw-card:not(.hw-skeleton) .hw-now-icon {
    animation: pm-dot-pop 560ms var(--pm-ease-bounce) 120ms backwards;
}

html.ui-premium-anim .hw-day {
    transition: transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim .hw-day:hover { transform: translateY(-2px); }

html.ui-premium-anim :is(.hw-cat, .hw-article-img img) {
    transition: transform var(--pm-dur-spring) var(--pm-ease-spring), box-shadow .2s, color .15s, border-color .15s;
}

html.ui-premium-anim .hw-cat:hover { transform: translateY(-2px); }

html.ui-premium-anim .hw-cat:active {
    transform: scale(.94);
    transition-duration: var(--pm-dur-fast);
}

html.ui-premium-anim .hw-article:hover .hw-article-img img { transform: scale(1.06); }

html.ui-premium-anim .hw-head a {
    display: inline-block;
    transition: transform var(--pm-dur-spring) var(--pm-ease-spring);
}

html.ui-premium-anim .hw-head a:hover { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
    html.ui-premium-anim #home-widgets .hw-card,
    html.ui-premium-anim #home-widgets .hw-card *,
    html.ui-premium-anim :is(.hw-cat, .hw-day, .hw-article-img img, .hw-head a) {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}
