/* The settings gear shares the same neutral color as the theme control. */
html body.v54-shell #siteHeader #vine-prefs-button,
html body.v54-shell #siteHeader #vine-prefs-button:is(:hover, :focus-visible, :active) {
    color: var(--ui-muted, #566477) !important;
}
html body.v54-shell #siteHeader #vine-prefs-button:focus-visible {
    outline: 2px solid var(--ui-accent, #487fe1) !important;
    outline-offset: 2px;
}

/* Keep the rail identity above the scrolling list, even at browser zoom. */
html body.v54-admin .studio-dashboard-heading {
    box-sizing: border-box;
    padding: clamp(14px, 1.6vw, 24px) !important;
}
html body.v54-admin .studio-dashboard-heading > .btn.alt {
    border: 1px solid var(--ui-border) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}
html body.v54-admin .vine-admin-sidebar > .r46-sidebar-heading {
    min-width: 0;
    flex: 0 0 auto;
    align-items: center;
    color: var(--ui-ink);
    line-height: 1.4;
}
html body.v54-admin .vine-admin-sidebar > .r46-sidebar-heading > .r46-sidebar-symbol {
    flex: 0 0 34px;
}
html body.v54-admin .vine-admin-sidebar > .r46-sidebar-heading > div {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}
html body.v54-admin .vine-admin-sidebar > .vine-admin-scroll {
    flex: 1 1 auto;
    min-height: 0;
}
@media (max-height: 520px) {
    html body.v54-admin:not(.v10-observer) .vine-admin-sidebar {
        position: static !important;
        top: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    html body.v54-admin .vine-admin-sidebar > .vine-admin-scroll {
        overflow: visible;
        overscroll-behavior-y: auto;
    }
}

/* Geometry is independent of the wallpaper's loading state. */
html body.v54-shell main.v54-main .v54-about {
    max-width: 1180px;
    margin-inline: auto;
}
html[data-vine-wallpaper-warm] #vine-wallpaper img {
    transition: none;
}

/* Mobile browser chrome changes the visible height while scrolling. Keep
   the page minimum and the backdrop crop independent of that change. */
@media (max-width: 760px), (pointer: coarse) {
    html body.v54-shell, html body.v54-shell.v60-glass {
        min-block-size: 100svh;
    }
    .v54-shell .v54-main {
        min-height: calc(100svh - 170px);
    }
    html:not(.v62-glass-on)[data-vine-wallpaper]:not([data-vine-wallpaper=off]) #vine-wallpaper {
        inset: 0 0 auto;
        height: 100vh;
        height: 100lvh;
    }
    html:not(.v62-glass-on)[data-vine-wallpaper=photo] #vine-wallpaper small {
        position: fixed;
    }
}

/* Touch scrolling can leave :hover on the last app row under the finger. */
@media (hover: none) {
    html:not(.v62-glass-on) body.v54-shell main.v54-main #vine-account-revised #account-apps .v54-app:hover,
    html:not(.v62-glass-on) body.v54-shell main.v54-main #vine-account-revised #vine-account-applications .a46-utilities > a:hover {
        background: transparent !important;
    }
}

/* Normal light and dark themes share layout and material geometry. */
html:not(.v62-glass-on)[data-vine-wallpaper=photo] {
    --vine-wallpaper-veil: radial-gradient(ellipse at 50% 40%, rgba(14,27,41,.02) 25%, rgba(14,27,41,.17) 100%);
    --vine-photo-panel: rgba(226,238,244,.72);
    --vine-photo-workspace: rgba(226,238,244,.77);
    --vine-photo-inset: rgba(247,251,254,.14);
    --vine-photo-edge: rgba(255,255,255,.36);
    --vine-photo-shadow: 0 8px 28px rgba(14,27,41,.13);
    --vine-photo-header: rgba(231,241,245,.69);
    --vine-photo-header-edge: rgba(255,255,255,.36);
    --vine-photo-home-panel: rgba(226,238,244,.66);
    --vine-photo-ink: #182739;
    --vine-photo-muted: #223246;
    --vine-photo-border: rgba(39,64,87,.23);
    --vine-photo-link: #102a66;
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v62-home-page {
    --vine-photo-panel: rgba(233,242,247,.81);
    --vine-photo-workspace: rgba(233,242,247,.86);
    --vine-photo-edge: rgba(255,255,255,.43);
}
html[data-theme=dark]:not(.v62-glass-on)[data-vine-wallpaper=photo] {
    --vine-photo-panel: rgba(19,31,44,.72);
    --vine-photo-workspace: rgba(19,31,44,.77);
    --vine-photo-inset: rgba(10,19,29,.20);
    --vine-photo-edge: rgba(183,207,230,.24);
    --vine-photo-shadow: 0 8px 28px rgba(0,0,0,.23);
    --vine-photo-header: rgba(18,30,43,.69);
    --vine-photo-header-edge: rgba(183,207,230,.24);
    --vine-photo-home-panel: rgba(17,29,42,.66);
    --vine-photo-ink: #edf5ff;
    --vine-photo-muted: #d3e2f2;
    --vine-photo-border: rgba(183,207,230,.25);
    --vine-photo-link: #bcd9ff;
}
html[data-theme=dark]:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v62-home-page {
    --vine-photo-panel: rgba(19,31,44,.81);
    --vine-photo-workspace: rgba(19,31,44,.86);
    --vine-photo-edge: rgba(183,207,230,.31);
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell
    :is(#siteHeader, main.v54-main, .v54-site-footer) {
    --ui-ink: var(--vine-photo-ink);
    --ui-muted: var(--vine-photo-muted);
    --ui-border: var(--vine-photo-border);
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell #siteHeader {
    background: var(--vine-photo-header) !important;
    border-bottom-color: var(--vine-photo-header-edge);
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell #siteHeader .v54-mobile-links {
    background: var(--vine-photo-workspace) !important;
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell .v54-site-footer .v60-icp {
    padding-inline: 12px;
    border-radius: 12px;
    background: var(--vine-photo-panel) !important;
}

/* Keep the existing layout and add a readable surface to each primary panel. */
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
    :is(#homePage :is(.v65-home-copy, .v69-home-reading, .v65-home-specimen, .v64-cloud),
        .v54-about > :is(.r53-about-header, .r53-about-section, .r53-about-apps),
        .v54-account > :is(.v54-page-heading, .v54-account-overview, .v54-section-nav, .a46-details,
            .vine-account-profile, .account-orders, #my-tickets, #support-ticket),
        .v54-account :is(.v54-section-heading, .v54-app, .a46-utilities > a),
        .v69-feed :is(.v54-page-heading, .v69-feed-support, .v69-feed-qr),
        .authv3-card, .auth-card, .vc-wrap, .studio-content > article.card,
        .studio-dashboard-heading, .studio-metrics > article, .studio-todo-strip, .studio-directory-card),
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main > .vine-admin-sidebar {
    box-sizing: border-box;
    background: var(--vine-photo-panel) !important;
    border: 1px solid var(--vine-photo-edge) !important;
    border-radius: 22px;
    box-shadow: var(--vine-photo-shadow) !important;
}

html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
    :is(#homePage :is(.v65-home-copy, .v69-home-reading),
        .v54-about > :is(.r53-about-header, .r53-about-section, .r53-about-apps), .v69-feed .v54-page-heading,
        .vc-wrap, .studio-dashboard-heading) {
    padding: clamp(16px, 2.3vw, 36px);
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
    .v54-about > :is(.r53-about-section, .r53-about-apps) {
    margin-block-start: clamp(12px, 1.5vw, 22px);
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main .v54-account {
    max-width: 1240px !important;
    margin-inline: auto !important;
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
    .v54-account :is(.v54-account-overview, .a46-overview, .a46-details) {
    background: var(--vine-photo-panel) !important;
    border: 1px solid var(--vine-photo-edge) !important;
    border-radius: 22px;
    color: var(--ui-ink);
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main .v54-account .a46-details {
    padding-inline: clamp(14px, 1.5vw, 22px);
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
    .v54-account :is(.v54-page-heading, .v54-section-heading, .account-orders, #my-tickets) {
    padding: clamp(14px, 1.5vw, 22px);
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
    .v54-account .v54-section-nav {
    padding-inline: clamp(12px, 1.5vw, 22px);
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main .v69-feed .v54-page-heading {
    max-width: none;
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
    :is(.authv3-card, .auth-card, .studio-content > article.card) {
    --vine-photo-panel: var(--vine-photo-workspace);
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
    :is(.v69-home-reading, .v54-about, .v69-feed .v54-page-heading, .studio-content > article.card) {
    --ui-accent: var(--vine-photo-link);
}

/* Let the wallpaper show between dedicated sections. Other pages get one readable
   content surface. Dense tables and the course grid avoid large live blur layers. */
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell:not(.v62-home-page) main.v54-main > .studio-content {
    box-sizing: border-box;
    background: var(--vine-photo-workspace);
    border-radius: 22px;
    padding: clamp(14px, 1.6vw, 24px);
}
@supports selector(.studio-content:has(> *)) {
    html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell:not(.v62-home-page)
        main.v54-main > .studio-content:has(> :is(.v54-about, .v54-account, .v69-feed, .authv3-page,
            .auth-wrap, .vc-wrap, .studio-dashboard, article.card)) {
        padding: 0;
        background: transparent;
    }
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell
    :is(main.vsp-page, main.v54-main:has(#vine-schedule-editor)) > .studio-content {
    padding: 0;
    border-radius: 0;
}

html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
    .v54-account :is(.account-orders .card, #my-tickets .card) {
    background: var(--vine-photo-inset) !important;
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
    .v54-account :is(.v54-account-overview, .a46-overview) :is(.v54-profile, .v54-cloud-status) {
    background: transparent !important;
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main .studio-directory-card header {
    background: transparent !important;
}

@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
    html:not(.v62-glass-on, [data-vine-lowend="1"])[data-vine-wallpaper=photo] body.v54-shell main.v54-main
        #homePage :is(.v65-home-copy, .v69-home-reading, .v65-home-specimen, .v64-cloud) {
        --vine-photo-panel: var(--vine-photo-home-panel);
        background-image: linear-gradient(155deg, rgba(255,255,255,.08), transparent) !important;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
    html:not(.v62-glass-on, [data-vine-lowend="1"])[data-vine-wallpaper=photo] body.v54-shell main.v54-main
        :is(.v54-about > .r53-about-header, .v54-account > .v54-account-overview, .v69-feed-support, .authv3-card) {
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }
}

/* The existing theme controller owns the timing for the added surfaces too. */
@media (prefers-reduced-motion: no-preference) {
    html.v66-palette-change:not(.v62-glass-on) body.v54-shell
        :is(#siteHeader,.v54-mobile-links,.v54-main > .studio-content,.vine-admin-sidebar,
            .v54-about > :is(.r53-about-header,.r53-about-section,.r53-about-apps),
            .v69-feed :is(.v54-page-heading,.v69-feed-support,.v69-feed-qr),
            .studio-dashboard-heading,.studio-metrics > article,.studio-todo-strip,.studio-directory-card,
            .authv3-card,.auth-card,.vc-wrap,.studio-content > article.card,
            #vine-account-revised > :is(.vine-account-panel,#watch-device)) {
        transition-property: background-color,border-color,color !important;
        transition-duration: var(--vine-palette-ms,360ms) !important;
        transition-timing-function: cubic-bezier(.333333,0,.666667,1) !important;
    }
    html.v66-palette-change:not(.v62-glass-on) body.v54-shell main.v54-main
        :is(.studio-dashboard,#vine-account-revised,.v54-about,.v69-feed)
        :is(a,span,small,dt,dd,label,strong) {
        transition: color var(--vine-palette-ms,360ms) cubic-bezier(.333333,0,.666667,1) !important;
    }
}
/* Commit homepage ink and its surface together. Interpolating opposite
   palettes independently makes the heading unreadable halfway through. */
html:not(.v62-glass-on) body.v54-shell main.v54-main #homePage {
    color: var(--ui-ink);
}
html.v66-palette-change:not(.v62-glass-on) body.v54-shell main.v54-main #homePage,
html.v66-palette-change:not(.v62-glass-on) body.v54-shell main.v54-main #homePage
    :is(.v65-home-copy,.v69-home-reading,.v65-home-specimen,.v64-cloud),
html.v66-palette-change:not(.v62-glass-on) body.v54-shell main.v54-main #homePage
    :is(.v65-home-copy,.v69-home-reading,.v65-home-specimen,.v64-cloud) * {
    transition-property: border-color, box-shadow !important;
}
/* One interpolated value controls the homepage panels and their text.
   Discrete ink avoids fading through mid-grey and follows reversed toggles. */
@property --vine-home-tone {
    syntax: "<number>";
    inherits: false;
    initial-value: 0;
}
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
    @supports (color: color-mix(in srgb, black calc(round(nearest, .4, 1) * 100%), white)) and
        (transition-timing-function: linear(0, .5 50%, 1)) {
        html:not(.v62-glass-on) body.v54-shell main.v54-main #homePage {
            --vine-home-tone: 0;
            --vine-home-tint: calc(var(--vine-home-tone) * 100%);
            --vine-home-ink: calc(round(nearest, var(--vine-home-tone), 1) * 100%);
            --ui-ink: color-mix(in srgb, #f2f2f2 var(--vine-home-ink), #202d3d);
            --ui-muted: color-mix(in srgb, #b6b6b6 var(--vine-home-ink), #566477);
            --ui-soft: color-mix(in srgb, #222 var(--vine-home-tint), #f6f8fb);
        }
        html[data-theme=dark]:not(.v62-glass-on) body.v54-shell main.v54-main #homePage {
            --vine-home-tone: 1;
        }
        html.v66-palette-change:not(.v62-glass-on) body.v54-shell main.v54-main #homePage {
            transition: --vine-home-tone var(--vine-palette-ms,360ms)
                linear(0, .18 36%, .32 45%, .5 50%, .68 55%, .82 64%, 1) !important;
        }
        html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main #homePage {
            --ui-ink: color-mix(in srgb, #edf5ff var(--vine-home-ink), #182739);
            --ui-muted: color-mix(in srgb, #d3e2f2 var(--vine-home-ink), #223246);
            --vine-photo-link: color-mix(in srgb, #bcd9ff var(--vine-home-ink), #102a66);
            --vine-photo-panel: color-mix(in srgb, rgba(19,31,44,.81) var(--vine-home-tint), rgba(233,242,247,.81));
            --vine-photo-home-panel: color-mix(in srgb, rgba(17,29,42,.66) var(--vine-home-tint), rgba(226,238,244,.66));
        }
    }
}
@media (max-width: 480px) {
    html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
        :is(#homePage :is(.v65-home-copy, .v69-home-reading, .v65-home-specimen, .v64-cloud),
            .v54-about > :is(.r53-about-header, .r53-about-section, .r53-about-apps),
            .v69-feed :is(.v54-page-heading, .v69-feed-support, .v69-feed-qr), .authv3-card) {
        border-radius: 18px;
    }
}

/* Site navigation leaves the shared header and scene out of page transitions. */
@view-transition { navigation: none; }

html body.v54-shell main.v54-main,
html body.v54-shell #homePage {
    animation: none !important;
}

/* Older templates may still emit the node outside the header. */
html body.v54-shell #vine-nav-status {
    top: calc(77px + env(safe-area-inset-top)) !important;
    right: max(14px, env(safe-area-inset-right)) !important;
    left: auto !important;
    transform: none !important;
}
@media (max-width: 900px) {
    html body.v54-shell #vine-nav-status { top: calc(73px + env(safe-area-inset-top)) !important; }
}
html.v62-glass-on body.v54-shell #vine-nav-status {
    top: calc(81px + env(safe-area-inset-top)) !important;
    right: max(18px, calc((100% - 1200px) / 2 + 18px)) !important;
}
@media (max-width: 620px) {
    html.v62-glass-on body.v54-shell #vine-nav-status { top: calc(77px + env(safe-area-inset-top)) !important; }
}
html body.v54-shell #vine-nav-status .v10-spinner {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
}
html body.v54-shell .v54-site-footer .v60-icp { font-size: 15px; }

/* The server places the original status under the header for first paint. */
html body.v54-shell #siteHeader > #vine-nav-status {
    position: absolute !important;
    top: calc(100% + 9px) !important;
    bottom: auto !important;
    right: max(14px, env(safe-area-inset-right)) !important;
    left: auto !important;
    transform: none !important;
}
html.v62-glass-on body.v54-shell #siteHeader > #vine-nav-status {
    right: max(18px, calc((100% - 1200px) / 2 + 18px)) !important;
}

/* Keep the canvas width independent of whether the document needs a scrollbar. */
html.v62-glass-on body.v54-shell #vineGlassScene {
    width: 100vw;
    inline-size: 100vw;
    max-width: none;
    max-inline-size: none;
}

/* Paint the cached scene only once, on the same surface and with the same
   palette as the live canvas. The legacy root image is redundant here. */
html.v62-glass-on:is([data-theme="light"][data-vine-scene-carried="light"],[data-theme="dark"][data-vine-scene-carried="dark"]) {
    background-image: none !important;
}
html.v62-glass-on:is([data-theme="light"][data-vine-scene-carried="light"],[data-theme="dark"][data-vine-scene-carried="dark"])
    body.v54-shell #vineGlassScene {
    background-image: var(--vine-carried-scene) !important;
    background-color: transparent !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
html.v62-glass-on:is([data-theme="light"][data-vine-scene-carried="light"],[data-theme="dark"][data-vine-scene-carried="dark"])
    body.v54-shell::before {
    content: none !important;
}
html.v62-glass-on:is([data-theme="light"][data-vine-scene-carried="light"],[data-theme="dark"][data-vine-scene-carried="dark"])
    body.v54-shell:not([data-v66-backdrop-ready]) #vineGlassScene {
    opacity: 1;
}
html.v62-glass-on[data-theme="dark"][data-vine-scene-carried="dark"]
    body.v54-shell:not([data-v66-backdrop-ready]) #vineGlassVeil { opacity: 0; }
html.v62-glass-on[data-theme="dark"][data-vine-scene-carried="dark"]
    body.v54-shell:not([data-v66-backdrop-ready]) #vineGlassVeilDark { opacity: 1; }
html.v62-glass-on:is([data-theme="light"][data-vine-scene-carried="light"],[data-theme="dark"][data-vine-scene-carried="dark"])[data-vine-startup="waiting"] #vine-startup {
    background: transparent !important;
}
@media (forced-colors: active) {
    html.v62-glass-on[data-theme][data-vine-scene-carried] body.v54-shell #vineGlassScene {
        background-image: none !important;
    }
    html.v62-glass-on[data-theme][data-vine-scene-carried][data-vine-startup="waiting"] #vine-startup {
        background: Canvas !important;
    }
}

/* Vine Cloud landing: the photo wallpaper already styles the outer card. */
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
    .vc-wrap > section.vc-cloud-simple {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Vine Cloud photo wallpaper: only the outer container draws a surface. */
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
    .vc-wrap > section.vc-cloud-simple {
    display: contents !important;
}
html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
    .vc-wrap > section.vc-cloud-simple > .vc-cloud-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
    min-height: 260px;
    padding: 46px;
}
@media (max-width: 760px) {
    html:not(.v62-glass-on)[data-vine-wallpaper=photo] body.v54-shell main.v54-main
        .vc-wrap > section.vc-cloud-simple > .vc-cloud-copy {
        padding: 32px 24px;
    }
}
