/* ==========================================================================
   Pixel Gallery - Floating Liquid Glass Profile Capsule (Shared: Landing & Album)
   ========================================================================== */

.pg-floating-profile-pill,
.pg-floating-tabs-pill {
    --pg-fp-base-r: 24px;
    --pg-fp-tl: 24px;
    --pg-fp-tr: 24px;
    --pg-fp-br: 24px;
    --pg-fp-bl: 24px;
    --pg-fp-tl-v: 24px;
    --pg-fp-tr-v: 24px;
    --pg-fp-br-v: 24px;
    --pg-fp-bl-v: 24px;
    --pg-fp-tx: 0px;
    --pg-fp-ty: 0px;
    --pg-fp-sx: 1;
    --pg-fp-sy: 1;
    --pg-fp-rot: 0deg;
    --pg-fp-skew: 0deg;
    --pg-fp-cx: 0px;
    --pg-fp-cy: 0px;
    --pg-fp-glint-x: 0px;
    --pg-fp-glint-y: 0px;
    --pg-fp-fluid-x: 0px;
    --pg-fp-fluid-y: 0px;
    --pg-fp-tap-x: 50%;
    --pg-fp-tap-y: 50%;
    transform: translate3d(var(--pg-fp-tx), var(--pg-fp-ty), 0)
               scale(var(--pg-fp-sx), var(--pg-fp-sy))
               rotate(var(--pg-fp-rot))
               skewX(var(--pg-fp-skew));
    transform-origin: center center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--pg-fp-base-r);
    contain: layout style;
    backface-visibility: hidden;
    color: #09090b;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    /* Transform is driven directly by the 60fps JS spring solver for organic jelly/liquid motion */
    transition: opacity 0.26s ease, visibility 0.26s ease;
    will-change: transform, opacity;
    touch-action: manipulation;
}

.pg-floating-profile-pill {
    position: fixed;
    left: auto;
    right: calc(22px + env(safe-area-inset-right, 0px));
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    z-index: 9975;
    height: 48px;
    max-width: min(320px, calc(100vw - 32px));
    padding: 6px 15px 6px 7px;
    text-decoration: none;
    cursor: pointer;
}

.pg-floating-profile-pill[hidden],
.pg-floating-tabs-dock[hidden],
.pg-floating-tabs-pill[hidden] {
    display: none !important;
}

body.pg-fp-scrolling-down .pg-floating-profile-pill,
body.pg-fp-scrolling-down .pg-floating-tabs-pill,
.pg-floating-profile-pill.is-scrolling-down,
.pg-floating-tabs-pill.is-scrolling-down {
    opacity: 0.92;
}

.pg-floating-profile-pill.is-pressed,
.pg-floating-profile-pill:active,
.pg-floating-tabs-pill.is-pressed {
    opacity: 1;
}

/* Layer 1: Minimal Frosted Glass Rim (Clean Hairline + Soft White Highlight, Zero Heavy Black Bevel) */
.pg-liquid-glass-rim {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    pointer-events: none;
    box-shadow:
        0 10px 30px -6px rgba(15, 23, 42, 0.10),
        0 2px 8px -1px rgba(15, 23, 42, 0.05),
        0 0 0 1px rgba(15, 23, 42, 0.065),
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        inset 0 -1px 0 rgba(15, 23, 42, 0.03);
    transition: box-shadow 0.3s ease;
}

/* Layer 2: Frosted Glass Backdrop */
.pg-liquid-glass-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    overflow: hidden;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.88) 0%,
        rgba(255, 255, 255, 0.74) 55%,
        rgba(255, 255, 255, 0.84) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    pointer-events: none;
}

/* Internal Fluid Caustics */
.pg-liquid-caustic {
    position: absolute;
    border-radius: 9999px;
    pointer-events: none;
    will-change: transform;
}

.pg-liquid-caustic-1 {
    left: -20%;
    top: -64%;
    width: 78%;
    height: 170%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.72) 0%,
        rgba(255, 255, 255, 0.22) 45%,
        rgba(255, 255, 255, 0) 74%
    );
    transform: translate3d(calc(var(--pg-fp-fluid-x) * 2.2), calc(var(--pg-fp-fluid-y) * 2.0), 0)
               scale(calc(1 + (var(--pg-fp-sx) - 1) * 2.2), calc(1 + (var(--pg-fp-sy) - 1) * 1.8))
               skewX(calc(var(--pg-fp-skew) * 2.2));
}

.pg-liquid-caustic-2 {
    right: -18%;
    bottom: -66%;
    width: 72%;
    height: 160%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.42) 0%,
        rgba(255, 255, 255, 0.14) 48%,
        rgba(255, 255, 255, 0) 75%
    );
    transform: translate3d(calc(var(--pg-fp-fluid-x) * -1.9), calc(var(--pg-fp-fluid-y) * -1.7), 0)
               scale(calc(1 + (var(--pg-fp-sy) - 1) * 1.9), calc(1 + (var(--pg-fp-sx) - 1) * 1.9))
               skewX(calc(var(--pg-fp-skew) * -1.8));
}

/* Fine Curved Meniscus Refraction Band */
.pg-liquid-meniscus {
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    background: radial-gradient(
        130% 80% at 50% 0%,
        rgba(255, 255, 255, 0.52) 0%,
        rgba(255, 255, 255, 0.12) 28%,
        rgba(255, 255, 255, 0) 56%
    ),
    radial-gradient(
        120% 70% at 50% 100%,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0) 52%
    );
    opacity: 0.72;
    transform: translate3d(calc(var(--pg-fp-fluid-x) * 0.75), calc(var(--pg-fp-fluid-y) * 0.5), 0)
               rotate(calc(var(--pg-fp-rot) * -1.4));
    pointer-events: none;
    will-change: transform;
}

/* Water-drop contact ripple originating at exact touch/pointer point */
.pg-liquid-ripple {
    position: absolute;
    left: var(--pg-fp-tap-x, 50%);
    top: var(--pg-fp-tap-y, 50%);
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border-radius: 9999px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.24) 48%,
        rgba(255, 255, 255, 0) 72%
    );
    opacity: 0;
    transform: scale(0.2);
    pointer-events: none;
    will-change: transform, opacity;
}

.pg-liquid-ripple.is-rippling {
    animation: pgFpTapRipple 0.62s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pgFpTapRipple {
    0% {
        opacity: 0.75;
        transform: scale(0.35);
    }
    55% {
        opacity: 0.32;
    }
    100% {
        opacity: 0;
        transform: scale(8.2);
    }
}

/* Rose-pink (Favorite) & Emerald-mint (Cart) liquid wash inside glass */
.pg-liquid-fav-pulse,
.pg-liquid-cart-pulse {
    position: absolute;
    right: -14%;
    top: -42%;
    width: 96%;
    height: 185%;
    border-radius: 9999px;
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

.pg-liquid-fav-pulse {
    background: radial-gradient(
        ellipse at center,
        rgba(244, 63, 94, 0.36) 0%,
        rgba(251, 113, 133, 0.16) 46%,
        rgba(244, 63, 94, 0) 74%
    );
    transform: translate3d(26px, 0, 0) scale(0.42);
}

.pg-liquid-cart-pulse {
    background: radial-gradient(
        ellipse at center,
        rgba(16, 185, 129, 0.36) 0%,
        rgba(52, 211, 153, 0.16) 46%,
        rgba(16, 185, 129, 0) 74%
    );
    transform: translate3d(16px, -10px, 0) scale(0.44);
}

.pg-liquid-fav-pulse.is-pulsing {
    animation: pgFpRosePulse 0.82s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.pg-liquid-cart-pulse.is-pulsing {
    animation: pgFpEmeraldPulse 0.86s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pgFpRosePulse {
    0% {
        opacity: 0;
        transform: translate3d(26px, 0, 0) scale(0.42);
    }
    24% {
        opacity: 0.95;
        transform: translate3d(2px, 0, 0) scale(1.06);
    }
    62% {
        opacity: 0.55;
        transform: translate3d(-12px, 0, 0) scale(1.22);
    }
    100% {
        opacity: 0;
        transform: translate3d(-22px, 0, 0) scale(1.34);
    }
}

@keyframes pgFpEmeraldPulse {
    0% {
        opacity: 0;
        transform: translate3d(16px, -10px, 0) scale(0.44);
    }
    22% {
        opacity: 0.96;
        transform: translate3d(0, 2px, 0) scale(1.1);
    }
    58% {
        opacity: 0.58;
        transform: translate3d(-10px, 0, 0) scale(1.24);
    }
    100% {
        opacity: 0;
        transform: translate3d(-18px, 0, 0) scale(1.34);
    }
}

/* Pointer-following liquid highlight glint */
.pg-liquid-glass-backdrop::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 110px;
    height: 110px;
    margin: -55px 0 0 -55px;
    border-radius: 9999px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.65) 0%,
        rgba(255, 255, 255, 0.22) 38%,
        rgba(255, 255, 255, 0) 70%
    );
    opacity: 0;
    transform: translate3d(var(--pg-fp-glint-x, 0px), var(--pg-fp-glint-y, 0px), 0) scale(0.85);
    transition: opacity 0.26s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.pg-floating-profile-pill.is-pressed .pg-liquid-glass-backdrop::before,
.pg-floating-tabs-pill.is-pressed .pg-liquid-glass-backdrop::before {
    opacity: 0.9;
    transform: translate3d(var(--pg-fp-glint-x, 0px), var(--pg-fp-glint-y, 0px), 0) scale(1);
}

@media (hover: hover) and (pointer: fine) {
    .pg-floating-profile-pill:hover .pg-liquid-glass-backdrop::before,
    .pg-floating-tabs-pill:hover .pg-liquid-glass-backdrop::before {
        opacity: 0.9;
        transform: translate3d(var(--pg-fp-glint-x, 0px), var(--pg-fp-glint-y, 0px), 0) scale(1);
    }
}

/* One-shot diagonal specular glass sweep on appear or tap */
.pg-liquid-glass-backdrop::after {
    content: "";
    position: absolute;
    top: -35%;
    bottom: -35%;
    left: 0;
    width: 56px;
    background: linear-gradient(
        105deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.58) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0;
    transform: translate3d(-90px, 0, 0) skewX(-20deg);
    pointer-events: none;
}

.pg-floating-profile-pill.is-sweeping .pg-liquid-glass-backdrop::after,
.pg-floating-tabs-pill.is-sweeping .pg-liquid-glass-backdrop::after {
    animation: pgFpSpecularSweep 0.82s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pgFpSpecularSweep {
    0% {
        opacity: 0;
        transform: translate3d(-90px, 0, 0) skewX(-20deg);
    }
    25% {
        opacity: 0.85;
    }
    75% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translate3d(340px, 0, 0) skewX(-20deg);
    }
}

/* Layer 3: Sharp Foreground Content (suspended buoyantly inside the liquid) */
.pg-fp-content {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    pointer-events: none;
    transform: translate3d(var(--pg-fp-cx, 0px), var(--pg-fp-cy, 0px), 0);
    will-change: transform;
}

.pg-fp-avatar-wrap {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    flex-shrink: 0;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) and (pointer: fine) {
    .pg-floating-profile-pill:hover .pg-fp-avatar-wrap {
        transform: scale(1.07);
    }
}

.pg-floating-profile-pill:active .pg-fp-avatar-wrap,
.pg-floating-profile-pill.is-pressed .pg-fp-avatar-wrap {
    transform: scale(0.92);
    transition-duration: 0.12s;
}

.pg-fp-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pg-fp-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #18181b 0%, #3f3f46 100%);
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
}

.pg-fp-name {
    font-family: var(--font-sans, 'Kanit', sans-serif);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #09090b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    line-height: 1.2;
}

.pg-fp-chevron {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    color: rgba(9, 9, 11, 0.55);
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.pg-fp-chevron-arrow,
.pg-fp-chevron-heart,
.pg-fp-chevron-bag {
    display: block;
    transition: opacity 0.22s ease, transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
}

.pg-fp-chevron-heart,
.pg-fp-chevron-bag {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.pg-fp-chevron-heart {
    color: #f43f5e;
    transform: scale(0.32);
}

.pg-fp-chevron-bag {
    color: #10b981;
    transform: translateY(-4px) scale(0.42);
}

.pg-floating-profile-pill.is-fav-liked .pg-fp-chevron-arrow {
    opacity: 0;
    transform: scale(0.4) rotate(-16deg);
}

.pg-floating-profile-pill.is-fav-liked .pg-fp-chevron-heart {
    opacity: 1;
    transform: scale(1.08);
}

.pg-floating-profile-pill.is-cart-added .pg-fp-chevron-arrow {
    opacity: 0;
    transform: scale(0.4) rotate(12deg);
}

.pg-floating-profile-pill.is-cart-added .pg-fp-chevron-bag {
    opacity: 1;
    transform: translateY(0) scale(1.06);
}

@media (hover: hover) and (pointer: fine) {
    .pg-floating-profile-pill:hover .pg-fp-chevron {
        color: #09090b;
        transform: translateX(3.5px);
    }
}

.pg-floating-profile-pill:active .pg-fp-chevron,
.pg-floating-profile-pill.is-pressed .pg-fp-chevron {
    transform: translateX(1.5px) scale(0.92);
}

/* Dark Mode for Floating Liquid Glass Capsule */
body.dark-mode .pg-floating-profile-pill,
html.dark-mode .pg-floating-profile-pill,
[data-theme="dark"] .pg-floating-profile-pill,
body.dark-mode .pg-floating-tabs-pill,
html.dark-mode .pg-floating-tabs-pill,
[data-theme="dark"] .pg-floating-tabs-pill {
    color: #f4f4f5;
}

body.dark-mode .pg-liquid-glass-rim,
html.dark-mode .pg-liquid-glass-rim,
[data-theme="dark"] .pg-liquid-glass-rim {
    box-shadow:
        0 12px 32px -6px rgba(0, 0, 0, 0.52),
        0 2px 8px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

body.dark-mode .pg-liquid-glass-backdrop,
html.dark-mode .pg-liquid-glass-backdrop,
[data-theme="dark"] .pg-liquid-glass-backdrop {
    background: linear-gradient(
        180deg,
        rgba(34, 34, 38, 0.84) 0%,
        rgba(20, 20, 24, 0.72) 55%,
        rgba(26, 26, 30, 0.80) 100%
    );
}

body.dark-mode .pg-liquid-glass-backdrop::before,
html.dark-mode .pg-liquid-glass-backdrop::before,
[data-theme="dark"] .pg-liquid-glass-backdrop::before {
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.24) 0%,
        rgba(255, 255, 255, 0.08) 42%,
        rgba(255, 255, 255, 0) 70%
    );
}

body.dark-mode .pg-liquid-glass-backdrop::after,
html.dark-mode .pg-liquid-glass-backdrop::after,
[data-theme="dark"] .pg-liquid-glass-backdrop::after {
    background: linear-gradient(
        105deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.24) 50%,
        rgba(255, 255, 255, 0) 100%
    );
}

body.dark-mode .pg-liquid-caustic-1,
html.dark-mode .pg-liquid-caustic-1,
[data-theme="dark"] .pg-liquid-caustic-1 {
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 75%
    );
}

body.dark-mode .pg-liquid-caustic-2,
html.dark-mode .pg-liquid-caustic-2,
[data-theme="dark"] .pg-liquid-caustic-2 {
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.04) 52%,
        rgba(255, 255, 255, 0) 76%
    );
}

body.dark-mode .pg-liquid-meniscus,
html.dark-mode .pg-liquid-meniscus,
[data-theme="dark"] .pg-liquid-meniscus {
    background: radial-gradient(
        130% 80% at 50% 0%,
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0.05) 28%,
        rgba(255, 255, 255, 0) 56%
    ),
    radial-gradient(
        120% 70% at 50% 100%,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0) 54%
    );
}

body.dark-mode .pg-liquid-ripple,
html.dark-mode .pg-liquid-ripple,
[data-theme="dark"] .pg-liquid-ripple {
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.34) 0%,
        rgba(255, 255, 255, 0.14) 48%,
        rgba(255, 255, 255, 0) 72%
    );
}

body.dark-mode .pg-liquid-fav-pulse,
html.dark-mode .pg-liquid-fav-pulse,
[data-theme="dark"] .pg-liquid-fav-pulse {
    background: radial-gradient(
        ellipse at center,
        rgba(251, 113, 133, 0.34) 0%,
        rgba(244, 63, 94, 0.14) 48%,
        rgba(244, 63, 94, 0) 75%
    );
}

body.dark-mode .pg-liquid-cart-pulse,
html.dark-mode .pg-liquid-cart-pulse,
[data-theme="dark"] .pg-liquid-cart-pulse {
    background: radial-gradient(
        ellipse at center,
        rgba(52, 211, 153, 0.34) 0%,
        rgba(16, 185, 129, 0.15) 48%,
        rgba(16, 185, 129, 0) 75%
    );
}

body.dark-mode .pg-fp-chevron-heart,
html.dark-mode .pg-fp-chevron-heart,
[data-theme="dark"] .pg-fp-chevron-heart {
    color: #fb7185;
}

body.dark-mode .pg-fp-chevron-bag,
html.dark-mode .pg-fp-chevron-bag,
[data-theme="dark"] .pg-fp-chevron-bag {
    color: #34d399;
}

body.dark-mode .pg-fp-avatar-wrap,
html.dark-mode .pg-fp-avatar-wrap,
[data-theme="dark"] .pg-fp-avatar-wrap {
    background: rgba(255, 255, 255, 0.12);
}

body.dark-mode .pg-fp-avatar-fallback,
html.dark-mode .pg-fp-avatar-fallback,
[data-theme="dark"] .pg-fp-avatar-fallback {
    background: linear-gradient(135deg, #e4e4e7 0%, #a1a1aa 100%);
    color: #09090b;
}

body.dark-mode .pg-fp-name,
html.dark-mode .pg-fp-name,
[data-theme="dark"] .pg-fp-name {
    color: #f4f4f5;
}

body.dark-mode .pg-fp-chevron,
html.dark-mode .pg-fp-chevron,
[data-theme="dark"] .pg-fp-chevron {
    color: rgba(244, 244, 245, 0.62);
}

@media (hover: hover) and (pointer: fine) {
    body.dark-mode .pg-floating-profile-pill:hover .pg-fp-chevron,
    html.dark-mode .pg-floating-profile-pill:hover .pg-fp-chevron,
    [data-theme="dark"] .pg-floating-profile-pill:hover .pg-fp-chevron {
        color: #ffffff;
    }
}

/* ==========================================================================
   Album Page Variant: Always Bottom-Left & Speed Dial Liquid Glass Tools
   ========================================================================== */
.pg-fp-album-dial-wrap {
    position: fixed;
    left: calc(22px + env(safe-area-inset-left, 0px));
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    z-index: 9975;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.24s ease,
                visibility 0.24s ease;
}

.pg-fp-album-dial-wrap .pg-floating-profile-pill.pg-fp-album,
.pg-fp-home-dial-wrap .pg-floating-profile-pill.pg-fp-home {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    pointer-events: auto;
    border: none;
    background: transparent;
    font-family: inherit;
    touch-action: manipulation;
}

/* Homepage Speed Dial Variant & Dynamic Left/Right Side Mirroring */
.pg-fp-home-dial-wrap,
.pg-fp-album-dial-wrap.pg-fp-side-right {
    left: auto;
    right: calc(22px + env(safe-area-inset-right, 0px));
    align-items: flex-end;
}

.pg-fp-album-dial-wrap.pg-fp-side-left {
    left: calc(22px + env(safe-area-inset-left, 0px));
    right: auto;
    align-items: flex-start;
}

.pg-fp-home-dial-wrap .pg-fp-dial-menu,
.pg-fp-album-dial-wrap.pg-fp-side-right .pg-fp-dial-menu {
    align-items: flex-end;
    padding-left: 0;
    padding-right: 1px;
}

.pg-fp-album-dial-wrap.pg-fp-side-left .pg-fp-dial-menu {
    align-items: flex-start;
    padding-left: 1px;
    padding-right: 0;
}

@media (hover: hover) and (pointer: fine) {
    .pg-fp-home-dial-wrap .pg-fp-dial-btn[data-tooltip]::after,
    .pg-fp-album-dial-wrap.pg-fp-side-right .pg-fp-dial-btn[data-tooltip]::after {
        left: auto;
        right: calc(100% + 10px);
        transform: translate3d(4px, -50%, 0);
    }

    .pg-fp-home-dial-wrap .pg-fp-dial-btn[data-tooltip]:hover::after,
    .pg-fp-album-dial-wrap.pg-fp-side-right .pg-fp-dial-btn[data-tooltip]:hover::after {
        transform: translate3d(0, -50%, 0);
    }

    .pg-fp-album-dial-wrap.pg-fp-side-left .pg-fp-dial-btn[data-tooltip]::after {
        left: calc(100% + 10px);
        right: auto;
        transform: translate3d(-4px, -50%, 0);
    }

    .pg-fp-album-dial-wrap.pg-fp-side-left .pg-fp-dial-btn[data-tooltip]:hover::after {
        transform: translate3d(0, -50%, 0);
    }
}

.pg-floating-profile-pill.pg-fp-home.pg-fp-tools-only {
    --pg-fp-base-r: 23px;
    height: 46px;
    padding: 6px 11px 6px 6px;
}

.pg-floating-profile-pill.pg-fp-home.pg-fp-tools-only .pg-fp-content {
    gap: 6px;
}

.pg-floating-profile-pill.pg-fp-home.pg-fp-tools-only .pg-fp-avatar-wrap,
.pg-floating-profile-pill.pg-fp-home.pg-fp-tools-only .pg-fp-name {
    display: none;
}

.pg-floating-profile-pill.pg-fp-home.pg-fp-tools-only .pg-fp-tools-trigger-icon {
    display: inline-flex;
}

.pg-fp-dial-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
    pointer-events: none;
    box-sizing: border-box;
}

.pg-fp-dial-count-badge.is-fav {
    background: #f43f5e;
}

.pg-fp-dial-count-badge.hidden {
    display: none !important;
}

.pg-floating-profile-pill.pg-fp-album {
    --pg-fp-base-r: 23px;
    left: calc(22px + env(safe-area-inset-left, 0px));
    right: auto;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    height: 46px;
    max-width: none;
    padding: 6px 11px 6px 6px;
}

.pg-fp-tools-trigger-icon {
    display: none;
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
}

html.dark-mode .pg-fp-tools-trigger-icon,
body.dark-mode .pg-fp-tools-trigger-icon,
[data-theme="dark"] .pg-fp-tools-trigger-icon {
    background: rgba(255, 255, 255, 0.12);
}

.pg-floating-profile-pill.pg-fp-album.pg-fp-tools-only .pg-fp-avatar-wrap {
    display: none;
}

.pg-floating-profile-pill.pg-fp-album.pg-fp-tools-only .pg-fp-tools-trigger-icon {
    display: inline-flex;
}

.pg-fp-album-dial-wrap.is-dial-open .pg-fp-chevron-arrow {
    transform: rotate(180deg);
}

.pg-fp-chevron-arrow {
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

/* กองปุ่มกลมลอยด้านบนแคปซูล (Speed Dial Menu) */
.pg-fp-dial-menu {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 10px;
    padding-left: 1px;
    pointer-events: none;
}

.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-menu {
    pointer-events: auto;
}

.pg-fp-dial-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.88), rgba(244, 244, 245, 0.78));
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.75);
    color: #18181b;
    font-family: var(--font-sans, 'Kanit', sans-serif);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(0.75);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease, color 0.2s ease;
}

.pg-fp-dial-btn[hidden] {
    display: none !important;
}

html.dark-mode .pg-fp-dial-btn,
body.dark-mode .pg-fp-dial-btn,
[data-theme="dark"] .pg-fp-dial-btn {
    border-color: rgba(255, 255, 255, 0.16);
    background: linear-gradient(155deg, rgba(39, 39, 42, 0.9), rgba(24, 24, 27, 0.85));
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    color: #f4f4f5;
}

.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-btn {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    pointer-events: auto;
}

.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-menu > :nth-child(1),
.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-menu > :nth-child(1) > .pg-fp-dial-btn { transition-delay: 0.02s; }
.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-menu > :nth-child(2),
.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-menu > :nth-child(2) > .pg-fp-dial-btn { transition-delay: 0.05s; }
.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-menu > :nth-child(3),
.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-menu > :nth-child(3) > .pg-fp-dial-btn { transition-delay: 0.08s; }
.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-menu > :nth-child(4),
.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-menu > :nth-child(4) > .pg-fp-dial-btn { transition-delay: 0.11s; }
.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-menu > :nth-child(5),
.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-menu > :nth-child(5) > .pg-fp-dial-btn { transition-delay: 0.14s; }
.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-menu > :nth-child(6),
.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-menu > :nth-child(6) > .pg-fp-dial-btn { transition-delay: 0.17s; }

/* ปุ่มสามจุด (เพิ่มเติม) + Anchored Spring Popover (GPU transform+opacity ล้วน 120fps) */
.pg-fp-dial-more-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.pg-fp-dial-more-wrap.is-more-open .pg-fp-dial-more-btn {
    background: linear-gradient(155deg, rgba(232, 236, 242, 0.96), rgba(218, 224, 232, 0.92));
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.18);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12), inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

html.dark-mode .pg-fp-dial-more-wrap.is-more-open .pg-fp-dial-more-btn,
body.dark-mode .pg-fp-dial-more-wrap.is-more-open .pg-fp-dial-more-btn,
[data-theme="dark"] .pg-fp-dial-more-wrap.is-more-open .pg-fp-dial-more-btn {
    background: linear-gradient(155deg, rgba(63, 63, 70, 0.95), rgba(46, 46, 52, 0.92));
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.26);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.pg-fp-dial-more-wrap.is-more-open .pg-fp-dial-more-btn[data-tooltip]::after {
    opacity: 0 !important;
    pointer-events: none;
}

.pg-fp-more-popover {
    position: absolute;
    left: calc(100% + 10px);
    top: 0;
    min-width: 214px;
    max-width: min(244px, calc(100vw - 88px));
    padding: 6px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 14px 36px -6px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-sizing: border-box;
    font-family: var(--font-sans, 'Kanit', sans-serif);
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-origin: left top;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(-10px, -4px, 0) scale(0.92);
    transition: transform 0.16s cubic-bezier(0.4, 0, 1, 1),
                opacity 0.14s ease,
                visibility 0.16s ease;
    z-index: 4;
}

.pg-fp-album-dial-wrap.is-dial-open .pg-fp-more-popover {
    will-change: transform, opacity;
}

.pg-fp-album-dial-wrap.is-dial-open .pg-fp-dial-more-wrap.is-more-open .pg-fp-more-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.18s ease,
                visibility 0.24s ease;
}

/* เมื่อแคปซูลหน้าอัลบั้มอยู่ฝั่งขวา ให้ Popover สามจุดกาง Spring ออกทางซ้ายเพื่อไม่ให้ล้นขอบจอ */
.pg-fp-album-dial-wrap.pg-fp-side-right .pg-fp-more-popover {
    left: auto;
    right: calc(100% + 10px);
    transform-origin: right top;
    transform: translate3d(10px, -4px, 0) scale(0.92);
}

.pg-fp-album-dial-wrap.pg-fp-side-right.is-dial-open .pg-fp-dial-more-wrap.is-more-open .pg-fp-more-popover {
    transform: translate3d(0, 0, 0) scale(1);
}

html.dark-mode .pg-fp-more-popover,
body.dark-mode .pg-fp-more-popover,
[data-theme="dark"] .pg-fp-more-popover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(24, 24, 27, 0.94);
    box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.pg-fp-more-item {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.14s ease, color 0.14s ease;
    box-sizing: border-box;
}

.pg-fp-more-item[hidden] {
    display: none !important;
}

.pg-fp-more-item:active {
    background: rgba(15, 23, 42, 0.08);
}

@media (hover: hover) and (pointer: fine) {
    .pg-fp-more-item:hover {
        background: rgba(15, 23, 42, 0.055);
    }
}

html.dark-mode .pg-fp-more-item,
body.dark-mode .pg-fp-more-item,
[data-theme="dark"] .pg-fp-more-item {
    color: #f4f4f5;
}

html.dark-mode .pg-fp-more-item:active,
body.dark-mode .pg-fp-more-item:active,
[data-theme="dark"] .pg-fp-more-item:active {
    background: rgba(255, 255, 255, 0.12);
}

@media (hover: hover) and (pointer: fine) {
    html.dark-mode .pg-fp-more-item:hover,
    body.dark-mode .pg-fp-more-item:hover,
    [data-theme="dark"] .pg-fp-more-item:hover {
        background: rgba(255, 255, 255, 0.08);
    }
}

.pg-fp-more-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    flex-shrink: 0;
}

.pg-fp-more-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

html.dark-mode .pg-fp-more-icon,
body.dark-mode .pg-fp-more-icon,
[data-theme="dark"] .pg-fp-more-icon {
    color: #a1a1aa;
}

.pg-fp-more-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pg-fp-more-pill {
    padding: 2.5px 8px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.07);
    color: #334155;
    font-size: 0.72rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

html.dark-mode .pg-fp-more-pill,
body.dark-mode .pg-fp-more-pill,
[data-theme="dark"] .pg-fp-more-pill {
    background: rgba(255, 255, 255, 0.12);
    color: #e4e4e7;
}

.pg-fp-more-layout-btn.is-popping .pg-fp-more-icon {
    animation: pgDialLayoutPop 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

#shareBtn.pg-fp-more-item.is-copied {
    transform: none;
}

@media (max-width: 768px) {
    /* Blur เบาลงและพื้นเกือบทึบบนมือถือรุ่นกลาง เพื่อคง 60/120fps ลื่นสนิท */
    .pg-fp-more-popover {
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 10px 26px -4px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.06);
    }

    html.dark-mode .pg-fp-more-popover,
    body.dark-mode .pg-fp-more-popover,
    [data-theme="dark"] .pg-fp-more-popover {
        background: rgba(24, 24, 27, 0.96);
        box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.56), 0 0 0 1px rgba(255, 255, 255, 0.12);
    }
}

@media (hover: hover) and (pointer: fine) {
    .pg-fp-dial-btn:hover {
        transform: translate3d(0, -2px, 0) scale(1.06);
    }

    .pg-fp-dial-btn[data-tooltip]::after {
        content: attr(data-tooltip);
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translate3d(-4px, -50%, 0);
        padding: 5px 11px;
        border-radius: 9999px;
        background: rgba(24, 24, 27, 0.86);
        color: #ffffff;
        font-family: var(--font-sans, 'Kanit', sans-serif);
        font-size: 0.76rem;
        font-weight: 500;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .pg-fp-dial-btn[data-tooltip]:hover::after {
        opacity: 1;
        transform: translate3d(0, -50%, 0);
    }
}

/* ไอคอน Theme บนปุ่ม Dial: โหมดสว่างโชว์พระจันทร์ โหมดมืดโชว์พระอาทิตย์ */
.pg-fp-dial-theme-btn .pg-dial-icon-sun { display: none; }
.pg-fp-dial-theme-btn.is-dark .pg-dial-icon-moon,
html.dark-mode .pg-fp-dial-theme-btn .pg-dial-icon-moon,
body.dark-mode .pg-fp-dial-theme-btn .pg-dial-icon-moon,
[data-theme="dark"] .pg-fp-dial-theme-btn .pg-dial-icon-moon {
    display: none;
}
.pg-fp-dial-theme-btn.is-dark .pg-dial-icon-sun,
html.dark-mode .pg-fp-dial-theme-btn .pg-dial-icon-sun,
body.dark-mode .pg-fp-dial-theme-btn .pg-dial-icon-sun,
[data-theme="dark"] .pg-fp-dial-theme-btn .pg-dial-icon-sun {
    display: block;
}

.pg-fp-dial-btn .fav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
}

.pg-fp-dial-btn.action-face-btn:not(.visible) {
    display: none;
}

/* ปุ่มสลับจำนวนคอลัมน์ใน Speed Dial */
.pg-dial-layout-icon {
    width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pg-dial-layout-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.pg-fp-dial-layout-btn.is-popping .pg-dial-layout-icon {
    animation: pgDialLayoutPop 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pgDialLayoutPop {
    0% { transform: scale(0.84); }
    55% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.pg-dial-layout-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9999px;
    background: #18181b;
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    box-sizing: border-box;
}

html.dark-mode .pg-dial-layout-badge,
body.dark-mode .pg-dial-layout-badge,
[data-theme="dark"] .pg-dial-layout-badge {
    background: #ffffff;
    color: #18181b;
}

.pg-fp-dial-btn.action-face-btn.active-filter {
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.42);
}

html.dark-mode .pg-fp-dial-btn.action-face-btn.active-filter,
body.dark-mode .pg-fp-dial-btn.action-face-btn.active-filter,
[data-theme="dark"] .pg-fp-dial-btn.action-face-btn.active-filter {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.42);
}

.pg-fp-dial-btn.action-face-btn.active-filter::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2563eb;
    border: 1.5px solid #ffffff;
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.65);
    pointer-events: none;
}

html.dark-mode .pg-fp-dial-btn.action-face-btn.active-filter::before,
body.dark-mode .pg-fp-dial-btn.action-face-btn.active-filter::before,
[data-theme="dark"] .pg-fp-dial-btn.action-face-btn.active-filter::before {
    background: #60a5fa;
    border-color: #18181b;
}

.pg-floating-profile-pill.pg-fp-album .pg-fp-content {
    gap: 6px;
}

.pg-floating-profile-pill.pg-fp-album .pg-fp-avatar-wrap {
    width: 34px;
    height: 34px;
}

.pg-floating-profile-pill.pg-fp-album .pg-fp-name {
    display: none;
}

.pg-floating-profile-pill.pg-fp-album .pg-fp-chevron svg {
    width: 14px;
    height: 14px;
}

/* Auto-hide smoothly when Nav Drawer, Lightbox, Modals, Album Hero/Action-Bar dock, or Footer is in view */
body.pg-nav-open .pg-floating-profile-pill,
body.lightbox-open .pg-floating-profile-pill,
html.lightbox-open .pg-floating-profile-pill,
body.pg-floating-profile-obscured .pg-floating-profile-pill,
body.pg-floating-profile-at-footer .pg-floating-profile-pill,
body.pg-floating-profile-before-bar .pg-floating-profile-pill,
body.pg-nav-open .pg-fp-album-dial-wrap,
body.lightbox-open .pg-fp-album-dial-wrap,
html.lightbox-open .pg-fp-album-dial-wrap,
body.pg-floating-profile-obscured .pg-fp-album-dial-wrap,
body.pg-floating-profile-at-footer .pg-fp-album-dial-wrap,
body.pg-floating-profile-before-bar .pg-fp-album-dial-wrap {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate3d(0, 18px, 0) scale(0.92) !important;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.24s ease,
                visibility 0.24s ease;
}

@media (max-width: 640px) {
    .pg-floating-profile-pill {
        --pg-fp-base-r: 23px;
        right: calc(16px + env(safe-area-inset-right, 0px));
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
        height: 46px;
        max-width: none;
        padding: 6px 11px 6px 6px;
    }
    .pg-floating-profile-pill.pg-fp-album {
        left: calc(16px + env(safe-area-inset-left, 0px));
        right: auto;
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    }
    .pg-fp-album-dial-wrap,
    .pg-fp-album-dial-wrap.pg-fp-side-left {
        left: calc(16px + env(safe-area-inset-left, 0px));
        right: auto;
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    }
    .pg-fp-home-dial-wrap,
    .pg-fp-album-dial-wrap.pg-fp-side-right {
        left: auto;
        right: calc(16px + env(safe-area-inset-right, 0px));
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    }
    .pg-fp-home-dial-wrap .pg-floating-profile-pill.pg-fp-home,
    .pg-fp-album-dial-wrap .pg-floating-profile-pill.pg-fp-album {
        left: auto;
        right: auto;
        bottom: auto;
    }
    .pg-fp-content {
        gap: 6px;
    }
    .pg-fp-avatar-wrap {
        width: 34px;
        height: 34px;
    }
    .pg-fp-name {
        display: none;
    }
    .pg-fp-chevron svg {
        width: 14px;
        height: 14px;
    }
    /* Keep Toasts above Floating Profile Capsule on narrow mobile viewports */
    body.has-pg-floating-profile:not(.lightbox-open) .pg-toast,
    body.has-pg-floating-profile:not(.lightbox-open) .pg-inline-toast {
        bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .pg-floating-profile-pill,
    .pg-floating-tabs-dock,
    .pg-floating-tabs-pill {
        transition: opacity 0.15s ease !important;
        animation: none !important;
    }
    .pg-floating-profile-pill .pg-liquid-glass-backdrop::before,
    .pg-floating-profile-pill .pg-liquid-glass-backdrop::after,
    .pg-floating-profile-pill .pg-liquid-caustic,
    .pg-floating-profile-pill .pg-liquid-meniscus,
    .pg-floating-profile-pill .pg-liquid-ripple,
    .pg-floating-profile-pill .pg-liquid-fav-pulse,
    .pg-floating-profile-pill .pg-liquid-cart-pulse,
    .pg-floating-profile-pill .pg-fp-avatar-wrap,
    .pg-floating-profile-pill .pg-fp-chevron,
    .pg-floating-profile-pill .pg-fp-chevron-arrow,
    .pg-floating-profile-pill .pg-fp-chevron-heart,
    .pg-floating-profile-pill .pg-fp-chevron-bag,
    .pg-floating-tabs-pill .pg-liquid-glass-backdrop::before,
    .pg-floating-tabs-pill .pg-liquid-glass-backdrop::after,
    .pg-floating-tabs-pill .pg-liquid-caustic,
    .pg-floating-tabs-pill .pg-liquid-meniscus,
    .pg-floating-tabs-pill .pg-liquid-ripple,
    .pg-floating-tabs-pill .pg-ft-glider,
    .pg-floating-tabs-pill .pg-float-tab-btn {
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================================================
   Profile Page Floating 6-Tab Liquid Glass Dock (Bottom Center)
   ========================================================================== */
.pg-floating-tabs-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 9975;
    display: flex;
    justify-content: center;
    padding: 0 12px;
    box-sizing: border-box;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    will-change: opacity;
}

body.pg-profile-tab-docked .pg-floating-tabs-dock {
    opacity: 1;
    visibility: visible;
}

/* Auto-yield & hide cleanly when mobile Selection Bar (.profile-selbar), PDPA Banner, Queue Panel, Drawers or Modals appear */
body.pg-nav-open .pg-floating-tabs-dock,
body.lightbox-open .pg-floating-tabs-dock,
html.lightbox-open .pg-floating-tabs-dock,
body.pg-floating-tabs-obscured .pg-floating-tabs-dock {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.pg-floating-tabs-pill {
    --pg-fp-base-r: 26px;
    position: relative;
    pointer-events: auto;
    height: 52px;
    max-width: min(680px, calc(100vw - 24px));
    padding: 5px;
    cursor: default;
    border-radius: var(--pg-fp-base-r);
    contain: layout style;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.pg-floating-tabs-pill .pg-liquid-glass-rim {
    z-index: 4;
    box-shadow:
        0 10px 30px -6px rgba(15, 23, 42, 0.10),
        0 2px 8px -1px rgba(15, 23, 42, 0.05),
        0 0 0 1px rgba(15, 23, 42, 0.065),
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        inset 0 -1px 0 rgba(15, 23, 42, 0.03);
    transition: none;
}

body.dark-mode .pg-floating-tabs-pill .pg-liquid-glass-rim,
html.dark-mode .pg-floating-tabs-pill .pg-liquid-glass-rim,
[data-theme="dark"] .pg-floating-tabs-pill .pg-liquid-glass-rim {
    box-shadow:
        0 12px 32px -6px rgba(0, 0, 0, 0.52),
        0 2px 8px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.pg-floating-tabs-pill .pg-liquid-glass-backdrop {
    background: linear-gradient(
        180deg,
        rgba(240, 242, 246, 0.90) 0%,
        rgba(232, 236, 242, 0.82) 55%,
        rgba(238, 241, 246, 0.88) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

body.dark-mode .pg-floating-tabs-pill .pg-liquid-glass-backdrop,
html.dark-mode .pg-floating-tabs-pill .pg-liquid-glass-backdrop,
[data-theme="dark"] .pg-floating-tabs-pill .pg-liquid-glass-backdrop {
    background: linear-gradient(
        180deg,
        rgba(28, 28, 32, 0.88) 0%,
        rgba(18, 18, 22, 0.80) 55%,
        rgba(24, 24, 28, 0.86) 100%
    );
}

body.pg-nav-open .pg-floating-tabs-pill,
body.lightbox-open .pg-floating-tabs-pill,
html.lightbox-open .pg-floating-tabs-pill,
body.pg-floating-tabs-obscured .pg-floating-tabs-pill,
body:not(.pg-profile-tab-docked) .pg-floating-tabs-pill {
    pointer-events: none !important;
}

.pg-ft-content {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 100%;
    pointer-events: auto;
}

.pg-ft-glider {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    border-radius: 9999px;
    background: #ffffff;
    box-shadow:
        0 1px 4px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 #ffffff;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(0, 0, 0);
    transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
                width 0.32s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.2s ease,
                background-color 0.22s ease;
    will-change: transform, width;
}

body.dark-mode .pg-ft-glider,
html.dark-mode .pg-ft-glider,
[data-theme="dark"] .pg-ft-glider {
    background: rgba(255, 255, 255, 0.16);
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.pg-float-tab-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 100%;
    padding: 0 13px;
    border: none;
    border-radius: 9999px;
    background: transparent;
    color: rgba(15, 23, 42, 0.48);
    font-family: var(--font-sans, 'Kanit', sans-serif);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    transition: color 0.2s ease, transform 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.pg-float-tab-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.pg-float-tab-btn.active svg {
    stroke-width: 2.15;
}

@media (hover: hover) and (pointer: fine) {
    .pg-float-tab-btn:not(.active):hover {
        color: #09090b;
    }
}

.pg-float-tab-btn:active {
    transform: scale(0.95);
}

.pg-float-tab-btn.active {
    color: #09090b;
    font-weight: 600;
}

body.dark-mode .pg-float-tab-btn,
html.dark-mode .pg-float-tab-btn,
[data-theme="dark"] .pg-float-tab-btn {
    color: rgba(244, 244, 245, 0.50);
}

body.dark-mode .pg-float-tab-btn.active,
html.dark-mode .pg-float-tab-btn.active,
[data-theme="dark"] .pg-float-tab-btn.active {
    color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
    body.dark-mode .pg-float-tab-btn:not(.active):hover,
    html.dark-mode .pg-float-tab-btn:not(.active):hover,
    [data-theme="dark"] .pg-float-tab-btn:not(.active):hover {
        color: #ffffff;
    }
}

.pg-float-tab-btn:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.55);
}

html.pg-ios-safari .pg-floating-tabs-dock {
    display: none !important;
}

@media (max-width: 768px) {
    .pg-floating-tabs-dock {
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        padding: 0 20px;
    }

    .pg-floating-tabs-pill {
        --pg-fp-base-r: 9999px;
        width: 100%;
        max-width: 380px;
        height: 52px;
        padding: 4px;
    }

    .pg-floating-tabs-pill .pg-liquid-glass-backdrop,
    .pg-floating-profile-pill .pg-liquid-glass-backdrop {
        backdrop-filter: blur(15px) saturate(160%);
        -webkit-backdrop-filter: blur(15px) saturate(160%);
    }

    .pg-floating-profile-pill.pg-fp-album .pg-liquid-glass-rim,
    .pg-floating-profile-pill.pg-fp-home .pg-liquid-glass-rim {
        box-shadow:
            0 8px 22px -4px rgba(15, 23, 42, 0.10),
            0 2px 6px rgba(15, 23, 42, 0.04),
            0 0 0 1px rgba(15, 23, 42, 0.065),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    body.dark-mode .pg-floating-profile-pill.pg-fp-album .pg-liquid-glass-rim,
    html.dark-mode .pg-floating-profile-pill.pg-fp-album .pg-liquid-glass-rim,
    [data-theme="dark"] .pg-floating-profile-pill.pg-fp-album .pg-liquid-glass-rim,
    body.dark-mode .pg-floating-profile-pill.pg-fp-home .pg-liquid-glass-rim,
    html.dark-mode .pg-floating-profile-pill.pg-fp-home .pg-liquid-glass-rim,
    [data-theme="dark"] .pg-floating-profile-pill.pg-fp-home .pg-liquid-glass-rim {
        box-shadow:
            0 8px 22px rgba(0, 0, 0, 0.48),
            0 0 0 1px rgba(255, 255, 255, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.16);
    }

    .pg-ft-content {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        width: 100%;
        gap: 0;
    }

    .pg-float-tab-btn {
        flex-direction: column;
        gap: 2px;
        padding: 3px 1px;
        width: 100%;
        min-width: 0;
        font-size: 0.625rem;
        border-radius: 9999px;
    }

    .pg-float-tab-btn svg {
        width: 16px;
        height: 16px;
    }

    .pg-ft-label {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.08;
    }

    .pg-ft-glider {
        border-radius: 9999px;
    }
}
