/* CPU 介绍与特色数智共用视觉语言：右侧透明黑色渐变、主题色短线、细分隔线。
   相机和面板由同一个 JS 进度驱动；桌面从右进入，手机从下进入，外侧可直接拖动三维场景。 */
html.viewer_page button { -webkit-tap-highlight-color: transparent; }
html.viewer_page button:focus { outline: none !important; }
/* 关闭侧栏会把焦点交回画布；去掉浏览器默认的整圈白色焦点轮廓，不改变场景边框 / 圆角。 */
html.viewer_page #webgl_container:focus,
html.viewer_page #webgl_container:focus-visible,
html.viewer_page #webgl_container canvas:focus,
html.viewer_page #webgl_container canvas:focus-visible { outline: none !important; box-shadow: none !important; }
.smart_dialog {
    --smart-dialog-unit: 1vh;
    --smart-dialog-axis: x;
    --smart-dialog-enter: 0;
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0; inset: 0;
    z-index: 80; /* 页面切换胶囊为 85，始终保持可点击。 */
    overflow: hidden;
    pointer-events: none;
    color: #EDF5FF;
}
@supports (height: 1svh) { .smart_dialog { --smart-dialog-unit: 1vh; --smart-dialog-unit: 1svh; } }
.smart_dialog, .smart_dialog * { box-sizing: border-box; }
.smart_dialog[hidden], .smart_dialog [hidden] { display: none !important; }
.smart_dialog[inert] * { pointer-events: none !important; }
.smart_dialog_panel {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: auto; inset: 0 0 0 auto;
    width: 42%;
    max-width: 52rem;
    display: flex;
    flex-direction: column;
    gap: calc(var(--smart-dialog-unit) * 2.5);
    padding: calc(var(--smart-dialog-unit) * 12) 2vw calc(var(--smart-dialog-unit) * 13);
    z-index: 1;
    isolation: isolate;
    background: none;
    transform: translate3d(calc((1 - var(--smart-dialog-enter)) * 100%), 0, 0);
    pointer-events: none;
}
.smart_dialog_panel::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: -32%; inset: 0 0 0 -32%;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(to right, #00000000 0%, #0000000A 8%, #00000024 18%, #0000005C 32%, #000000A3 52%, #000000CF 72%, #000000EB 100%);
}
.smart_dialog.is-open .smart_dialog_panel { pointer-events: auto; }
.smart_dialog_header { position: relative; flex: none; margin: 0; padding: 0 0 1rem; border-bottom: .065rem solid #FFFFFF24; }
.smart_dialog_header::before { content: ''; display: block; width: 2.4rem; height: .15rem; margin-bottom: 1rem; border-radius: 1rem; background: var(--theme-accent, #2273D7); }
.smart_dialog_header h2 { margin: 0; font-size: calc(var(--smart-dialog-unit) * 2.7);  font-weight: 500; line-height: 1.5; letter-spacing: .08em; overflow-wrap: anywhere; }
@supports (width: clamp(1vh, 2vh, 3vh)) {
    .smart_dialog_header h2 { font-size: clamp(1.2rem, calc(var(--smart-dialog-unit) * 2.7), 2rem); }
}

.smart_dialog_close {
    position: absolute;
    top: 50%;
    left: -1.05rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: .45rem;
    width: 2.65rem;
    height: 4.75rem;
    padding: .65rem .3rem;
    border: .065rem solid #B8D8FF38;
    border-radius: 999rem;
    background: linear-gradient(155deg, #14283ACC, #07111DDD);
    box-shadow: inset 0 .065rem 0 #FFFFFF14, 0 .3rem .8rem #00000033;
    color: #D8E9F9;
    font-family: inherit;
    cursor: pointer;
    touch-action: manipulation;
    transition: color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.smart_dialog_close svg { flex: none; display: block; width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform 200ms ease; }
.smart_dialog_close_label { font-size: .68rem; line-height: 1; font-weight: 500; letter-spacing: .12em; white-space: nowrap; padding-left: .12em; }
.smart_dialog_close .smart_dialog_close_icon { display: none; }
.smart_dialog_close:focus-visible { border-color: #AAD8FFB3; box-shadow: inset 0 0 0 .065rem #AAD8FF59, 0 .3rem .8rem #00000033; }
.smart_dialog_close:active { color: #FFFFFF; border-color: #AAD8FFCC; }
.smart_dialog_scroll {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: .35rem;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-color: #FFFFFF40 transparent;
}
.smart_dialog_item { margin: 0; padding: 0 0 1.6rem; }
.smart_dialog_item + .smart_dialog_item { padding-top: 1.6rem; border-top: .065rem solid #FFFFFF14; }
.smart_dialog_images { display: grid; gap: .65rem; margin: 0 0 1.1rem; }
.smart_dialog_images.is-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.smart_dialog_image { display: block; min-width: 0; border-radius: .3rem; cursor: zoom-in; }
.smart_dialog_images img { display: block; width: 100%; min-width: 0; height: auto; object-fit: contain; border-radius: .3rem; }
.smart_image_preview { --fancybox-bg: #03070EF2; }
.smart_dialog_item p { margin: 0; color: #BCCBDB; font-size: calc(var(--smart-dialog-unit) * 1.75);  line-height: 1.95; letter-spacing: .035em; overflow-wrap: anywhere; }
@supports (width: clamp(1vh, 2vh, 3vh)) {
    .smart_dialog_item p { font-size: clamp(.85rem, calc(var(--smart-dialog-unit) * 1.75), 1rem); }
}

/* Firefox 使用原生细滚动条；WebKit / Chromium 用细圆角滑块，透明轨道、无箭头、无发光。 */
@supports selector(::-webkit-scrollbar) { .smart_dialog_scroll { scrollbar-width: auto; scrollbar-color: auto; } }
.smart_dialog_scroll::-webkit-scrollbar { width: .18rem; height: .18rem; }
.smart_dialog_scroll::-webkit-scrollbar-track { background: transparent; }
.smart_dialog_scroll::-webkit-scrollbar-thumb { border-radius: 999rem; background: #FFFFFF40; }
.smart_dialog_scroll::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
@media (hover: hover) {
    .smart_dialog_close:hover { color: #FFFFFF; border-color: #8EC7FF99; box-shadow: inset 0 .065rem 0 #FFFFFF26, 0 .3rem 1rem #0000004D; }
    .smart_dialog_close:hover .smart_dialog_close_desktop { transform: translateX(.12rem); }
    .smart_dialog_scroll:hover::-webkit-scrollbar-thumb { background: #FFFFFF70; }
}
/* 竖屏为底部内容区，场景移向上方剩余区域；safe-area 不支持时保留基础内边距。 */
@media (max-width: 75em) and (max-aspect-ratio: 1/1) {
    .smart_dialog { --smart-dialog-axis: y; }
    .smart_dialog_panel {
        top: auto; right: 0; bottom: 0; left: 0; inset: auto 0 0;
        width: 100%;
        max-width: none;
        height: 52%;
        gap: .9rem;
        padding: calc(var(--smart-dialog-unit) * 3) 1rem calc(var(--smart-dialog-unit) * 12);
        padding-bottom: calc(var(--smart-dialog-unit) * 12 + env(safe-area-inset-bottom, 0rem));
    }
    .smart_dialog_panel::before { top: -18%; right: 0; bottom: 0; left: 0; inset: -18% 0 0; background: linear-gradient(to bottom, #00000000 0%, #0000000A 8%, #00000024 18%, #0000005C 32%, #000000A3 52%, #000000CF 72%, #000000EB 100%); }
    .smart_dialog_header { padding-right: 3rem; padding-bottom: .65rem; }
    .smart_dialog_header::before { margin-bottom: .6rem; }
    .smart_dialog_header h2 { font-size: calc(var(--smart-dialog-unit) * 2.5);  line-height: 1.45; }
@supports (width: clamp(1vh, 2vh, 3vh)) {
    .smart_dialog_header h2 { font-size: clamp(1.05rem, calc(var(--smart-dialog-unit) * 2.5), 1.5rem); }
}

    .smart_dialog_close { top: calc(var(--smart-dialog-unit) * 3 + .15rem); right: .65rem; left: auto; transform: none; width: 2.75rem; height: 2.75rem; padding: .6rem; border-radius: .9rem; }
    .smart_dialog_close_label { display: none; }
    .smart_dialog_close .smart_dialog_close_icon { display: block; }
    .smart_dialog_close .smart_dialog_close_desktop { display: none; }
    .smart_dialog_item p { font-size: .9rem; line-height: 1.85; }
}
@media (max-width: 62.25em), (max-width: 75em) and (pointer: coarse) {
    .smart_dialog_panel { transform: translate3d(0, calc((1 - var(--smart-dialog-enter)) * 100%), 0); }
}
@media (max-width: 62.25em) and (max-height: 30em) and (orientation: landscape) {
    .smart_dialog_panel { width: 48%; max-width: none; padding: calc(var(--smart-dialog-unit) * 8) 1rem calc(var(--smart-dialog-unit) * 23) 2vw; gap: .6rem; }
    .smart_dialog_header { padding-right: 3rem; padding-bottom: .5rem; }
    .smart_dialog_header::before { display: none; }
    .smart_dialog_header h2 { font-size: 1.05rem; }
    .smart_dialog_close { top: calc(var(--smart-dialog-unit) * 8); right: .65rem; left: auto; transform: none; width: 2.75rem; height: 2.75rem; padding: .6rem; border-radius: .9rem; }
    .smart_dialog_close_label { display: none; }
    .smart_dialog_close .smart_dialog_close_icon { display: block; }
    .smart_dialog_close .smart_dialog_close_desktop { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .smart_dialog_panel { transform: none; }
    .smart_dialog_close, .smart_dialog_close svg { transition: none; }
}
