/* AI 场景底部控制：半透明胶囊 + 滑动选中块，独立于普通产品导航。
   所有 svh 均在 vh 版本之后；env 不支持时保留前一条底部间距。 */
html.viewer_page .smart_dock {
    --smart-dock-unit: 1vh;
    --smart-selected: 0;
    --smart-dock-height: calc(var(--smart-dock-unit) * 6.4); 
    position: fixed;
    left: 50%;
    bottom: calc(var(--smart-dock-unit) * 2.8);
    bottom: calc(var(--smart-dock-unit) * 2.8 + env(safe-area-inset-bottom, 0rem));
    z-index: 85;
    display: flex;
    align-items: stretch;
    gap: .6rem;
    width: calc(100% - var(--smart-dock-unit) * 4); 
    max-width: calc(100% - 1.5rem);
    color: #DCE7F5;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, .9rem);
    transition: opacity 350ms ease, transform 500ms cubic-bezier(.22, 1, .36, 1), visibility 0s linear 500ms;
}
@supports (width: clamp(1vh, 2vh, 3vh)) {
    html.viewer_page .smart_dock { --smart-dock-height: clamp(2.8rem, calc(var(--smart-dock-unit) * 6.4), 3.6rem); }
}
@supports (width: min(1vh, 1vw)) {
    html.viewer_page .smart_dock { width: min(31rem, calc(100% - var(--smart-dock-unit) * 4)); }
}

@supports (height: 1svh) {
    html.viewer_page .smart_dock { --smart-dock-unit: 1vh; --smart-dock-unit: 1svh; }
}
html.viewer_page .smart_dock, html.viewer_page .smart_dock * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html.viewer_page .smart_dock.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
    transition-delay: 0s;
}
html.viewer_page .smart_segments, html.viewer_page .smart_dock_exit {
    position: relative;
    min-height: var(--smart-dock-height);
    border: .065rem solid rgba(215, 233, 255, .2);
    border-radius: 999rem;
    background: rgba(20, 25, 40, .82);
    box-shadow: inset 0 .07rem 0 rgba(255, 255, 255, .12), 0 .7rem 2.5rem rgba(0, 0, 0, .28);
    -webkit-backdrop-filter: blur(.95rem) saturate(135%);
    backdrop-filter: blur(.95rem) saturate(135%);
}
html.viewer_page .smart_segments {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: .25rem;
    isolation: isolate;
}
html.viewer_page .smart_segment_selection {
    position: absolute;
    z-index: -1;
    top: .25rem;
    bottom: .25rem;
    left: .25rem;
    width: calc((100% - .5rem) / 3);
    border-radius: 999rem;
    background: linear-gradient(165deg, #F6FAFF, #D9E5F3);
    box-shadow: inset 0 .07rem 0 #FFFFFF, 0 .15rem .5rem rgba(0, 0, 0, .18);
    transform: translateX(calc(var(--smart-selected, 0) * 100%));
    transition: transform 420ms cubic-bezier(.22, 1, .36, 1);
    pointer-events: none;
}
html.viewer_page .smart_segments button, html.viewer_page .smart_dock_exit {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    font-size: calc(var(--smart-dock-unit) * 1.65); 
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
    touch-action: manipulation;
}
@supports (width: clamp(1vh, 2vh, 3vh)) {
    html.viewer_page .smart_segments button, html.viewer_page .smart_dock_exit { font-size: clamp(.75rem, calc(var(--smart-dock-unit) * 1.65), .94rem); }
}

html.viewer_page .smart_segments button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: .65em .55em;
    border: 0;
    border-radius: 999rem;
    color: #B6C5D9;
    background: transparent;
    transition: color 220ms ease, opacity 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}
html.viewer_page .smart_segments button[aria-pressed="true"] { color: #15263D; }
html.viewer_page .smart_dock_exit {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: .4em;
    padding: .65em 1.05em;
    color: #DCE7F5;
    transition: background 220ms ease, color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}
html.viewer_page .smart_dock_exit svg { display: block; width: 1.2em; height: 1.2em; flex: none; }
html.viewer_page .smart_segments button:focus-visible { box-shadow: inset 0 0 0 .12rem #6B97FF; }
html.viewer_page .smart_dock_exit:focus-visible { box-shadow: inset 0 0 0 .12rem #A3C8FF; }
html.viewer_page .smart_segments button:active, html.viewer_page .smart_dock_exit:active { transform: scale(.96); }
html.viewer_page .smart_dock button:disabled { cursor: default; }
html.viewer_page .ai_empower[hidden] { display: none !important; }
@media (hover: hover) and (pointer: fine) {
    html.viewer_page .smart_segments button:not([aria-pressed="true"]):hover { color: #FFFFFF; }
    html.viewer_page .smart_dock_exit:hover { background: rgba(48, 62, 83, .9); color: #FFFFFF; }
}
@media (max-width: 62.25em), (max-width: 75em) and (max-aspect-ratio: 4/3), (max-width: 75em) and (pointer: coarse) {
    html.viewer_page .smart_dock {
        --smart-dock-height: calc(var(--smart-dock-unit) * 6); 
        gap: .4rem;
        width: calc(100% - 1.5rem); width: min(29rem, calc(100% - 1.5rem));
        bottom: calc(var(--smart-dock-unit) * 2);
        bottom: calc(var(--smart-dock-unit) * 2 + env(safe-area-inset-bottom, 0rem));
    }
@supports (width: clamp(1vh, 2vh, 3vh)) {
    html.viewer_page .smart_dock { --smart-dock-height: clamp(2.85rem, calc(var(--smart-dock-unit) * 6), 3.3rem); }
}

    html.viewer_page .smart_segments button, html.viewer_page .smart_dock_exit { font-size: calc(var(--smart-dock-unit) * 1.6);  }
@supports (width: clamp(1vh, 2vh, 3vh)) {
    html.viewer_page .smart_segments button, html.viewer_page .smart_dock_exit { font-size: clamp(.75rem, calc(var(--smart-dock-unit) * 1.6), .88rem); }
}

    html.viewer_page .smart_segments button { padding-left: .25em; padding-right: .25em; padding-inline: .25em; }
    html.viewer_page .smart_dock_exit { padding-left: .8em; padding-right: .8em; padding-inline: .8em; gap: .25em; }
}
@media (prefers-reduced-motion: reduce) {
    html.viewer_page .smart_dock, html.viewer_page .smart_segment_selection { transition-duration: 150ms; }
}
