/* 3DPO Full Color Studio - matches the site's synthwave dark theme
   (navy #0a0e27/#050714, neon pink #ff006e, neon blue #00d9ff, neon
   purple #8338ec; Rajdhani body / Audiowide display). !important
   throughout per this site's established theme-override convention. */

.tdpo-fcs-root,
.tdpo-fcs-root *,
.tdpo-fcs-root *::before,
.tdpo-fcs-root *::after {
    box-sizing: border-box;
    border: 0 !important;
    outline: none !important;
    box-shadow: none;
}

.tdpo-fcs-root {
    box-shadow: none !important;
    position: relative !important;
    max-width: 960px;
    margin: 0 auto !important;
    font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 500 !important;
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    font-size: 16px !important;
}

.tdpo-fcs-disclaimer {
    background: rgba(255, 0, 110, 0.08) !important;
    border: 1px solid rgba(255, 0, 110, 0.35) !important;
    border-radius: 6px !important;
    padding: 14px 18px !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    margin-bottom: 16px !important;
}

.tdpo-fcs-disclaimer p:last-child {
    margin-bottom: 0 !important;
}

.tdpo-fcs-toolbar {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    margin-bottom: 10px !important;
    flex-wrap: wrap !important;
}

.tdpo-fcs-btn {
    background: var(--tdpo-fcs-surface-bg, #0a0e27) !important;
    border: 1px solid var(--tdpo-fcs-border, #8338ec) !important;
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    border-radius: 6px !important;
    padding: 9px 16px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: 'Rajdhani', sans-serif !important;
    letter-spacing: 0.02em !important;
    cursor: pointer !important;
}

.tdpo-fcs-btn:hover {
    border-color: var(--tdpo-fcs-accent, #00d9ff) !important;
    color: var(--tdpo-fcs-accent, #00d9ff) !important;
}

.tdpo-fcs-btn--active {
    background: var(--tdpo-fcs-accent, #00d9ff) !important;
    color: #050714 !important;
    border-color: var(--tdpo-fcs-accent, #00d9ff) !important;
}

.tdpo-fcs-btn--active:hover {
    color: #050714 !important;
}

.tdpo-fcs-btn--icon-lg {
    font-size: 20px !important;
    line-height: 1 !important;
    padding: 4px 12px !important;
    font-weight: 900 !important;
}

.tdpo-fcs-btn--danger {
    border-color: var(--tdpo-fcs-button-bg, #ff006e) !important;
    color: var(--tdpo-fcs-button-bg, #ff006e) !important;
}

.tdpo-fcs-btn--danger:hover {
    background: var(--tdpo-fcs-button-bg, #ff006e) !important;
    color: #ffffff !important;
}

.tdpo-fcs-filename {
    font-size: 15px !important;
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    opacity: 0.7 !important;
    flex: 1 !important;
}

.tdpo-fcs-mode-group,
.tdpo-fcs-tool-group {
    display: flex !important;
    gap: 6px !important;
}

.tdpo-fcs-slider-field {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    white-space: nowrap !important;
}

/* --- Custom glowing sliders: bordered circle thumb on a glowing track --- */
.tdpo-fcs-slider-field input[type="range"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 120px !important;
    height: 6px !important;
    background: linear-gradient(90deg, var(--tdpo-fcs-accent, #00d9ff), var(--tdpo-fcs-border, #8338ec)) !important;
    border-radius: 4px !important;
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.6) !important;
    outline: none !important;
    cursor: pointer !important;
}

.tdpo-fcs-slider-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #050714 !important;
    border: 2px solid var(--tdpo-fcs-accent, #00d9ff) !important;
    box-shadow: 0 0 6px var(--tdpo-fcs-accent, #00d9ff) !important;
    cursor: pointer !important;
}

.tdpo-fcs-slider-field input[type="range"]::-moz-range-track {
    height: 6px !important;
    background: linear-gradient(90deg, var(--tdpo-fcs-accent, #00d9ff), var(--tdpo-fcs-border, #8338ec)) !important;
    border-radius: 4px !important;
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.6) !important;
}

.tdpo-fcs-slider-field input[type="range"]::-moz-range-thumb {
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: #050714 !important;
    border: 2px solid var(--tdpo-fcs-accent, #00d9ff) !important;
    box-shadow: 0 0 6px var(--tdpo-fcs-accent, #00d9ff) !important;
    cursor: pointer !important;
}

.tdpo-fcs-slider-field span {
    min-width: 55px !important;
    font-size: 13px !important;
    opacity: 0.75 !important;
}

.tdpo-fcs-swatches {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin-left: auto !important;
}

.tdpo-fcs-swatch {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    border: 2px solid var(--tdpo-fcs-border, #8338ec) !important;
    cursor: pointer !important;
    padding: 0 !important;
}

.tdpo-fcs-swatch--active {
    border-color: var(--tdpo-fcs-accent, #00d9ff) !important;
    box-shadow: 0 0 10px var(--tdpo-fcs-accent, #00d9ff) !important;
}

.tdpo-fcs-viewport {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 5 / 4 !important;
    max-height: 82vh !important;
    min-height: 420px !important;
    border: 1px solid var(--tdpo-fcs-border, #8338ec) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: var(--tdpo-fcs-panel-bg, #050714) !important;
}

.tdpo-fcs-viewport canvas {
    display: block !important;
}

.tdpo-fcs-overlay {
    position: absolute !important;
    z-index: 15 !important;
    background: rgba(5, 7, 20, 0.78) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid var(--tdpo-fcs-border, #8338ec) !important;
    border-radius: 8px !important;
    padding: 8px 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.tdpo-fcs-overlay-top {
    top: 10px !important;
    left: 10px !important;
    max-width: calc(100% - 146px) !important;
}

.tdpo-fcs-overlay-top-actions {
    display: flex !important;
    gap: 4px !important;
    margin-left: 4px !important;
    padding-left: 8px !important;
    border-left: 1px solid rgba(131, 56, 236, 0.4) !important;
}

.tdpo-fcs-overlay-options {
    top: 58px !important;
    left: 10px !important;
    max-width: calc(100% - 146px) !important;
}

.tdpo-fcs-overlay-options-body {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.tdpo-fcs-overlay-options-row {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.tdpo-fcs-overlay-bottom {
    bottom: 10px !important;
    left: 10px !important;
    right: 10px !important;
    justify-content: center !important;
}

.tdpo-fcs-overlay-transform {
    top: 10px !important;
    right: 132px !important;
    padding: 6px !important;
    flex-direction: column !important;
    align-items: flex-end !important;
}

.tdpo-fcs-gizmo-readout {
    display: flex !important;
    gap: 14px !important;
    font-size: 13px !important;
    background: rgba(0, 0, 0, 0.25) !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
}

.tdpo-fcs-gizmo-readout .tdpo-fcs-axis-x { color: #ff4d4d !important; }
.tdpo-fcs-gizmo-readout .tdpo-fcs-axis-y { color: #4dff4d !important; }
.tdpo-fcs-gizmo-readout .tdpo-fcs-axis-z { color: #4d9fff !important; }

.tdpo-fcs-gizmo-uniform-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    cursor: pointer !important;
}

.tdpo-fcs-overlay-transform-body {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    margin-top: 6px !important;
    background: rgba(5, 7, 20, 0.92) !important;
    border: 1px solid var(--tdpo-fcs-border, #8338ec) !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 250px !important;
}

.tdpo-fcs-orientation-cube-wrap {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 15 !important;
    width: 112px !important;
    height: 112px !important;
    cursor: pointer !important;
}

.tdpo-fcs-orientation-cube {
    width: 112px !important;
    height: 112px !important;
    display: block !important;
}

.tdpo-fcs-select-tool-prompt {
    position: absolute !important;
    bottom: 68px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 14 !important;
    background: rgba(5, 7, 20, 0.85) !important;
    border: 1px solid var(--tdpo-fcs-accent, #00d9ff) !important;
    border-radius: 8px !important;
    padding: 10px 18px !important;
    color: var(--tdpo-fcs-accent, #00d9ff) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.tdpo-fcs-empty-state {
    position: absolute !important;
    inset: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    text-align: center !important;
    cursor: pointer !important;
    border: 2px dashed var(--tdpo-fcs-border, #8338ec) !important;
    border-radius: 10px !important;
    background: rgba(131, 56, 236, 0.05) !important;
    transition: border-color 0.15s ease, background 0.15s ease !important;
}

.tdpo-fcs-empty-state:hover {
    border-color: var(--tdpo-fcs-accent, #00d9ff) !important;
    background: rgba(0, 217, 255, 0.06) !important;
}

.tdpo-fcs-empty-state--dragover {
    border-color: var(--tdpo-fcs-button-bg, #ff006e) !important;
    background: rgba(255, 0, 110, 0.1) !important;
}

.tdpo-fcs-swatch-wrap {
    position: relative !important;
    display: inline-block !important;
}

.tdpo-fcs-swatch-edit {
    position: absolute !important;
    bottom: -4px !important;
    right: -4px !important;
    width: 15px !important;
    height: 15px !important;
    border-radius: 50% !important;
    background: var(--tdpo-fcs-surface-bg, #0a0e27) !important;
    border: 1px solid var(--tdpo-fcs-border, #8338ec) !important;
    color: var(--tdpo-fcs-accent, #00d9ff) !important;
    font-size: 9px !important;
    line-height: 13px !important;
    text-align: center !important;
    cursor: pointer !important;
    padding: 0 !important;
}

.tdpo-fcs-swatch-edit:hover {
    background: var(--tdpo-fcs-accent, #00d9ff) !important;
    color: #050714 !important;
}

.tdpo-fcs-empty-state-icon {
    font-size: 40px !important;
    line-height: 1 !important;
    color: var(--tdpo-fcs-accent, #00d9ff) !important;
    font-family: 'Audiowide', sans-serif !important;
}

.tdpo-fcs-empty-state-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    font-family: 'Audiowide', 'Rajdhani', sans-serif !important;
    letter-spacing: 0.02em !important;
}

.tdpo-fcs-empty-state-sub {
    font-size: 14px !important;
    opacity: 0.65 !important;
}

.tdpo-fcs-status {
    margin-top: 8px !important;
    font-size: 14px !important;
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    opacity: 0.8 !important;
    min-height: 18px !important;
    line-height: 1.5 !important;
}

.tdpo-fcs-status--error {
    color: var(--tdpo-fcs-button-bg, #ff006e) !important;
    opacity: 1 !important;
    font-weight: 600 !important;
}

/* --- Texture-choice modal (OBJ import) --- */
.tdpo-fcs-modal-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(5, 7, 20, 0.75) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
}

.tdpo-fcs-modal {
    position: relative !important;
    background: var(--tdpo-fcs-surface-bg, #0a0e27) !important;
    border: 1px solid var(--tdpo-fcs-border, #8338ec) !important;
    border-radius: 10px !important;
    padding: 28px 30px !important;
    max-width: 380px !important;
    width: 90% !important;
    box-shadow: 0 0 30px rgba(131, 56, 236, 0.4) !important;
}

.tdpo-fcs-modal h3 {
    font-family: 'Audiowide', 'Rajdhani', sans-serif !important;
    font-size: 18px !important;
    color: var(--tdpo-fcs-accent, #00d9ff) !important;
    margin: 0 0 12px !important;
}

.tdpo-fcs-modal p {
    font-size: 15px !important;
    line-height: 1.5 !important;
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    opacity: 0.85 !important;
    margin: 0 0 20px !important;
}

.tdpo-fcs-help-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.tdpo-fcs-help-list li {
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    opacity: 0.9 !important;
    padding-left: 14px !important;
    border-left: 2px solid var(--tdpo-fcs-accent, #00d9ff) !important;
}

.tdpo-fcs-help-list li strong {
    color: var(--tdpo-fcs-accent, #00d9ff) !important;
    opacity: 1 !important;
}

.tdpo-fcs-help-sublist {
    list-style: none !important;
    padding: 8px 0 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.tdpo-fcs-help-sublist li {
    border-left: none !important;
    padding-left: 0 !important;
    opacity: 0.8 !important;
}

.tdpo-fcs-help-note {
    font-size: 13px !important;
    font-style: italic !important;
    opacity: 0.65 !important;
    margin: 0 !important;
}

.tdpo-fcs-modal-actions {
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
}

.tdpo-fcs-modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 12px !important;
    background: none !important;
    border: none !important;
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    font-size: 22px !important;
    cursor: pointer !important;
    opacity: 0.6 !important;
    line-height: 1 !important;
}

.tdpo-fcs-modal-close:hover {
    opacity: 1 !important;
}

.tdpo-fcs-loading-overlay {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    background: rgba(5, 7, 20, 0.85) !important;
    z-index: 10 !important;
}

.tdpo-fcs-spinner {
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    border: 4px solid rgba(255, 0, 110, 0.2) !important;
    border-top-color: var(--tdpo-fcs-button-bg, #ff006e) !important;
    box-shadow: 0 0 12px rgba(255, 0, 110, 0.5) !important;
    animation: tdpo-fcs-spin 0.9s linear infinite !important;
}

@keyframes tdpo-fcs-spin {
    to { transform: rotate(360deg); }
}

.tdpo-fcs-loading-text {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--tdpo-fcs-button-bg, #ff006e) !important;
    letter-spacing: 0.02em !important;
}

.tdpo-fcs-help-btn {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    border: 1px solid var(--tdpo-fcs-border, #8338ec) !important;
    background: transparent !important;
    color: var(--tdpo-fcs-accent, #00d9ff) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 18px !important;
    text-align: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

.tdpo-fcs-help-btn:hover {
    background: var(--tdpo-fcs-accent, #00d9ff) !important;
    color: #050714 !important;
}

.tdpo-fcs-section-label {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    opacity: 0.75 !important;
}

.tdpo-fcs-transform-size {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.tdpo-fcs-transform-size input[type="number"] {
    width: 70px !important;
    background: var(--tdpo-fcs-panel-bg, #050714) !important;
    border: 1px solid var(--tdpo-fcs-border, #8338ec) !important;
    border-radius: 5px !important;
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    padding: 6px 8px !important;
    font-size: 14px !important;
    font-family: 'Rajdhani', sans-serif !important;
}

.tdpo-fcs-transform-size select {
    background: var(--tdpo-fcs-panel-bg, #050714) !important;
    border: 1px solid var(--tdpo-fcs-border, #8338ec) !important;
    border-radius: 5px !important;
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    padding: 6px 8px !important;
    font-size: 14px !important;
    font-family: 'Rajdhani', sans-serif !important;
}

.tdpo-fcs-transform-axis-label {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--tdpo-fcs-accent, #00d9ff) !important;
    min-width: 14px !important;
}

.tdpo-fcs-transform-rotate-grid {
    display: flex !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
}

.tdpo-fcs-rotate-group {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
}

.tdpo-fcs-rotate-group span {
    min-width: 18px !important;
    opacity: 0.75 !important;
}

.tdpo-fcs-swatch--add {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--tdpo-fcs-accent, #00d9ff) !important;
    background: transparent !important;
    border-style: dashed !important;
}

.tdpo-fcs-swatch--add:hover {
    background: rgba(0, 217, 255, 0.1) !important;
}

.tdpo-fcs-texture-dropzone {
    border: 2px dashed var(--tdpo-fcs-border, #8338ec) !important;
    border-radius: 8px !important;
    padding: 24px 16px !important;
    text-align: center !important;
    font-size: 14px !important;
    opacity: 0.7 !important;
    cursor: pointer !important;
    margin: 10px 0 !important;
    transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease !important;
}

.tdpo-fcs-texture-dropzone:hover {
    opacity: 1 !important;
    border-color: var(--tdpo-fcs-accent, #00d9ff) !important;
    background: rgba(0, 217, 255, 0.06) !important;
}

.tdpo-fcs-texture-dropzone--dragover {
    opacity: 1 !important;
    border-color: var(--tdpo-fcs-button-bg, #ff006e) !important;
    background: rgba(255, 0, 110, 0.1) !important;
}

.tdpo-fcs-gradient-controls {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    flex-wrap: wrap !important;
}

.tdpo-fcs-gradient-controls input[type="color"] {
    width: 34px !important;
    height: 30px !important;
    border: 1px solid var(--tdpo-fcs-border, #8338ec) !important;
    border-radius: 5px !important;
    background: none !important;
    cursor: pointer !important;
    padding: 1px !important;
}

.tdpo-fcs-gradient-hint {
    font-size: 12px !important;
    opacity: 0.6 !important;
    font-style: italic !important;
}

.tdpo-fcs-modal input[type="color"] {
    width: 100% !important;
    height: 44px !important;
    border: 1px solid var(--tdpo-fcs-border, #8338ec) !important;
    border-radius: 6px !important;
    background: none !important;
    cursor: pointer !important;
    padding: 2px !important;
    margin: 4px 0 !important;
}

.tdpo-fcs-color-preview {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 12px 0 !important;
    font-size: 13px !important;
}

.tdpo-fcs-color-preview-swatch {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    border: 2px solid var(--tdpo-fcs-border, #8338ec) !important;
    flex-shrink: 0 !important;
}

.tdpo-fcs-color-preview-text {
    opacity: 0.8 !important;
    line-height: 1.4 !important;
}

/* Utility: MUST stay last in this file. Toggled via classList (not inline
   style) for any element whose base class also sets display:flex
   !important (slider-field, empty-state, modal-overlay) -- an inline
   style="display:none" cannot win against an !important stylesheet rule,
   which was the root cause of the texture-modal-always-visible bug. */
.tdpo-fcs-tutorial-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000 !important;
    background: rgba(5, 7, 20, 0.85) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tdpo-fcs-tutorial-welcome-card {
    background: var(--tdpo-fcs-surface-bg, #0a0e27) !important;
    border: 1px solid var(--tdpo-fcs-accent, #00d9ff) !important;
    border-radius: 12px !important;
    padding: 32px !important;
    max-width: 420px !important;
    text-align: center !important;
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.25) !important;
}

.tdpo-fcs-tutorial-welcome-card h3 {
    font-family: 'Audiowide', sans-serif !important;
    color: var(--tdpo-fcs-accent, #00d9ff) !important;
    font-size: 20px !important;
    margin: 0 0 14px !important;
}

.tdpo-fcs-tutorial-welcome-card p {
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    opacity: 0.85 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    margin: 0 0 22px !important;
}

.tdpo-fcs-tutorial-welcome-card .tdpo-fcs-modal-actions {
    display: flex !important;
    gap: 10px !important;
    justify-content: center !important;
}

/* The classic "spotlight cutout" trick: the highlight box itself has no
   fill, just a border, but its box-shadow extends 9999px in every
   direction -- since box-shadow doesn't get clipped by the box's own
   bounds, this darkens the ENTIRE rest of the page while leaving the
   box's interior (over the real UI, which sits at a lower z-index)
   untouched. No actual DOM cutout/clip-path needed. */
.tdpo-fcs-tutorial-highlight {
    position: fixed !important;
    z-index: 100001 !important;
    border: 2px solid var(--tdpo-fcs-accent, #00d9ff) !important;
    border-radius: 10px !important;
    box-shadow: 0 0 0 9999px rgba(5, 7, 20, 0.82), 0 0 24px rgba(0, 217, 255, 0.5) !important;
    pointer-events: none !important;
    transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease !important;
}

.tdpo-fcs-tutorial-callout {
    position: fixed !important;
    z-index: 100002 !important;
    background: var(--tdpo-fcs-surface-bg, #0a0e27) !important;
    border: 1px solid var(--tdpo-fcs-accent, #00d9ff) !important;
    border-radius: 10px !important;
    padding: 16px 18px !important;
    width: 300px !important;
    box-shadow: 0 0 24px rgba(0, 217, 255, 0.35) !important;
    transition: top 0.25s ease, left 0.25s ease !important;
}

.tdpo-fcs-tutorial-callout-step {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    color: var(--tdpo-fcs-accent, #00d9ff) !important;
    opacity: 0.8 !important;
    margin-bottom: 6px !important;
}

.tdpo-fcs-tutorial-callout h4 {
    font-family: 'Audiowide', sans-serif !important;
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    font-size: 16px !important;
    margin: 0 0 8px !important;
}

.tdpo-fcs-tutorial-callout p {
    color: var(--tdpo-fcs-text, #e8e8f5) !important;
    opacity: 0.85 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin: 0 0 16px !important;
}

.tdpo-fcs-tutorial-callout-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.tdpo-fcs-tutorial-callout-nav {
    display: flex !important;
    gap: 6px !important;
}

.tdpo-fcs-hidden {
    display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   EMBEDDED IN THE ESTIMATOR
   The same viewport serves single, multi and full color prints. Tools that a
   mode cannot use are hidden rather than disabled, so the interface only ever
   offers what the chosen print type actually supports.
   ══════════════════════════════════════════════════════════════════════════ */

.tdpo-fcs-root.tdpo-fcs-embedded { margin: 0 !important; border-radius: 0 !important; }

/* Tools a mode cannot use are DISABLED, not hidden.
   Hiding them emptied the toolbar in single color mode and left the tutorial
   pointing at nothing. Greyed-out controls also tell the customer the feature
   exists and which mode unlocks it. */
[data-tdpo-print-mode="single"] [data-tdpo-fcs-tool-group] .tdpo-fcs-btn,
[data-tdpo-print-mode="single"] [data-tdpo-fcs-mode="paint"],
[data-tdpo-print-mode="single"] [data-tdpo-fcs-undo],
[data-tdpo-print-mode="single"] [data-tdpo-fcs-redo],
[data-tdpo-print-mode="multi"] [data-tdpo-fcs-tool="gradient"],
[data-tdpo-print-mode="multi"] [data-tdpo-fcs-tool="image"] {
    opacity: .35 !important;
    pointer-events: none !important;
    filter: grayscale(.7) !important;
}
/* The filament panel is still the color picker in single color mode — it just
   selects the one filament rather than painting regions. */
[data-tdpo-print-mode="single"] [data-tdpo-fcs-swatches] { opacity: 1 !important; }

/* Embedded anywhere: the file picker and Download 3MF belong to the standalone
   studio. The estimator supplies files and produces a cart order instead. */
[data-tdpo-standalone="0"] [data-tdpo-fcs-file-input],
[data-tdpo-standalone="0"] [data-tdpo-fcs-remove-btn],
[data-tdpo-standalone="0"] .tdpo-fcs-filename { display: none !important; }

[data-tdpo-standalone="0"] .tdpo-fcs-viewport { min-height: 460px !important; }
@media (max-width: 640px) {
    [data-tdpo-standalone="0"] .tdpo-fcs-viewport { min-height: 340px !important; }
}

/* ── TUTORIAL ── */
/* A step whose target only appears once a model is loaded still has to be
   shown, or the spotlight silently lands on an unrelated parent element. */
.tdpo-fcs-tutorial-force { display: block !important; visibility: visible !important; opacity: 1 !important; }

/* ── BUTTON GROUPS: one accent per function ──
   Cyan and purple sat next to each other and read as the same thing. The three
   groups now use clearly separated hues: cyan for view mode, hot pink for the
   painting tools, green for transforms. */
[data-tdpo-fcs-mode-group] .tdpo-fcs-btn {
    border-color: #1b6f88 !important; color: #7fd6ea !important;
}
[data-tdpo-fcs-mode-group] .tdpo-fcs-btn--active {
    background: #00b4d8 !important; border-color: #4de2ff !important; color: #04121a !important;
    box-shadow: 0 0 12px rgba(0,180,216,.65) !important;
}
[data-tdpo-fcs-tool-group] .tdpo-fcs-btn {
    border-color: #8f1f57 !important; color: #ff9ec8 !important;
}
[data-tdpo-fcs-tool-group] .tdpo-fcs-btn--active {
    background: #ff2d95 !important; border-color: #ff77bd !important; color: #1a0410 !important;
    box-shadow: 0 0 12px rgba(255,45,149,.65) !important;
}
[data-tdpo-fcs-transform-controls] .tdpo-fcs-btn {
    border-color: #1f7a45 !important; color: #86e8ab !important;
}
[data-tdpo-fcs-transform-controls] .tdpo-fcs-btn--active {
    background: #22c55e !important; border-color: #6ee7a0 !important; color: #04170c !important;
    box-shadow: 0 0 12px rgba(34,197,94,.6) !important;
}

/* Tutorial chrome must not exist outside the tutorial. */
.tdpo-fcs-root:not(.tdpo-fcs-tutorial-on) .tdpo-fcs-tutorial-highlight,
.tdpo-fcs-root:not(.tdpo-fcs-tutorial-on) .tdpo-fcs-tutorial-callout { display: none !important; }

/* ── OVERLAY LAYOUT ──
   The transform panel used to sit on top of the tool options once a model was
   loaded. Overlays are now assigned distinct corners with a shared gutter. */
.tdpo-fcs-viewport { position: relative !important; }
.tdpo-fcs-overlay-top {
    top: 12px !important; left: 12px !important; right: 12px !important;
    gap: 10px !important; flex-wrap: wrap !important;
}
.tdpo-fcs-overlay-options {
    top: 66px !important; left: 12px !important;
    max-width: min(320px, calc(100% - 24px)) !important;
}
.tdpo-fcs-overlay-transform {
    right: 12px !important; bottom: 12px !important;
    top: auto !important; left: auto !important;
    max-width: min(300px, calc(100% - 24px)) !important;
    max-height: calc(100% - 90px) !important; overflow-y: auto !important;
}
.tdpo-fcs-overlay-transform-body { margin-top: 8px !important; }

@media (max-width: 720px) {
    .tdpo-fcs-overlay-options { top: auto !important; bottom: 12px !important; right: 12px !important; }
    .tdpo-fcs-overlay-transform { bottom: auto !important; top: 108px !important; }
}

/* ── SPACING POLISH ── */
.tdpo-fcs-toolbar { gap: 8px !important; padding: 12px 14px !important; flex-wrap: wrap !important; align-items: center !important; }
.tdpo-fcs-root { --tdpo-gutter: 14px; }
.tdpo-fcs-overlay { padding: 12px 14px !important; border-radius: 10px !important; }
.tdpo-fcs-btn { padding: 7px 14px !important; border-radius: 7px !important; }

/* ── EMBEDDED: the viewport IS the upload target ──
   There is no separate drop-zone card any more, so the empty state stays and
   doubles as the place to click or drop files. */
[data-tdpo-standalone="0"] [data-tdpo-fcs-empty-state] { cursor: pointer !important; }
[data-tdpo-standalone="0"] [data-tdpo-fcs-empty-state] .tdpo-fcs-empty-state-sub::after {
    content: " \A Drag several files in at once, or drop a .zip";
    white-space: pre;
    display: block;
    margin-top: 6px;
    opacity: .75;
}
.tdpo-fcs-root.tdpe-drag { outline: 2px dashed #00b4d8 !important; outline-offset: -6px !important; }


/* ── TUTORIAL WELCOME ──
   Centred on the viewport rather than the document, so it lands where the
   customer is already looking. */
.tdpo-fcs-tutorial-welcome {
    position: fixed !important;
    top: 50% !important; left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: min(460px, calc(100vw - 32px)) !important;
    z-index: 100002 !important;
}
.tdpo-fcs-tutorial-callout { max-width: min(340px, calc(100vw - 24px)) !important; }

/* ── SCALE / ROTATE IN THE TOOLBAR ──
   Always visible so it can be found (and toured) before a model is loaded; the
   contents grey out until there is something to transform. */
.tdpo-fcs-overlay-transform {
    position: relative !important;
    top: auto !important; right: auto !important; bottom: auto !important; left: auto !important;
    max-width: none !important; max-height: none !important; overflow: visible !important;
    padding: 0 !important; background: none !important; border: none !important;
}
.tdpo-fcs-overlay-transform .tdpo-fcs-overlay-transform-body {
    position: absolute !important;
    top: calc(100% + 8px) !important; right: 0 !important;
    width: 280px !important; max-height: 60vh !important; overflow-y: auto !important;
    background: rgba(10, 14, 39, .96) !important;
    border: 1px solid #30363d !important; border-radius: 10px !important;
    padding: 12px 14px !important;
    z-index: 40 !important;
    box-shadow: 0 8px 28px rgba(0,0,0,.55) !important;
}
.tdpo-fcs-overlay-transform.tdpo-fcs-disabled .tdpo-fcs-overlay-transform-body {
    opacity: .4 !important; pointer-events: none !important;
}
.tdpo-fcs-overlay-top-actions { display: flex !important; align-items: center !important; gap: 8px !important; margin-left: auto !important; }

/* ══════════════════════════════════════════════════════════════════════════
   TOP BAR — one row, full width
   ══════════════════════════════════════════════════════════════════════════ */
.tdpo-fcs-overlay-top {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    top: 10px !important; left: 10px !important; right: 10px !important;
    padding: 8px 10px !important;
    overflow-x: auto !important;
    scrollbar-width: thin !important;
}
.tdpo-fcs-overlay-top > * { flex: 0 0 auto !important; }
.tdpo-fcs-overlay-top-actions { margin-left: auto !important; }

/* Painting tools collapse to one control instead of four buttons */
.tdpo-fcs-tool-select {
    background: #0d1117 !important;
    border: 1px solid #8f1f57 !important;
    color: #ff9ec8 !important;
    border-radius: 7px !important;
    padding: 7px 12px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    min-width: 150px !important;
}
.tdpo-fcs-tool-select:focus { outline: none !important; border-color: #ff2d95 !important; }

/* Scale and Rotate are peers, not a combined dropdown */
.tdpo-fcs-transform-group { display: flex !important; gap: 6px !important; }
.tdpo-fcs-transform-group .tdpo-fcs-btn { border-color: #1f7a45 !important; color: #86e8ab !important; }
.tdpo-fcs-transform-group .tdpo-fcs-btn--active {
    background: #22c55e !important; border-color: #6ee7a0 !important; color: #04170c !important;
    box-shadow: 0 0 12px rgba(34,197,94,.6) !important;
}
.tdpo-fcs-transform-group.tdpo-fcs-disabled { opacity: .4 !important; pointer-events: none !important; }

/* ── OPTIONS RAIL: everything opens below the bar, never over the model ── */
.tdpo-fcs-rail {
    position: absolute !important;
    top: 62px !important; left: 10px !important; right: 10px !important;
    z-index: 30 !important;
    display: none !important;
    background: rgba(10, 14, 39, .96) !important;
    border: 1px solid #30363d !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    max-height: 40% !important;
    overflow-y: auto !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.5) !important;
}
.tdpo-fcs-rail.tdpo-fcs-rail-open { display: block !important; }
.tdpo-fcs-rail .tdpo-fcs-overlay-transform-body { position: static !important; width: auto !important;
    background: none !important; border: none !important; padding: 0 !important; box-shadow: none !important;
    max-height: none !important; }

/* Tool option panels share the rail position */
.tdpo-fcs-overlay-options {
    top: 62px !important; left: 10px !important; right: 10px !important;
    max-width: none !important;
}

/* Per-axis slider rows */
.tdpo-fcs-axis-rows { display: flex !important; flex-direction: column !important; gap: 8px !important; margin: 10px 0 !important; }
.tdpo-fcs-axis-row { display: flex !important; align-items: center !important; gap: 10px !important; font-size: 13px !important; }
.tdpo-fcs-axis-row > span { width: 16px !important; font-weight: 700 !important; }
.tdpo-fcs-axis-row input[type="range"] { flex: 1 !important; min-width: 90px !important; }
.tdpo-fcs-axis-row input[type="number"] { width: 68px !important; background: #0d1117 !important;
    border: 1px solid #30363d !important; border-radius: 6px !important; color: #e6edf3 !important; padding: 5px 7px !important; }
.tdpo-fcs-axis-row em { font-style: normal !important; color: #8b949e !important; width: 18px !important; }
/* Axis colors match the on-model handles and rings */
.tdpo-fcs-axis-row.tdpo-fcs-axis-x > span { color: #ff4d4d !important; }
.tdpo-fcs-axis-row.tdpo-fcs-axis-y > span { color: #4dff88 !important; }
.tdpo-fcs-axis-row.tdpo-fcs-axis-z > span { color: #4da6ff !important; }

/* ── ADD BASE: with the model, bottom-left ── */
.tdpo-fcs-overlay-base {
    position: absolute !important;
    left: 10px !important; bottom: 10px !important;
    top: auto !important; right: auto !important;
    display: flex !important; align-items: center !important; gap: 6px !important;
    background: rgba(10,14,39,.9) !important; border: 1px solid #30363d !important;
    border-radius: 10px !important; padding: 7px 9px !important; z-index: 25 !important;
}

/* ── ORIENTATION CUBE: clear of the bar and any open panel ── */
.tdpo-fcs-orientation-cube, [data-tdpo-fcs-orientation-cube] {
    top: auto !important; bottom: 92px !important; right: 12px !important; z-index: 20 !important;
}

/* Slightly smaller swatches to make room */
.tdpo-fcs-swatch { width: 26px !important; height: 26px !important; }

@media (max-width: 720px) {
    .tdpo-fcs-rail, .tdpo-fcs-overlay-options { top: 58px !important; max-height: 46% !important; }
    .tdpo-fcs-tool-select { min-width: 120px !important; }
    .tdpo-fcs-orientation-cube, [data-tdpo-fcs-orientation-cube] { bottom: 120px !important; }
}

/* ── ORIENTATION CUBE: clear of the toolbar, lower right ──
   The positioned element is the wrapper, not the canvas — targeting the canvas
   moved nothing. */
.tdpo-fcs-orientation-cube-wrap {
    top: auto !important;
    bottom: 92px !important;
    right: 12px !important;
    z-index: 14 !important;
}
@media (max-width: 720px) {
    .tdpo-fcs-orientation-cube-wrap { bottom: 130px !important; width: 84px !important; height: 84px !important; }
    .tdpo-fcs-orientation-cube { width: 84px !important; height: 84px !important; }
}

/* Inline label for the Paint dropdown */
.tdpo-fcs-bar-label {
    font-size: 12px !important; font-weight: 700 !important; letter-spacing: 1px !important;
    text-transform: uppercase !important; color: #ff9ec8 !important; white-space: nowrap !important;
}

/* ── ORIENTATION CUBE: top-right, below the toolbar and its option rail ── */
.tdpo-fcs-orientation-cube-wrap {
    top: 118px !important;
    bottom: auto !important;
    right: 12px !important;
    z-index: 14 !important;
}
@media (max-width: 720px) {
    .tdpo-fcs-orientation-cube-wrap {
        top: 112px !important; bottom: auto !important;
        width: 84px !important; height: 84px !important;
    }
    .tdpo-fcs-orientation-cube { width: 84px !important; height: 84px !important; }
}

/* ── TRANSFORM RAIL: readable, not a thin empty strip ── */
.tdpo-fcs-rail .tdpo-fcs-overlay-transform-body { display: block !important; }
.tdpo-fcs-rail .tdpo-fcs-mode-group.tdpo-fcs-hidden { display: none !important; }
.tdpo-fcs-rail { min-height: 0 !important; }
.tdpo-fcs-gizmo-readout { display: flex !important; gap: 16px !important; margin: 8px 0 !important; font-size: 13px !important; }
.tdpo-fcs-transform-size { display: flex !important; gap: 8px !important; align-items: center !important; margin-bottom: 6px !important; }
.tdpo-fcs-transform-size input[type="number"] { width: 96px !important; background: #0d1117 !important;
    border: 1px solid #30363d !important; border-radius: 6px !important; color: #e6edf3 !important; padding: 6px 8px !important; }
.tdpo-fcs-transform-size select { background: #0d1117 !important; border: 1px solid #30363d !important;
    border-radius: 6px !important; color: #e6edf3 !important; padding: 6px 8px !important; }
.tdpo-fcs-gizmo-uniform-toggle { display: flex !important; align-items: center !important; gap: 8px !important;
    font-size: 13px !important; margin-bottom: 6px !important; }

/* Review-tutorial link inside every help box */
.tdpo-fcs-help-tutorial-link {
    display: inline-block !important; margin-top: 14px !important;
    background: none !important; border: none !important; padding: 0 !important;
    color: #00b4d8 !important; font-family: inherit !important; font-size: 13px !important;
    font-weight: 700 !important; text-decoration: underline !important; cursor: pointer !important;
}
.tdpo-fcs-help-tutorial-link:hover { color: #4de2ff !important; }

/* ── COMPACT TRANSFORM PANEL, PINNED TOP-LEFT ── */
.tdpo-fcs-rail {
    left: 10px !important;
    right: auto !important;
    width: 300px !important;
    max-width: calc(100% - 20px) !important;
    top: 58px !important;
    max-height: none !important;
    padding: 10px 12px !important;
}
.tdpo-fcs-num-grid {
    display: grid !important;
    grid-template-columns: 18px 1fr 1fr 44px !important;
    gap: 5px 6px !important;
    align-items: center !important;
    margin: 6px 0 !important;
}
.tdpo-fcs-rot-grid {
    display: grid !important;
    grid-template-columns: 18px auto 1fr auto !important;
    gap: 5px 6px !important;
    align-items: center !important;
    margin: 6px 0 !important;
}
.tdpo-fcs-num-head { font-size: 10px !important; text-transform: uppercase !important;
    letter-spacing: .8px !important; color: #8b949e !important; text-align: center !important; }
.tdpo-fcs-axis-lbl { font-weight: 700 !important; font-size: 13px !important; }
.tdpo-fcs-axis-lbl.tdpo-fcs-axis-x { color: #ff4d4d !important; }
.tdpo-fcs-axis-lbl.tdpo-fcs-axis-y { color: #4dff88 !important; }
.tdpo-fcs-axis-lbl.tdpo-fcs-axis-z { color: #4da6ff !important; }
.tdpo-fcs-num-grid input, .tdpo-fcs-rot-grid input {
    width: 100% !important; min-width: 0 !important;
    background: #0d1117 !important; border: 1px solid #30363d !important;
    border-radius: 5px !important; color: #e6edf3 !important;
    padding: 4px 6px !important; font-size: 12px !important;
    font-family: 'Share Tech Mono', monospace !important;
}
.tdpo-fcs-pct { font-size: 11px !important; color: #8b949e !important; text-align: right !important;
    font-family: 'Share Tech Mono', monospace !important; }
.tdpo-fcs-nudge {
    background: #0d1117 !important; border: 1px solid #1f7a45 !important;
    color: #86e8ab !important; border-radius: 5px !important;
    padding: 3px 7px !important; font-size: 11px !important; font-weight: 700 !important;
    cursor: pointer !important; white-space: nowrap !important;
}
.tdpo-fcs-nudge:hover { background: #22c55e !important; color: #04170c !important; }
.tdpo-fcs-rail .tdpo-fcs-gizmo-readout { font-size: 11px !important; gap: 10px !important; margin: 4px 0 !important; }
.tdpo-fcs-rail .tdpo-fcs-gradient-hint { font-size: 11px !important; line-height: 1.45 !important; display: block !important; }
.tdpo-fcs-rail .tdpo-fcs-transform-size { margin-bottom: 4px !important; }
.tdpo-fcs-rail .tdpo-fcs-transform-size input[type="number"] { width: 78px !important; font-size: 12px !important; }

/* Tool option panels sit beside the transform rail, not under it */
.tdpo-fcs-overlay-options { left: 322px !important; right: 10px !important; top: 58px !important; }
@media (max-width: 900px) {
    .tdpo-fcs-rail { width: calc(100% - 20px) !important; }
    .tdpo-fcs-overlay-options { left: 10px !important; top: 58px !important; }
}

/* Add Another Print */
.tdpo-fcs-btn--add {
    background: #00b4d8 !important; border-color: #4de2ff !important; color: #04121a !important;
    font-weight: 700 !important; box-shadow: 0 0 12px rgba(0,180,216,.5) !important;
}
.tdpo-fcs-btn--add:hover { background: #4de2ff !important; }

/* Blend toggle + mesh tidy */
.tdpo-fcs-blend-toggle { display: flex !important; align-items: center !important; gap: 8px !important; margin-top: 8px !important; }
.tdpo-fcs-btn--simplify { margin-top: 10px !important; border-color: #1f7a45 !important; color: #86e8ab !important; }
.tdpo-fcs-btn--simplify:hover { background: #22c55e !important; color: #04170c !important; }
[data-tdpo-fcs-simplify-note] { display: block !important; margin-top: 6px !important; font-size: 11px !important; }

/* ── PANELS CLEAR THE TOOLBAR ── */
.tdpo-fcs-rail { top: 74px !important; }
.tdpo-fcs-overlay-options { top: 74px !important; }
@media (max-width: 900px) {
    .tdpo-fcs-rail, .tdpo-fcs-overlay-options { top: 78px !important; }
}
.tdpo-fcs-orientation-cube-wrap { top: 134px !important; }

/* Upload prompt is inert while the tutorial is running */
body.tdpo-fcs-tutorial-lock [data-tdpo-fcs-empty-state],
body.tdpo-fcs-tutorial-lock [data-tdpo-fcs-file-input] { pointer-events: none !important; }

/* Add Base is present but inactive until a model exists */
[data-tdpo-fcs-base-btn][disabled] { opacity: .4 !important; cursor: not-allowed !important; }

/* Themed checkbox */
.tdpo-fcs-check {
    appearance: none !important; -webkit-appearance: none !important;
    width: 18px !important; height: 18px !important; margin: 0 !important;
    border: 2px solid #30363d !important; border-radius: 5px !important;
    background: #0d1117 !important; cursor: pointer !important;
    position: relative !important; flex: 0 0 auto !important; transition: all .15s !important;
}
.tdpo-fcs-check:hover { border-color: #22c55e !important; }
.tdpo-fcs-check:checked { background: #22c55e !important; border-color: #6ee7a0 !important; }
.tdpo-fcs-check:checked::after {
    content: '' !important; position: absolute !important;
    left: 5px !important; top: 1px !important; width: 4px !important; height: 9px !important;
    border: solid #04170c !important; border-width: 0 2.5px 2.5px 0 !important;
    transform: rotate(45deg) !important;
}

/* Desktop note on the tutorial welcome */
.tdpo-fcs-tutorial-note {
    margin-top: 14px !important; padding: 10px 12px !important;
    background: rgba(210,153,34,.10) !important; border: 1px solid rgba(210,153,34,.35) !important;
    border-radius: 8px !important; color: #ffd54f !important;
    font-size: 13px !important; line-height: 1.5 !important;
}

/* ── BOTTOM BAR: swatches, base and helpers wrap together ── */
.tdpo-fcs-overlay-base {
    position: static !important;
    background: none !important; border: none !important; padding: 0 !important;
}
.tdpo-fcs-bottom-bar {
    display: flex !important; flex-wrap: wrap !important;
    align-items: center !important; gap: 10px 14px !important;
    padding: 10px 12px !important;
}
.tdpo-fcs-swatches { display: flex !important; flex-wrap: wrap !important; gap: 7px !important; }
.tdpo-fcs-swatch { width: 26px !important; height: 26px !important; flex: 0 0 auto !important; }

/* ── SCALE PANEL: tighter fields, inches first, editable percent ── */
.tdpo-fcs-num-grid { grid-template-columns: 16px 62px 62px 54px !important; gap: 4px 5px !important; }
.tdpo-fcs-rot-grid { grid-template-columns: 16px auto 56px auto !important; gap: 4px 5px !important; }
.tdpo-fcs-num-grid input, .tdpo-fcs-rot-grid input {
    width: 100% !important; padding: 4px 5px !important; font-size: 12px !important; text-align: right !important;
}
.tdpo-fcs-size-readout {
    font-family: 'Share Tech Mono', monospace !important;
    font-size: 15px !important; font-weight: 700 !important;
    color: #e6edf3 !important; letter-spacing: .5px !important;
    padding-bottom: 6px !important; margin-bottom: 6px !important;
    border-bottom: 1px solid #30363d !important;
}
.tdpo-fcs-rail { width: 268px !important; }

/* ── THEMED CONFIRMATION ── */
.tdpo-fcs-confirm {
    position: absolute !important; inset: 0 !important; z-index: 100003 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    background: rgba(5, 7, 20, .78) !important; backdrop-filter: blur(2px) !important;
}
.tdpo-fcs-confirm.tdpo-fcs-hidden { display: none !important; }
.tdpo-fcs-confirm-card {
    max-width: min(420px, calc(100% - 32px)) !important;
    background: #161b22 !important; border: 2px solid #00b4d8 !important;
    border-radius: 14px !important; padding: 24px 26px !important;
    box-shadow: 0 0 40px rgba(0,180,216,.35) !important;
}
.tdpo-fcs-confirm-card h3 {
    margin: 0 0 10px !important; font-size: 20px !important; font-weight: 700 !important; color: #e6edf3 !important;
}
.tdpo-fcs-confirm-card p {
    margin: 0 0 18px !important; font-size: 14px !important; line-height: 1.6 !important; color: #c9d1d9 !important;
}
.tdpo-fcs-confirm-actions { display: flex !important; gap: 10px !important; justify-content: flex-end !important; }


/* ── STATUS LINE ──
   Routine chatter under the viewport was noise nobody read. Only genuine
   errors show now, and they appear over the viewport where they cannot be
   missed. */
.tdpo-fcs-status { display: none !important; }
.tdpo-fcs-status.tdpo-fcs-status--error {
    display: block !important;
    position: absolute !important;
    left: 50% !important; top: 84px !important;
    transform: translateX(-50%) !important;
    z-index: 60 !important;
    max-width: min(520px, calc(100% - 40px)) !important;
    padding: 12px 18px !important;
    background: rgba(45, 15, 15, .97) !important;
    border: 2px solid #ff5252 !important; border-radius: 10px !important;
    color: #ff8f8f !important; font-size: 14px !important; font-weight: 600 !important;
    text-align: center !important;
    box-shadow: 0 8px 28px rgba(0,0,0,.6) !important;
}

/* ── TOP BAR RUNS FULL WIDTH ──
   The orientation cube sits below this line now, so nothing has to be left
   clear on the right. */
.tdpo-fcs-overlay-top { right: 10px !important; }
.tdpo-fcs-overlay-top-actions {
    margin-left: auto !important;
    display: flex !important; align-items: center !important; gap: 8px !important;
}
.tdpo-fcs-bar-divider {
    width: 1px !important; height: 22px !important;
    background: #30363d !important; margin: 0 2px !important; flex: 0 0 auto !important;
}

/* Every help button on the bar shares one baseline — they were sitting a few
   pixels high next to taller controls. */
.tdpo-fcs-overlay-top .tdpo-fcs-help-btn,
.tdpo-fcs-overlay-top-actions .tdpo-fcs-help-btn {
    align-self: center !important;
    margin: 0 !important;
    position: relative !important;
    top: 0 !important;
    flex: 0 0 auto !important;
}
.tdpo-fcs-overlay-top > *,
.tdpo-fcs-mode-group,
.tdpo-fcs-tool-group,
.tdpo-fcs-transform-group { align-items: center !important; }
.tdpo-fcs-mode-group,
.tdpo-fcs-tool-group,
.tdpo-fcs-transform-group { display: flex !important; gap: 6px !important; }

/* ── TOP BAR: wraps instead of scrolling ──
   A horizontal scrollbar on a toolbar is a dead end — controls end up hidden
   with no indication. It now wraps to a second row if it ever needs to. */
.tdpo-fcs-overlay-top {
    flex-wrap: wrap !important;
    overflow: visible !important;
    row-gap: 8px !important;
    left: 10px !important; right: 10px !important;
}
.tdpo-fcs-overlay-top::-webkit-scrollbar { display: none !important; }
.tdpo-fcs-tool-select { min-width: 132px !important; }
.tdpo-fcs-overlay-top .tdpo-fcs-btn { padding: 6px 12px !important; font-size: 12.5px !important; }
.tdpo-fcs-bar-label { font-size: 11px !important; }

/* Paint options share the same slot as the transform rail — never both open. */
.tdpo-fcs-overlay-options {
    left: 10px !important; right: auto !important;
    width: 268px !important; max-width: calc(100% - 20px) !important;
    top: 62px !important;
}
.tdpo-fcs-rail { top: 62px !important; }

/* With options on the left, the cube can sit higher. */
.tdpo-fcs-orientation-cube-wrap { top: 66px !important; }
@media (max-width: 900px) {
    .tdpo-fcs-overlay-options, .tdpo-fcs-rail { top: 96px !important; }
    .tdpo-fcs-orientation-cube-wrap { top: 100px !important; }
}

/* Rotation: snap buttons and a readout, no text entry */
.tdpo-fcs-rot-grid { grid-template-columns: 16px auto 46px auto !important; }
.tdpo-fcs-rot-val {
    font-family: 'Share Tech Mono', monospace !important;
    font-size: 12px !important; font-weight: 700 !important;
    color: #e6edf3 !important; text-align: center !important;
}

/* ── ORIENTATION CUBE: top-right corner ──
   The bar stops short of it so the two never collide. */
.tdpo-fcs-orientation-cube-wrap { top: 10px !important; right: 10px !important; }
.tdpo-fcs-overlay-top { right: 132px !important; }
@media (max-width: 900px) {
    .tdpo-fcs-orientation-cube-wrap { top: 10px !important; width: 84px !important; height: 84px !important; }
    .tdpo-fcs-orientation-cube { width: 84px !important; height: 84px !important; }
    .tdpo-fcs-overlay-top { right: 104px !important; }
}

/* Welcome card is positioned in JS over the viewport; the overlay only dims. */
.tdpo-fcs-tutorial-welcome { position: fixed !important; inset: 0 !important; }
.tdpo-fcs-tutorial-welcome-card {
    max-width: min(440px, calc(100vw - 32px)) !important;
    text-align: center !important;
}
.tdpo-fcs-tutorial-welcome-actions {
    display: flex !important; gap: 10px !important; justify-content: center !important; margin-top: 18px !important;
}
.tdpo-fcs-tutorial-welcome-actions .tdpo-fcs-btn { min-width: 150px !important; justify-content: center !important; }

/* Closing step: one action, centred */
.tdpo-fcs-tutorial-callout--final .tdpo-fcs-tutorial-callout-actions,
.tdpo-fcs-tutorial-callout--final .tdpo-fcs-tutorial-callout-nav {
    justify-content: center !important;
}
.tdpo-fcs-tutorial-callout--final .tdpo-fcs-btn { min-width: 130px !important; justify-content: center !important; }

/* Tutorial: multi-part steps get labelled sections */
.tdpo-fcs-step-section { margin-bottom: 10px !important; }
.tdpo-fcs-step-section > strong {
    display: block !important; margin-bottom: 4px !important;
    font-size: 12px !important; text-transform: uppercase !important;
    letter-spacing: 1px !important; color: #00b4d8 !important;
}
.tdpo-fcs-tutorial-callout .tdpo-fcs-help-list { margin: 0 0 0 16px !important; padding: 0 !important; }
.tdpo-fcs-tutorial-callout .tdpo-fcs-help-list li { margin-bottom: 3px !important; line-height: 1.45 !important; }
.tdpo-fcs-tutorial-callout .tdpo-fcs-help-note { margin-top: 8px !important; font-size: 12px !important; opacity: .85 !important; }

/* Final step: the single remaining action sits centred */
.tdpo-fcs-tutorial-callout--final .tdpo-fcs-tutorial-callout-actions {
    display: flex !important; justify-content: center !important; gap: 10px !important;
}
.tdpo-fcs-tutorial-callout--final .tdpo-fcs-tutorial-callout-actions > * { margin: 0 !important; }

/* Final step: one action, centred */
.tdpo-fcs-tutorial-callout--final .tdpo-fcs-tutorial-callout-actions { justify-content: center !important; }
.tdpo-fcs-tutorial-callout--final .tdpo-fcs-tutorial-callout-nav {
    width: 100% !important; justify-content: center !important; gap: 10px !important;
}
.tdpo-fcs-tutorial-callout--final .tdpo-fcs-tutorial-callout-nav .tdpo-fcs-btn { min-width: 132px !important; justify-content: center !important; }

/* Imported blends: removable swatches */
.tdpo-fcs-swatch-remove {
    position: absolute !important; top: -5px !important; right: -5px !important;
    width: 15px !important; height: 15px !important; padding: 0 !important;
    border-radius: 50% !important; border: 1px solid #30363d !important;
    background: #0d1117 !important; color: #ff8f8f !important;
    font-size: 11px !important; line-height: 1 !important; cursor: pointer !important;
}
.tdpo-fcs-swatch-remove:hover { background: #ff5252 !important; color: #fff !important; border-color: #ff5252 !important; }
.tdpo-fcs-swatch-wrap { position: relative !important; display: inline-flex !important; }


/* ── EMBEDDED: controls that belong to the standalone studio only ──
   Download 3MF lives in the model list beside Add to Cart when embedded, so the
   toolbar copy must stay hidden even after a model loads. */
[data-tdpo-standalone="0"] [data-tdpo-fcs-export-btn],
[data-tdpo-standalone="0"] [data-tdpo-fcs-remove-btn],
[data-tdpo-standalone="0"] [data-tdpo-fcs-file-input],
[data-tdpo-standalone="0"] .tdpo-fcs-filename { display: none !important; }

/* Image projection: nudges either side of each slider */
.tdpo-fcs-image-actions { display: flex !important; gap: 8px !important; align-items: center !important; margin-bottom: 8px !important; }
[data-tdpo-fcs-image-wrap] .tdpo-fcs-slider-field {
    display: flex !important; align-items: center !important; gap: 6px !important; margin-bottom: 6px !important;
}
[data-tdpo-fcs-image-wrap] .tdpo-fcs-slider-field input[type="range"] { flex: 1 !important; min-width: 80px !important; }
[data-tdpo-fcs-image-wrap] .tdpo-fcs-nudge { padding: 2px 8px !important; font-size: 13px !important; }

/* Per-file download links */
.fl-dl { font-family: 'Share Tech Mono', monospace !important; font-size: 11px !important;
    padding: 3px 7px !important; letter-spacing: .5px !important; }


/* ── IMAGE PROJECTION WITHDRAWN ──
   A browser cannot refine the mesh far enough to reproduce a photograph
   recognisably — the result was blocky rather than useful. The engine and its
   panel remain in place, simply not offered, so it can be re-enabled once the
   detail problem is genuinely solved. */
[data-tdpo-fcs-tool="image"],
[data-tdpo-fcs-image-wrap] { display: none !important; }

.tdpo-fcs-btn--clearpaint { margin-top: 8px !important; border-color: #8f1f57 !important; color: #ff9ec8 !important; }
.tdpo-fcs-btn--clearpaint:hover { background: #ff2d95 !important; color: #1a0410 !important; }

/* ── GRADIENT PANEL ──
   The type buttons were squeezed into a narrow column and wrapped one letter
   per line. Given the rail's width they need to sit in a grid. */
[data-tdpo-fcs-gradient-wrap] { width: 268px !important; }
[data-tdpo-fcs-gradient-wrap] .tdpo-fcs-mode-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 5px !important;
    margin-bottom: 8px !important;
}
[data-tdpo-fcs-gradient-wrap] .tdpo-fcs-mode-group .tdpo-fcs-btn {
    padding: 6px 4px !important; font-size: 12px !important;
    white-space: nowrap !important; text-align: center !important; min-width: 0 !important;
}
[data-tdpo-fcs-gradient-wrap] .tdpo-fcs-btn--clearpaint {
    grid-column: 1 / -1 !important; margin-top: 2px !important;
}
[data-tdpo-fcs-gradient-wrap] .tdpo-fcs-gradient-colors {
    display: flex !important; align-items: center !important; gap: 10px !important; margin: 8px 0 !important;
}
[data-tdpo-fcs-gradient-wrap] input[type="color"] {
    width: 52px !important; height: 28px !important; padding: 0 !important;
    border: 1px solid #30363d !important; border-radius: 6px !important; background: none !important; cursor: pointer !important;
}
[data-tdpo-fcs-gradient-wrap] .tdpo-fcs-gradient-hint { display: block !important; margin-top: 6px !important; font-size: 11px !important; }

/* Add Another Print reads as an action, not a disabled control */
#b-add-another { color: #00b4d8 !important; border-color: #00b4d8 !important; opacity: 1 !important; }
#b-add-another:hover { background: #00b4d8 !important; color: #04121a !important; }
