/* 透明感：零填色的桌面入口 + 冷调磨砂背景。
   75% blur is mapped to 30px on the theme's 0–40px scale. Backdrop filters
   never blur foreground icons/text; shortcut hit areas retain their geometry. */
html[data-global-beautify="1"][data-global-beautify-style="transparent"] {
    --lmt-blur: 30px;
    --lmt-ink: var(--lmg-text, #253541);
    --lmt-accent: var(--lmg-button-text, #344d60);
    --lmt-edge: rgba(255, 255, 255, .38);
    --lmt-line: rgba(52, 77, 96, .2);
    --lmt-halo: 0 1px 2px rgba(255, 255, 255, .85), 0 0 7px rgba(255, 255, 255, .55);
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen {
    --dlw-ink: var(--lmt-ink);
    --dlw-muted: var(--lmt-ink);
    --dlw-surface: transparent;
    --dlw-soft: transparent;
    --dlw-edge: var(--lmt-edge);
    --dlw-line: var(--lmt-line);
    --dlw-accent: var(--lmt-accent);
    --ss2-text: var(--lmt-ink);
    --ss2-text-dim: var(--lmt-ink);
    --ss2-accent: var(--lmt-accent);
    --ss3-card-bg: transparent;
    --ss3-card-border: var(--lmt-edge);
    --ss3-card-shadow: transparent;
    --ss3-text: var(--lmt-ink);
    --ss3-muted: var(--lmt-ink);
    --ss3-accent: var(--lmt-accent);
    --ss3-accent-2: var(--lmt-accent);
    color: var(--lmt-ink);
}

/* A completely clear hit area across all five pages, including the dock. */
html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen :is(
    .function-item, .nav-item, .sub-screen-action,
    .ss2sc-tile:not(.ss2sc-tile--placeholder), .ss2mm-tile:not(.ss2mm-tile--placeholder)
) {
    background: transparent !important;
    border-color: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    opacity: 1;
    color: var(--lmt-ink);
    -webkit-tap-highlight-color: transparent;
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen :is(
    .function-icon, .nav-icon, .sub-screen-action-icon, .ss2sc-icon, .ss2mm-icon
) {
    position: relative;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    opacity: 1;
    color: var(--lmt-ink);
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen :is(
    .function-icon img, .nav-icon img, .sub-screen-action-icon img,
    .ss2sc-icon img, .ss2mm-icon img
) {
    opacity: 1 !important;
    filter: none;
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen :is(
    .function-name, .nav-name, .sub-screen-action-label, .ss2sc-label, .ss2mm-label,
    .ss3sf-shortcut-label
) {
    color: var(--lmt-ink);
    opacity: 1 !important;
    font-weight: 500;
    text-shadow: var(--lmt-halo);
    filter: none;
}

/* Only generated line art receives the mask. Uploaded custom icons keep their
   original image, colors and crop. The image is a fallback for old WebViews. */
html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .lmg-transparent-line-icon,
html[data-global-beautify="1"][data-global-beautify-style="transparent"] #main-float-btn.lmg-transparent-line-icon,
.theme-global-beautify-preview[data-preview-style="transparent"] .lmg-transparent-line-icon {
    position: relative !important;
    background: transparent !important;
    border-radius: 0 !important;
    color: var(--lmt-ink, var(--preview-text, #253541));
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .lmg-transparent-line-icon img,
html[data-global-beautify="1"][data-global-beautify-style="transparent"] #main-float-btn.lmg-transparent-line-icon img {
    object-fit: contain !important;
    border-radius: 0 !important;
    opacity: 1 !important;
}

@supports ((mask-image: linear-gradient(black, black)) or (-webkit-mask-image: linear-gradient(black, black))) {
    html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .lmg-transparent-line-icon::before,
    html[data-global-beautify="1"][data-global-beautify-style="transparent"] #main-float-btn.lmg-transparent-line-icon::before,
    .theme-global-beautify-preview[data-preview-style="transparent"] .lmg-transparent-line-icon::before {
        content: '';
        position: absolute;
        inset: 10%;
        display: block;
        z-index: 2;
        background: currentColor;
        -webkit-mask-image: var(--lmg-line-icon-image);
        mask-image: var(--lmg-line-icon-image);
        -webkit-mask-position: center;
        mask-position: center;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-size: contain;
        mask-size: contain;
        opacity: 1;
        pointer-events: none;
        filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .68));
    }

    html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .lmg-transparent-line-icon img,
    html[data-global-beautify="1"][data-global-beautify-style="transparent"] #main-float-btn.lmg-transparent-line-icon img {
        visibility: hidden !important;
    }

    .theme-global-beautify-preview[data-preview-style="transparent"] .lmg-transparent-line-icon {
        background-image: none !important;
    }
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen :is(
    .function-item, .nav-item, .sub-screen-action, .ss2sc-tile, .ss2mm-tile
):focus-visible {
    outline: 2px solid var(--lmt-accent);
    outline-offset: 3px;
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen :is(
    .function-item, .nav-item, .sub-screen-action, .ss2sc-tile, .ss2mm-tile
):active {
    opacity: 1;
    transform: scale(.96);
}

/* Keep the dock optically clear as well as unpainted. A local backdrop blur
   would sample the blue wallpaper into a visible plate even at zero fill. */
html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen > .bottom-nav {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    opacity: 1;
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen > .status-bar {
    color: var(--lmt-ink);
    background: transparent;
    text-shadow: var(--lmt-halo);
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .home-desktop-page-indicator {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .home-desktop-page-dot {
    background: var(--lmt-ink);
    box-shadow: none;
}

/* Keep personal photo layers intact. Only card shells and text surfaces clear. */
html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen :is(
    .main-card, .card-content, .dlw-time-card, .dlw-checklist, .dlw-keepsake,
    .ss2cn-card, .ss2ab-sleeve, .ss3sf-card, .sub-screen-calendar-widget,
    .sub-screen-note-card, .sub-screen-film, .wechat-memory-calendar-card,
    .sub-screen-trio-frame, .dlw-photo-mosaic
) {
    background: transparent;
    color: var(--lmt-ink);
    border-color: var(--lmt-edge);
    box-shadow: none;
    -webkit-backdrop-filter: blur(var(--lmt-blur));
    backdrop-filter: blur(var(--lmt-blur));
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .main-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen :is(.dlw-time-card, .dlw-keepsake) {
    --dlw-surface: transparent;
    --dlw-ink: var(--lmt-ink);
    --dlw-muted: var(--lmt-ink);
    --dlw-line: var(--lmt-line);
    --dlw-time-fill: #9aafbe;
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .dlw-period-track {
    background: rgba(70, 93, 110, .14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .horoscope-card {
    --horoscope-ink: var(--lmt-ink);
    --horoscope-muted: var(--lmt-ink);
    --horoscope-body: var(--lmt-ink);
    --horoscope-faint: var(--lmt-line);
    --horoscope-track: rgba(70, 93, 110, .14);
    --horoscope-fill: #9aafbe;
    --horoscope-glass: transparent;
    --horoscope-glass-fallback: transparent;
    --horoscope-edge: var(--lmt-edge);
    --horoscope-icon-bg: transparent;
    --horoscope-icon-edge: transparent;
    --horoscope-shadow: none;
    --horoscope-shadow-hover: none;
    --horoscope-text-shadow: var(--lmt-halo);
    background: transparent;
    border-color: var(--lmt-edge);
    box-shadow: none;
    -webkit-backdrop-filter: blur(var(--lmt-blur));
    backdrop-filter: blur(var(--lmt-blur));
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .ss2cn-card,
html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen #desktop-couple-slot .ss2cn-card {
    --ss2cn-surface: transparent;
    --ss2cn-text: var(--lmt-ink);
    --ss2cn-text-dim: var(--lmt-ink);
    --ss2cn-accent: var(--lmt-accent);
    --ss2cn-heart: var(--lmt-accent);
    background: transparent;
    border-color: var(--lmt-edge);
    box-shadow: none;
    -webkit-backdrop-filter: blur(var(--lmt-blur));
    backdrop-filter: blur(var(--lmt-blur));
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .sub-screen-calendar-widget {
    --scw-ink-light: var(--lmt-ink);
    --scw-ink-dark: var(--lmt-ink);
    --scw-accent: var(--lmt-accent);
    --scw-line-light: var(--lmt-line);
    --scw-line-dark: var(--lmt-line);
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .mre-bar {
    background: transparent;
    opacity: 1;
    border-color: var(--lmt-edge);
    box-shadow: none;
    -webkit-backdrop-filter: blur(var(--lmt-blur));
    backdrop-filter: blur(var(--lmt-blur));
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .mre-bar .mre-bar-text {
    color: var(--lmt-ink);
    text-shadow: var(--lmt-halo);
    opacity: 1;
}

/* Flat mode still owns the performance filters. Its generic contrast-fill
   compensation must not repaint this theme's clear desktop surfaces. */
html.lovemi-flat-glass[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen > .status-bar,
html.lovemi-flat-glass[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .mre-bar {
    background: transparent !important;
}

/* The keepsake/daybook editor mounts under #app, floating over every desktop
   page. A fully clear sheet lets the sub-screen show through and turns the
   dialog unreadable, so it keeps an 85% opaque frost (the theme's #edf3f7
   panel tone) and 85% blur — 34px on the theme's 0–40px scale. Scoping to #app
   outranks the generic/dark token rules that bind :is(#home-screen,
   .dlw-editor-overlay). */
html[data-global-beautify="1"][data-global-beautify-style="transparent"] #app .dlw-editor-overlay {
    --dlw-surface: rgba(237, 243, 247, .85);
    --dlw-soft: rgba(255, 255, 255, .5);
    --dlw-ink: var(--lmt-ink);
    --dlw-muted: var(--lmt-ink);
    --dlw-line: var(--lmt-line);
    --dlw-edge: var(--lmt-edge);
    --dlw-accent: var(--lmt-accent);
}

html[data-global-beautify="1"][data-global-beautify-style="transparent"] #app .dlw-editor-sheet {
    -webkit-backdrop-filter: blur(34px);
    backdrop-filter: blur(34px);
}

/* Preserve the record/cover and arm; theme only the turntable's existing tokens. */
html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen .music-player-card,
html[data-global-beautify="1"][data-global-beautify-style="transparent"] .main-music-island .music-player-card {
    --mp-deck-bg: transparent;
    --mp-deck-border: var(--lmt-edge);
    --mp-deck-border-width: 1px;
    --mp-deck-shadow: none;
    --mp-deck-filter: blur(var(--lmt-blur));
    --mp-deck-text: var(--lmt-ink);
    --mp-deck-muted: var(--lmt-ink);
    --mp-deck-faint: var(--lmt-ink);
    --mp-deck-text-shadow: var(--lmt-halo);
    --mp-base-bg: transparent;
    --mp-base-border: var(--lmt-edge);
    --mp-base-shadow: none;
    --mp-base-filter: blur(var(--lmt-blur));
    --mp-icon: var(--lmt-ink);
    --mp-icon-muted: var(--lmt-ink);
    --mp-slider-track: rgba(70, 93, 110, .14);
    --mp-slider-fill: var(--lmt-accent);
    --mp-chip-bg: transparent;
    --mp-heart: #a6b6c0;
    --mp-heart-active: var(--lmt-accent);
    --mp-menu-bg: #edf3f7;
    --mp-menu-text: #253541;
    --mp-menu-muted: #425a6b;
    --mp-menu-border: #b8c8d2;
    --mp-menu-active-bg: #344d60;
    --mp-menu-active-text: #fff;
    --mp-focus: var(--lmt-accent);
}

/* Preview works before the theme is applied and shares the generated glyphs. */
.theme-global-beautify-preview[data-preview-style="transparent"] :is(
    .theme-global-beautify-preview-btn, .theme-global-beautify-preview-dot,
    .theme-global-beautify-preview-dock, .theme-global-beautify-preview-sub
) {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
    opacity: 1;
}

.theme-global-beautify-preview[data-preview-style="transparent"] :is(
    .theme-global-beautify-preview-btn, .theme-global-beautify-preview-dot
) {
    background-size: contain;
    border-radius: 0;
    color: var(--preview-text, #253541);
}

/* The generated wallpaper already contains the frost, so old WebViews can
   retain clear surfaces and opaque foregrounds without painting a fallback tile. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen :is(
        .dlw-time-card, .dlw-keepsake, .ss2cn-card, .sub-screen-calendar-widget, .horoscope-card
    ) {
        background: transparent;
    }
}

@media (prefers-reduced-transparency: reduce) {
    html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen :is(
        .card-content, .dlw-time-card, .dlw-checklist, .dlw-keepsake, .ss2cn-card,
        .ss2ab-sleeve, .ss3sf-card, .sub-screen-calendar-widget, .horoscope-card, .mre-bar
    ) {
        background: #edf3f7;
        color: #253541;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    html[data-global-beautify="1"][data-global-beautify-style="transparent"] #app .dlw-editor-sheet {
        background: #edf3f7;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html[data-global-beautify="1"][data-global-beautify-style="transparent"] #home-screen :is(
        .function-item, .nav-item, .sub-screen-action, .ss2sc-tile, .ss2mm-tile
    ) {
        transition: none;
    }
}
