.ai3d-workbench-view-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.ai3d-workbench-view-btn {
    /* AI3D_BUTTON_VISIBILITY_GUARD */
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid rgba(138, 162, 204, 0.2);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(18, 24, 35, 0.96), rgba(10, 15, 24, 0.96));
    color: #dbe5f7;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 18px 36px rgba(236, 190, 82, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 36px rgba(236, 190, 82, 0.24), 0 12px 24px rgba(4, 10, 20, 0.22);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ai3d-workbench-view-btn:hover:not([disabled]) {
    border-color: rgba(160, 188, 236, 0.3);
    background: linear-gradient(180deg, rgba(22, 30, 44, 0.98), rgba(12, 18, 29, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 38px rgba(236, 190, 82, 0.3), 0 14px 26px rgba(4, 10, 20, 0.24);
    transform: translateY(-1px);
}

.ai3d-workbench-view-btn:focus {
    outline: none;
}

.ai3d-workbench-view-btn:focus-visible {
    border-color: rgba(120, 179, 255, 0.4);
    box-shadow:
        0 12px 24px rgba(4, 10, 20, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 3px rgba(66, 139, 255, 0.16);
}

.ai3d-workbench-view-btn[aria-pressed="true"] {
    border-color: rgba(120, 179, 255, 0.36);
    background: linear-gradient(180deg, rgba(24, 34, 52, 0.98), rgba(12, 19, 31, 0.98));
    color: #eef5ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 38px rgba(236, 190, 82, 0.28), 0 12px 24px rgba(4, 10, 20, 0.24);
}

.ai3d-workbench-view-btn[disabled] {
    opacity: 0.82;
    cursor: not-allowed;
    transform: none;
}

html[data-theme-preset] body.ai3d-page-active .ai3d-workbench-view-btn,
html[data-theme-preset] body.ai3d-page-active .ai3d-workbench-view-btn[disabled],
html[data-theme-preset] body.ai3d-page-active .ai3d-workbench-view-btn[aria-pressed="true"] {
    border-color: var(--xl-theme-border, #211c10);
    background: linear-gradient(180deg, var(--xl-theme-panel, #11100d), var(--xl-theme-bg, #0a0a0a));
    color: var(--xl-theme-fg, #e0d9c8);
    text-shadow: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 24px rgba(4, 10, 20, 0.22);
}

html[data-theme-preset] body.ai3d-page-active .ai3d-workbench-view-btn:hover:not([disabled]) {
    border-color: var(--xl-theme-accent, #d4a843);
    background: linear-gradient(180deg, var(--xl-theme-panel, #11100d), var(--xl-theme-bg, #0a0a0a));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 12px 24px var(--xl-theme-soft, rgba(80, 142, 255, 0.18));
}

html[data-theme-preset] body.ai3d-page-active .ai3d-workbench-view-btn:focus-visible {
    border-color: var(--xl-theme-accent, #d4a843);
    box-shadow:
        0 12px 24px var(--xl-theme-soft, rgba(80, 142, 255, 0.18)),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 3px var(--a9-focus-shadow, var(--xl-theme-soft, rgba(80, 142, 255, 0.18)));
}

@supports (background: color-mix(in srgb, #000 50%, #fff)) {
html[data-theme-preset] body.ai3d-page-active .ai3d-workbench-view-btn,
html[data-theme-preset] body.ai3d-page-active .ai3d-workbench-view-btn[disabled],
html[data-theme-preset] body.ai3d-page-active .ai3d-workbench-view-btn[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--xl-theme-accent, #d4a843) 34%, var(--xl-theme-border, #211c10));
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--xl-theme-accent, #d4a843) 10%, var(--xl-theme-panel, #11100d)),
            color-mix(in srgb, var(--xl-theme-accent, #d4a843) 4%, var(--xl-theme-bg, #0a0a0a))
        );
    color: color-mix(in srgb, var(--xl-theme-fg, #e0d9c8) 94%, #fff);
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, var(--xl-theme-fg, #e0d9c8) 8%, transparent),
        0 12px 24px color-mix(in srgb, var(--xl-theme-accent, #d4a843) 16%, transparent);
}

html[data-theme-preset] body.ai3d-page-active .ai3d-workbench-view-btn:hover:not([disabled]) {
    border-color: color-mix(in srgb, var(--xl-theme-accent, #d4a843) 52%, var(--xl-theme-border, #211c10));
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--xl-theme-accent, #d4a843) 16%, var(--xl-theme-panel, #11100d)),
            color-mix(in srgb, var(--xl-theme-accent, #d4a843) 8%, var(--xl-theme-bg, #0a0a0a))
        );
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, var(--xl-theme-fg, #e0d9c8) 10%, transparent),
        0 12px 24px color-mix(in srgb, var(--xl-theme-accent, #d4a843) 20%, transparent);
}

html[data-theme-preset] body.ai3d-page-active .ai3d-workbench-view-btn:focus-visible {
    border-color: color-mix(in srgb, var(--xl-theme-accent, #d4a843) 52%, var(--xl-theme-border, #211c10));
    box-shadow:
        0 12px 24px color-mix(in srgb, var(--xl-theme-accent, #d4a843) 20%, transparent),
        inset 0 1px 0 color-mix(in srgb, var(--xl-theme-fg, #e0d9c8) 10%, transparent),
        0 0 0 3px color-mix(in srgb, var(--xl-theme-accent, #d4a843) 18%, transparent);
}
}

.ai3d-turntable-duration-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(220px, calc(100vw - 36px));
    padding: 14px;
    border: 1px solid rgba(142, 196, 255, 0.2);
    border-radius: 18px;
    background:
        linear-gradient(160deg, rgba(12, 21, 35, 0.96), rgba(6, 11, 20, 0.94)),
        radial-gradient(circle at top right, rgba(72, 193, 255, 0.2), transparent 54%);
    box-shadow:
        0 22px 38px rgba(3, 8, 18, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.ai3d-turntable-duration-popover[hidden] {
    display: none;
}

.ai3d-turntable-duration-title {
    color: #f4f8ff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ai3d-turntable-duration-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(154, 198, 255, 0.16);
    border-radius: 14px;
    background: rgba(9, 16, 28, 0.72);
}

.ai3d-turntable-duration-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #f7fbff;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    appearance: textfield;
}

.ai3d-turntable-duration-input::-webkit-outer-spin-button,
.ai3d-turntable-duration-input::-webkit-inner-spin-button {
    margin: 0;
    appearance: none;
}

.ai3d-turntable-duration-unit {
    flex: 0 0 auto;
    color: rgba(212, 228, 255, 0.78);
    font-size: 12px;
    font-weight: 600;
}

.ai3d-turntable-duration-hint {
    color: rgba(214, 229, 255, 0.78);
    font-size: 12px;
    line-height: 1.5;
}

.ai3d-turntable-duration-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.ai3d-turntable-duration-btn {
    min-width: 68px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(137, 193, 255, 0.22);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(30, 97, 180, 0.9), rgba(18, 57, 112, 0.92));
    color: #f7fbff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.ai3d-turntable-duration-btn:hover {
    transform: translateY(-1px);
}

.ai3d-turntable-duration-btn:focus {
    outline: none;
}

.ai3d-turntable-duration-btn:focus-visible {
    border-color: rgba(145, 203, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(66, 139, 255, 0.16);
}

.ai3d-turntable-duration-btn--ghost {
    background: rgba(13, 24, 40, 0.72);
    color: rgba(225, 237, 255, 0.92);
}

.ai3d-right-dock {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 4;
    display: grid;
    justify-items: end;
    gap: 10px;
    width: auto;
    min-width: 0;
    max-width: calc(100% - 36px);
}
