/* 拍立得自定义导航（生产环境 · 内联或单文件加载） */
.sf-polar {
    border-top: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    background: var(--bg-even);
    padding: 7px 0 9px;
    overflow: hidden;
}
.sf-polar__rail {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}
.sf-polar__rail::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: calc(50% - 6px);
    height: 1px;
    background: linear-gradient(90deg, transparent 2%, color-mix(in srgb, var(--border) 90%, transparent) 18%, color-mix(in srgb, var(--border) 90%, transparent) 82%, transparent 98%);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}
.sf-polar__track {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 3px 4px;
    min-height: 0;
    mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
}
.sf-polar__track::-webkit-scrollbar { display: none; }
.sf-polar__shot {
    --sf-accent: var(--primary);
    --tilt: 0deg;
    --lift: 0px;
    flex-shrink: 0;
    transform: rotate(var(--tilt)) translateY(var(--lift));
    transform-origin: 50% 85%;
    transition: transform .22s cubic-bezier(.2, .8, .2, 1);
    position: relative;
    z-index: 1;
    text-decoration: none;
}
.sf-polar__frame {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 66px;
    padding: 5px 5px 8px;
    background: linear-gradient(168deg, #fff 0%, #fafafa 52%, #f3f3f3 100%);
    border: 1px solid color-mix(in srgb, var(--border) 70%, #d8d8d8);
    border-radius: 4px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 1px 2px rgba(0, 0, 0, 0.05),
        0 4px 10px rgba(0, 0, 0, 0.06);
    transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
    overflow: hidden;
}
.sf-polar__frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.55) 0%, transparent 42%);
    pointer-events: none;
    z-index: 2;
}
.sf-polar__frame::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 5px;
    height: 1px;
    background: color-mix(in srgb, var(--border) 65%, transparent);
    opacity: 0.45;
    pointer-events: none;
    z-index: 1;
}
[data-theme="dark"] .sf-polar__frame,
html.dark-init .sf-polar__frame {
    background: linear-gradient(168deg, color-mix(in srgb, var(--bg-even) 88%, #fff) 0%, var(--bg-even) 100%);
    border-color: var(--border);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 3px 10px rgba(0, 0, 0, 0.28);
}
[data-theme="dark"] .sf-polar__frame::before,
html.dark-init .sf-polar__frame::before {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, transparent 42%);
}
.sf-polar__icon {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--sf-accent);
    background: linear-gradient(
        155deg,
        color-mix(in srgb, var(--sf-accent) 16%, #fff) 0%,
        color-mix(in srgb, var(--sf-accent) 7%, var(--bg-odd)) 100%
    );
    border: 1px solid color-mix(in srgb, var(--sf-accent) 18%, transparent);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.65),
        inset 0 -1px 2px rgba(0, 0, 0, 0.04);
    transition: background .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease;
    overflow: hidden;
    z-index: 1;
}
.sf-polar__icon--cover {
    padding: 0;
    background: #eee;
    border-color: color-mix(in srgb, var(--border) 55%, transparent);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.sf-polar__icon--cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.28) 0%, transparent 48%);
    pointer-events: none;
    z-index: 1;
}
.sf-polar__icon--cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), filter .28s ease;
}
.sf-polar__shot:hover .sf-polar__icon--cover img {
    transform: scale(1.06);
    filter: saturate(1.06) contrast(1.02);
}
.sf-polar__cap {
    position: relative;
    z-index: 1;
    margin-top: 6px;
    padding: 0 1px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: color-mix(in srgb, var(--dark) 72%, var(--gray));
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
    transition: color .22s ease, transform .22s ease;
}
.sf-polar__shot:hover {
    transform: rotate(0deg) translateY(-3px) scale(1.02);
    z-index: 5;
}
.sf-polar__shot:hover .sf-polar__frame {
    border-color: color-mix(in srgb, var(--sf-accent) 42%, var(--border));
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 3px 10px rgba(0, 0, 0, 0.08);
}
.sf-polar__shot:hover .sf-polar__icon:not(.sf-polar__icon--cover) {
    background: linear-gradient(
        155deg,
        color-mix(in srgb, var(--sf-accent) 22%, #fff) 0%,
        color-mix(in srgb, var(--sf-accent) 12%, var(--bg-odd)) 100%
    );
    border-color: color-mix(in srgb, var(--sf-accent) 30%, transparent);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.75),
        inset 0 -1px 2px rgba(0, 0, 0, 0.04);
}
.sf-polar__shot:hover .sf-polar__cap {
    color: var(--sf-accent);
    transform: translateY(-1px);
}
.sf-polar__shot:active {
    transform: rotate(0deg) translateY(-1px) scale(0.98);
}
.sf-polar__shot:focus-visible {
    outline: none;
}
.sf-polar__shot:focus-visible .sf-polar__frame {
    box-shadow: var(--focus-ring), 0 2px 8px rgba(0, 0, 0, 0.08);
}
@media (max-width: 768px) {
    .sf-polar { padding: 6px 0 8px; }
    .sf-polar__track { justify-content: flex-start; gap: 10px; padding: 3px 2px; }
    .sf-polar__frame { width: 58px; padding: 4px 4px 7px; }
    .sf-polar__icon { font-size: 15px; }
    .sf-polar__cap { font-size: 9px; margin-top: 5px; }
    .sf-polar__shot:hover { transform: rotate(0deg) translateY(-2px) scale(1.01); }
}
@media (hover: none) {
    .sf-polar__shot:hover { transform: rotate(var(--tilt)) translateY(var(--lift)); }
}

/* ===== 侧栏快捷导航（首页 · 广告下方） ===== */
.side-polar-host.widget {
    margin-bottom: 20px;
    padding: 0;
}
.side-polar-host .sf-polar--side {
    border: 0;
    background: transparent;
    padding: 12px 10px 12px;
    overflow: visible;
}
.side-polar-host .sf-polar--side .sf-polar__rail {
    border-radius: 0;
    overflow: visible;
}
.side-polar-host .sf-polar--side .sf-polar__rail::before {
    display: none;
}
.side-polar-host .sf-polar--side .sf-polar__track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 6px;
    justify-items: center;
    align-items: start;
    overflow: visible;
    mask-image: none;
    padding: 0;
    min-height: 0;
}
.side-polar-host .sf-polar--side .sf-polar__shot {
    width: 100%;
    text-align: center;
    transform: none;
    transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.side-polar-host .sf-polar--side .sf-polar__frame {
    width: 100%;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0;
    gap: 0;
    transition: none;
}
.side-polar-host .sf-polar--side .sf-polar__frame::before,
.side-polar-host .sf-polar--side .sf-polar__frame::after {
    display: none !important;
}
.side-polar-host .sf-polar--side .sf-polar__icon {
    position: relative;
    width: 36px;
    height: 36px;
    margin: 0 auto;
    aspect-ratio: auto;
    font-size: 15px;
    border-radius: 11px;
    border: 1px solid color-mix(in srgb, var(--sf-accent) 16%, var(--border));
    background: color-mix(in srgb, var(--sf-accent) 8%, var(--bg-odd));
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition:
        transform .22s cubic-bezier(.2, .8, .2, 1),
        background .22s ease,
        border-color .22s ease,
        box-shadow .22s ease,
        color .22s ease;
}
.side-polar-host .sf-polar--side .sf-polar__icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--sf-accent) 22%, transparent);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity .22s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
    z-index: -1;
    pointer-events: none;
}
.side-polar-host .sf-polar--side .sf-polar__icon--cover {
    padding: 0;
    overflow: hidden;
}
.side-polar-host .sf-polar--side .sf-polar__icon--cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), filter .28s ease;
}
.side-polar-host .sf-polar--side .sf-polar__cap {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0;
    color: var(--gray);
    max-width: 100%;
    white-space: nowrap;
    transition: color .2s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
}
.side-polar-host .sf-polar--side .sf-polar__shot:hover {
    transform: translateY(-3px);
    z-index: 2;
}
.side-polar-host .sf-polar--side .sf-polar__shot:hover .sf-polar__icon {
    transform: scale(1.12) rotate(-4deg);
    background: color-mix(in srgb, var(--sf-accent) 18%, #fff);
    border-color: color-mix(in srgb, var(--sf-accent) 42%, transparent);
    box-shadow:
        0 6px 14px color-mix(in srgb, var(--sf-accent) 28%, transparent),
        0 2px 4px rgba(0, 0, 0, 0.06);
    color: var(--sf-accent);
}
.side-polar-host .sf-polar--side .sf-polar__shot:hover .sf-polar__icon::after {
    opacity: 0.35;
    transform: scale(1);
}
.side-polar-host .sf-polar--side .sf-polar__shot:hover .sf-polar__icon--cover img {
    transform: scale(1.1);
    filter: saturate(1.08) contrast(1.02);
}
.side-polar-host .sf-polar--side .sf-polar__shot:hover .sf-polar__cap {
    color: var(--sf-accent);
    transform: translateY(-1px);
}
.side-polar-host .sf-polar--side .sf-polar__shot:active {
    transform: translateY(-1px);
}
.side-polar-host .sf-polar--side .sf-polar__shot:active .sf-polar__icon {
    transform: scale(1.04) rotate(0deg);
}
.side-polar-host .sf-polar--side .sf-polar__shot:focus-visible .sf-polar__icon {
    box-shadow: var(--focus-ring);
}
@media (max-width: 768px) {
    .side-polar-host .sf-polar--side .sf-polar__track {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px 6px;
    }
    .side-polar-host .sf-polar--side .sf-polar__icon {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    .side-polar-host .sf-polar--side .sf-polar__cap {
        font-size: 10px;
    }
    .side-polar-host .sf-polar--side .sf-polar__shot:hover {
        transform: translateY(-2px);
    }
}
@media (hover: none) {
    .side-polar-host .sf-polar--side .sf-polar__shot:hover {
        transform: none;
    }
    .side-polar-host .sf-polar--side .sf-polar__shot:hover .sf-polar__icon {
        transform: none;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    }
}
