.media-mode-switcher .tripo-test-tab {
    min-width: 86px;
    height: 28px;
    border: 0;
    background: transparent;
    color: var(--ui-text-2);
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .045em;
}

.media-mode-switcher .tripo-test-tab:hover {
    background: var(--ui-hover);
    color: var(--ui-text-1);
}

.media-mode-switcher .tripo-test-tab.is-prototype-active {
    background: var(--accent) !important;
    color: var(--accent-contrast) !important;
}

.media-mode-switcher.is-tripo-test-active .model-tab.bg-banana:not(.tripo-test-tab) {
    background: transparent !important;
    color: var(--ui-text-2) !important;
}

.media-mode-switcher .tripo-test-tab svg {
    flex: 0 0 auto;
    color: currentColor;
    stroke: currentColor;
}

.media-mode-switcher .tripo-test-tab:focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 2px;
}

#composerPanel.is-tripo-test-mode {
    container-name: tripo-test-composer;
    container-type: inline-size;
    min-height: 0;
    max-height: none;
    padding: 0 !important;
    overflow: visible;
}

#composerPanel.is-tripo-test-mode > :not(#tripo3dTestPrototype) {
    display: none !important;
}

#composerPanel.is-tripo-test-mode > #tripo3dTestPrototype {
    margin: 0 !important;
}

.tripo-test-prototype[hidden] {
    display: none !important;
}

.tripo-test-prototype {
    display: grid;
    max-height: min(88dvh, 740px);
    overflow: auto;
    overscroll-behavior: contain;
    border-radius: inherit;
    background: var(--ui-panel-bg);
    color: var(--ui-text-1);
    scrollbar-width: thin;
}

.tripo-test-prototype button,
.tripo-test-prototype textarea,
.tripo-test-prototype input {
    font-family: inherit;
}

.tripo-test-prototype button {
    cursor: pointer;
}

.tripo-test-prototype button:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.tripo-test-prototype svg {
    color: currentColor;
    stroke: currentColor;
}

.tripo-test__header {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-bottom: 1px solid var(--ui-border);
    background: color-mix(in srgb, var(--ui-panel-bg) 94%, transparent);
    backdrop-filter: blur(14px);
}

.tripo-test__section-heading,
.tripo-test__section-heading > span,
.tripo-test__summary,
.tripo-test__summary > span:last-child {
    display: flex;
    min-width: 0;
}

.tripo-test__summary-icon,
.tripo-test__upload-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
}

.tripo-test__section-heading > span,
.tripo-test__summary > span:last-child {
    flex-direction: column;
}

.tripo-test__tools {
    min-width: 0;
    width: max-content;
    max-width: 100%;
    flex: 0 1 auto;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.tripo-test__source-bar {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    padding: 8px 14px 0;
}

.tripo-test__source-switch {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
}

.tripo-test__source-bar--model {
    position: relative;
    align-items: stretch;
    padding-top: 8px;
}

.tripo-test__model-source {
    display: grid;
    min-width: 0;
    min-height: 58px;
    align-items: center;
    flex: 1 1 58%;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 9px 12px;
    border: 1px dashed var(--ui-border-strong);
    border-radius: 13px;
    background: var(--ui-input-bg);
    color: var(--ui-text-2);
    text-align: left;
}

.tripo-test__model-source:hover,
.tripo-test__model-source.has-file {
    border-color: var(--accent-border-strong);
    background: var(--ui-hover);
    color: var(--ui-text-1);
}

.tripo-test__model-source-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--ui-surface-3);
    color: var(--accent);
}

.tripo-test__model-source-copy,
.tripo-test__tool-context {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.tripo-test__model-source-copy small,
.tripo-test__tool-context small {
    color: var(--ui-text-3);
    font-size: 9px;
    font-weight: 760;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tripo-test__model-source-copy strong {
    overflow: hidden;
    color: var(--ui-text-1);
    font-size: 12px;
    font-weight: 740;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tripo-test__model-source > em {
    color: var(--ui-text-3);
    font-size: 10px;
    font-style: normal;
    white-space: nowrap;
}

.tripo-test__model-remove {
    position: absolute;
    top: 19px;
    right: calc(42% + 23px);
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ui-border);
    border-radius: 9px;
    background: var(--ui-panel-elevated-bg);
    color: var(--ui-text-2);
}

.tripo-test__model-remove:hover {
    background: var(--ui-hover);
    color: var(--ui-text-1);
}

.tripo-test__tool-context {
    flex: 1 1 42%;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--ui-border);
    border-radius: 13px;
    background: var(--ui-surface-2);
}

.tripo-test__tool-context strong {
    color: var(--ui-text-2);
    font-size: 10.5px;
    font-weight: 620;
    line-height: 1.45;
}

.tripo-test__workspace {
    display: grid;
    grid-template-columns: minmax(300px, .95fr) minmax(380px, 1.05fr);
    gap: 10px;
    padding: 8px 14px 10px;
}

.tripo-test__tool-workspace {
    padding: 8px 14px 12px;
}

.tripo-test__operations-card {
    padding: 14px;
    border: 1px solid var(--ui-border);
    border-radius: 16px;
    background: var(--ui-surface-2);
}

.tripo-test__readiness {
    margin: 0;
    color: var(--ui-text-2);
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.tripo-test__footer-summary {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
    gap: 4px;
}

.tripo-test__readiness[hidden] {
    display: none;
}

.tripo-test__source-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    max-width: 100%;
}

.tripo-test__source-actions button,
.tripo-test__load-action,
.tripo-test__gallery-model {
    border: 1px solid var(--ui-border);
    border-radius: 7px;
    background: var(--ui-surface-2);
    color: var(--ui-text-1);
    padding: 5px 7px;
    font-size: 11px;
    min-height: 28px;
}

.tripo-test__source-actions button:hover,
.tripo-test__load-action:hover,
.tripo-test__gallery-model:hover {
    background: var(--ui-hover);
}

.tripo-test__source-actions button:focus-visible,
.tripo-test__load-action:focus-visible,
.tripo-test__gallery-model:focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 2px;
}

.tripo-test__source-card.is-drop-target,
.tripo-test__upload-frame.is-drop-target,
.tripo-test__model-source.is-drop-target {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    background: var(--ui-active);
}

.tripo-test__upload-loading {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    border-radius: inherit;
    background: var(--ui-surface-2);
    color: var(--ui-text-1);
    font-size: 11px;
    pointer-events: none;
}

.tripo-test__upload-error {
    color: var(--ui-text-1);
    font-size: 11px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.tripo-test__upload-shell.has-error .tripo-test__upload-frame {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.tripo-test__source-bar--model .tripo-test__model-remove {
    position: static;
    align-self: center;
    flex: 0 0 32px;
}

.tripo-test__operations {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}

.tripo-test__operations.is-single {
    display: none;
}

.tripo-test__operation {
    position: relative;
    display: grid;
    min-width: min(100%, 190px);
    min-height: 54px;
    flex: 1 1 190px;
    align-items: center;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    padding: 8px 10px;
    border: 1px solid var(--ui-border);
    border-radius: 11px;
    background: var(--ui-input-bg);
    color: var(--ui-text-2);
    text-align: left;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.tripo-test__operation:hover {
    border-color: var(--accent-border-strong);
    background: var(--ui-hover);
    color: var(--ui-text-1);
}

.tripo-test__operation.is-selected {
    border-color: var(--accent-border-strong);
    background: var(--ui-active);
    color: var(--accent);
}

.tripo-test__operation.needs-result {
    border-style: dashed;
}

.tripo-test__operation-icon {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--ui-surface-3);
    color: var(--accent);
}

.tripo-test__operation-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.tripo-test__operation-copy strong {
    color: var(--ui-text-1);
    font-size: 12px;
    font-weight: 750;
}

.tripo-test__operation-copy small {
    color: var(--ui-text-3);
    font-size: 9px;
    line-height: 1.35;
}

.tripo-test__operation > em {
    grid-column: 2;
    color: var(--accent);
    font-size: 9px;
    font-style: normal;
    font-weight: 720;
}

.tripo-test__operation.needs-result > em {
    color: var(--ui-text-3);
}

.tripo-test__inline-stage {
    min-width: 0;
}

.tripo-test__inline-operation {
    min-width: 0;
}

.tripo-test__inline-loading,
.tripo-test__inline-empty {
    display: flex;
    min-height: 118px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    border: 1px dashed var(--ui-border-strong);
    border-radius: 13px;
    background: var(--ui-input-bg);
    color: var(--ui-text-3);
    font-size: 10px;
}

.tripo-test__inline-loading svg {
    animation: tripo-spin .9s linear infinite;
}

.tripo-test__inline-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid color-mix(in srgb, var(--status-error, var(--ui-danger, var(--accent))) 62%, var(--ui-border));
    border-radius: 11px;
    background: var(--ui-surface-2);
    color: color-mix(in srgb, var(--status-error, var(--ui-danger, var(--accent))) 82%, var(--ui-text-1));
    font-size: 10px;
}

.tripo-test__inline-error svg {
    flex: 0 0 auto;
}

.tripo-test__inline-empty {
    justify-content: flex-start;
}

.tripo-test__inline-empty > span {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--ui-surface-3);
    color: var(--accent);
}

.tripo-test__inline-empty > div {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 3px;
}

.tripo-test__inline-empty strong {
    color: var(--ui-text-1);
    font-size: 11px;
}

.tripo-test__inline-empty small {
    color: var(--ui-text-3);
    font-size: 9px;
    line-height: 1.4;
}

.tripo-test__inline-empty button {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid var(--accent-border-strong);
    border-radius: 10px;
    background: var(--ui-active);
    color: var(--accent);
    font-size: 10px;
    font-weight: 730;
}

.tripo-test__inline-empty button:hover {
    background: var(--accent);
    color: var(--accent-contrast);
}

.tripo-test__source-card,
.tripo-test__result-card {
    min-width: 0;
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: var(--ui-surface-2);
}

.tripo-test__source-card {
    display: flex;
    min-height: 250px;
    flex-direction: column;
    padding: 12px;
}

.tripo-test__result-card {
    padding: 12px;
}

.tripo-test__section-heading {
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.tripo-test__source-card .tripo-test__section-heading--source {
    position: relative;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tripo-test__source-card .tripo-test__section-heading--source > span:first-child {
    width: 100%;
    align-items: center;
}

.tripo-test__source-card .tripo-test__section-heading--source.has-requirement {
    padding-inline: 104px;
}

.tripo-test__source-card .tripo-test__section-heading--source .tripo-test__requirement {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.tripo-test__section-heading small {
    color: var(--ui-text-3);
    font-size: 9px;
    font-weight: 760;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.tripo-test__section-heading h3 {
    margin: 0;
    color: var(--ui-text-1);
    font-size: 12px;
    font-weight: 760;
    line-height: 1.4;
}

.tripo-test__source-card .tripo-test__section-heading h3 {
    font-size: 13px;
}

.tripo-test__requirement {
    flex: 0 0 auto;
    padding: 2px 6px;
    border: 1px solid var(--ui-border);
    border-radius: 999px;
    background: var(--ui-surface-3);
    color: var(--ui-text-2);
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.tripo-test__section-hint {
    margin: 4px 0 9px;
    color: var(--ui-text-3);
    font-size: 10px;
    line-height: 1.45;
}

.tripo-test__source-card > .tripo-test__section-hint {
    margin: 5px 0 12px;
    font-size: 10.5px;
    text-align: center;
}

.tripo-test__prompt {
    position: relative;
    display: flex;
    min-height: 160px;
    flex: 1 1 auto;
}

.tripo-test__prompt textarea {
    width: 100%;
    min-height: 160px;
    resize: none;
    padding: 11px 12px 27px;
    border: 1px solid var(--ui-border);
    border-radius: 13px;
    outline: none;
    background: var(--ui-input-bg);
    color: var(--ui-text-1);
    font-size: 12px;
    line-height: 1.55;
}

.tripo-test__prompt textarea::placeholder {
    color: var(--ui-text-3);
}

.tripo-test__prompt > small {
    position: absolute;
    right: 11px;
    bottom: 9px;
    color: var(--ui-text-3);
    font-size: 9px;
}

.tripo-test__single-source {
    --tripo-upload-size: clamp(112px, 38cqi, 172px);
    display: flex;
    min-height: var(--tripo-upload-size);
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    padding-block: 4px;
}

.tripo-test__single-source .tripo-test__upload-shell {
    width: var(--tripo-upload-size);
    flex: 0 0 var(--tripo-upload-size);
}

.tripo-test__single-source .tripo-test__upload-frame {
    border-radius: 20px;
}

.tripo-test__single-source .tripo-test__upload svg {
    width: 28px;
    height: 28px;
}

.tripo-test__single-source .generation-ref-tile__remove {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
}

.tripo-test__upload-shell {
    display: grid;
    align-self: start;
    align-content: start;
    width: 100%;
    min-width: 0;
    grid-template-rows: var(--tripo-upload-size, 52px) auto;
    justify-items: center;
    gap: 7px;
}

.tripo-test__upload-frame {
    --generation-ref-size: var(--tripo-upload-size, 52px);
    position: relative;
    display: block;
    width: var(--tripo-upload-size, 52px);
    height: var(--tripo-upload-size, 52px);
    border-radius: 16px;
}

.tripo-test__upload {
    --generation-ref-size: var(--tripo-upload-size, 52px);
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--ui-border-strong);
    border-radius: inherit;
    background: transparent;
    color: var(--ui-text-2);
    text-align: center;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.tripo-test__upload:hover {
    background: var(--ui-hover);
    color: var(--ui-text-1);
}

.tripo-test__upload-shell.has-file .tripo-test__upload {
    border-color: var(--ui-border);
    background: var(--ui-card-media-bg);
}

.tripo-test__upload-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tripo-test__upload-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    color: var(--ui-text-2);
}

.tripo-test__upload-copy {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tripo-test__upload-copy strong {
    overflow: hidden;
    width: 100%;
    color: var(--ui-text-1);
    font-size: 10.5px;
    font-weight: 720;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tripo-test__upload-copy small {
    overflow: hidden;
    width: 100%;
    color: var(--ui-text-3);
    font-size: 9px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tripo-test__multiview {
    --tripo-upload-size: 80px;
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: start;
    justify-content: center;
    justify-items: center;
    flex: 0 0 auto;
    gap: 12px;
}

.tripo-test__multiview .tripo-test__upload svg {
    width: 22px;
    height: 22px;
}

.tripo-test__source-note,
.tripo-test__constraint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 9px 0 0;
    color: var(--ui-text-3);
    font-size: 10px;
    line-height: 1.4;
}

.tripo-test__source-note svg,
.tripo-test__constraint svg {
    flex: 0 0 auto;
    color: var(--accent);
}

.tripo-test__source-card .tripo-test__source-note {
    justify-content: center;
    text-align: center;
}

.tripo-test__profiles {
    width: 100%;
    margin-bottom: 8px;
}

.tripo-test__settings-stack {
    display: grid;
    gap: 6px;
}

.tripo-test__settings-stack .tripo-test__field {
    margin-bottom: 0;
}

.tripo-test__poly-control + .tripo-test__field,
.tripo-test__field + .tripo-test__toggles--compact {
    margin-top: 2px;
}

.tripo-test__poly-control {
    display: grid;
    grid-template-columns: minmax(112px, .7fr) minmax(128px, 1.3fr) 68px;
    align-items: center;
    gap: 8px;
    padding: 2px 0 0;
    border: 0;
    background: transparent;
}

.tripo-test__poly-heading {
    min-width: 0;
}

.tripo-test__poly-heading strong {
    color: var(--ui-text-1);
    font-size: 10px;
    font-weight: 730;
    line-height: 1.25;
    white-space: nowrap;
}

.tripo-test__poly-track {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
}

.tripo-test__poly-track span {
    color: var(--ui-text-3);
    font-size: 8.5px;
    white-space: nowrap;
}

.tripo-test__poly-track input[type="range"] {
    width: 100%;
    min-width: 0;
}

.tripo-test__poly-number-shell {
    --seedance-duration-side-width: 68px;
    width: 100%;
    height: 28px;
    min-width: 0;
}

.tripo-test-prototype .tripo-test__poly-number {
    width: 100%;
    min-width: 0;
    padding: 0 6px;
    border: 0;
    outline: 0;
    appearance: textfield;
    background: transparent;
    color: var(--ui-text-1);
    font-family: inherit;
    font-size: 9px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 28px;
    text-align: center;
}

.tripo-test-prototype .tripo-test__poly-number::-webkit-inner-spin-button,
.tripo-test-prototype .tripo-test__poly-number::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}

.tripo-test__toggles--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tripo-test__toggles--compact .tripo-test__toggle {
    grid-template-columns: minmax(0, 1fr) auto 26px;
}

.tripo-test__field {
    min-width: 0;
    margin: 0 0 7px;
    padding: 0;
    border: 0;
}

.tripo-test__field legend {
    display: flex;
    width: 100%;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.tripo-test__field legend strong {
    color: var(--ui-text-1);
    font-size: 10px;
}

.tripo-test__field legend small {
    color: var(--ui-text-3);
    font-size: 9px;
    text-align: right;
}

.tripo-test__topology-segments {
    width: 100%;
}

.tripo-test__texture-segments {
    width: 100%;
    grid-auto-columns: minmax(0, 1fr);
}

.tripo-test__texture-segments .tripo-mode-segment {
    min-height: 34px;
    flex-direction: column;
    gap: 1px;
    padding: 4px;
}

.tripo-test__texture-segments .tripo-mode-segment strong {
    overflow: hidden;
    max-width: 100%;
    font-size: 9.5px;
    font-weight: 740;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tripo-test__texture-segments .tripo-mode-segment small {
    color: var(--ui-text-3);
    font-size: 8.5px;
}

.tripo-test__toggles {
    display: grid;
    gap: 5px;
}

.tripo-test__toggle {
    display: grid;
    min-width: 0;
    min-height: 36px;
    grid-template-columns: minmax(0, 1fr) auto 26px;
    align-items: center;
    gap: 6px;
    padding: 5px 7px;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    background: var(--ui-input-bg);
    color: var(--ui-text-2);
    text-align: left;
}

.tripo-test__toggle:hover {
    background: var(--ui-hover);
    color: var(--ui-text-1);
}

.tripo-test__toggle.is-active {
    border-color: var(--accent-border-strong);
    background: var(--ui-active);
    color: var(--ui-text-1);
}

.tripo-test__toggle-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.tripo-test__toggle-copy strong {
    font-size: 10px;
    font-weight: 730;
}

.tripo-test__toggle-copy small {
    overflow: hidden;
    color: var(--ui-text-3);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tripo-test__toggle > b {
    color: var(--ui-text-3);
    font-size: 9px;
    white-space: nowrap;
}

.tripo-test__switch {
    position: relative;
    display: inline-flex;
    width: 26px;
    height: 16px;
    align-items: center;
    padding: 2px;
    border: 1px solid var(--ui-border-strong);
    border-radius: 999px;
    background: var(--ui-surface-3);
}

.tripo-test__switch i {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ui-text-3);
    transition: transform .16s ease, background-color .16s ease;
}

.tripo-test__toggle.is-active .tripo-test__switch {
    border-color: var(--accent-border-strong);
    background: var(--accent-subtle);
}

.tripo-test__toggle.is-active .tripo-test__switch i {
    background: var(--accent);
    transform: translateX(10px);
}

.tripo-test__footer {
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    border-top: 1px solid var(--ui-border);
    background: color-mix(in srgb, var(--ui-panel-bg) 95%, transparent);
    backdrop-filter: blur(14px);
}

.tripo-test__summary {
    flex: 1 1 auto;
    align-items: center;
    gap: 8px;
}

.tripo-test__summary-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--accent-subtle);
    color: var(--accent);
}

.tripo-test__summary strong {
    overflow: hidden;
    color: var(--ui-text-1);
    font-size: 11px;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tripo-test__summary small {
    overflow: hidden;
    max-width: 430px;
    color: var(--ui-text-3);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tripo-test__footer-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
}

.tripo-test__quantity {
    display: flex;
    min-height: 34px;
    align-items: center;
    gap: 4px;
    padding: 2px 4px 2px 8px;
    border: 1px solid var(--ui-border);
    border-radius: 11px;
    background: var(--ui-input-bg);
}

.tripo-test__quantity > span {
    margin-right: 3px;
    color: var(--ui-text-3);
    font-size: 9px;
}

.tripo-test__quantity button {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ui-text-2);
}

.tripo-test__quantity button:hover:not(:disabled):not([aria-disabled="true"]) {
    background: var(--ui-hover);
    color: var(--ui-text-1);
}

.tripo-test__quantity button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .42;
}

.tripo-test__quantity strong {
    width: 18px;
    color: var(--ui-text-1);
    font-size: 11px;
    text-align: center;
}

.tripo-test__price {
    display: flex;
    min-width: 58px;
    align-items: flex-end;
    flex-direction: column;
}

.tripo-test__price small {
    color: var(--ui-text-3);
    font-size: 8.5px;
}

.tripo-test__price strong {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.tripo-test__generate {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--accent-border-strong);
    border-radius: 12px;
    background: var(--accent);
    color: var(--accent-contrast) !important;
    font-size: 11px;
    font-weight: 800;
    transition: background-color .16s ease, transform .12s ease;
}

.tripo-test__generate:hover {
    background: var(--accent-hover);
}

.tripo-test__generate:active {
    transform: translateY(1px);
}

.tripo-test__generate:disabled {
    cursor: not-allowed;
    opacity: .72;
    transform: none;
}

.tripo-test__texture-check {
    cursor: pointer;
}

.tripo-test__texture-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    justify-self: center;
    accent-color: var(--accent);
    cursor: pointer;
}

.tripo-test__texture-check input:focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 3px;
}

.tripo-test__generate[aria-busy="true"] {
    cursor: wait;
}

.tripo-test__generate[aria-busy="true"] svg {
    animation: tripo-test-spin .8s linear infinite;
}

@keyframes tripo-test-spin {
    to { transform: rotate(360deg); }
}

.tripo-test__status {
    position: sticky;
    right: 16px;
    bottom: 72px;
    z-index: 5;
    justify-self: end;
    max-width: calc(100% - 32px);
    margin: -4px 16px 8px;
    padding: 7px 10px;
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    background: var(--ui-panel-elevated-bg);
    color: var(--ui-text-1);
    box-shadow: var(--ui-shadow);
    font-size: 10.5px;
}

.tripo-test__status[hidden] {
    display: none !important;
}

.tripo-test-prototype button:focus-visible,
.tripo-test-prototype textarea:focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 2px;
}

.tripo-test__prompt textarea:focus-visible,
.tripo-test__upload:focus-visible {
    border-color: var(--ui-focus-ring);
}

html.no-borders .tripo-test__header,
html.no-borders .tripo-test__footer,
html.no-borders .tripo-test__model-source,
html.no-borders .tripo-test__model-remove,
html.no-borders .tripo-test__source-actions button,
html.no-borders .tripo-test__load-action,
html.no-borders .tripo-test__gallery-model,
html.no-borders .tripo-test__tool-context,
html.no-borders .tripo-test__operations-card,
html.no-borders .tripo-test__operation,
html.no-borders .tripo-test__inline-empty,
html.no-borders .tripo-test__inline-error,
html.no-borders .tripo-test__source-card,
html.no-borders .tripo-test__result-card,
html.no-borders .tripo-test__requirement,
html.no-borders .tripo-test__prompt textarea,
html.no-borders .tripo-test__poly-number,
html.no-borders .tripo-test__toggle:not(.is-active),
html.no-borders .tripo-test__quantity,
html.no-borders .tripo-test__switch {
    border-color: transparent;
}

html.no-borders .tripo-test__toggle.is-active,
html.no-borders .tripo-test-prototype .tripo-mode-segment.is-selected,
html.no-borders .tripo-test__model-source.has-file,
html.no-borders .tripo-test__operation.is-selected,
html.no-borders .tripo-test__inline-error {
    border-color: var(--accent-border-strong) !important;
}

@container tripo-test-composer (max-width: 820px) {
    .tripo-test__header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .tripo-test__source-switch {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .tripo-test__workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .tripo-test__operations {
        flex-wrap: wrap;
    }

    .tripo-test__source-card {
        min-height: 250px;
    }

}

@container tripo-test-composer (max-width: 620px) {
    .tripo-test-prototype {
        max-height: min(78dvh, 720px);
    }

    .tripo-test__header,
    .tripo-test__source-bar,
    .tripo-test__workspace,
    .tripo-test__tool-workspace,
    .tripo-test__footer {
        padding-inline: 12px;
    }

    .tripo-test__source-bar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .tripo-test__source-switch {
        display: flex;
        flex: 1 1 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }

    .tripo-test__source-switch button {
        flex: 1 0 116px;
    }

    .tripo-test__model-source,
    .tripo-test__tool-context {
        flex-basis: 100%;
    }

    .tripo-test__model-remove {
        top: 19px;
        right: 23px;
    }

    .tripo-test__operations {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .tripo-test__operation {
        min-height: 54px;
    }

    .tripo-ops-modal.is-inline .tripo-ops-fields-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tripo-test__toggle {
        min-height: 44px;
    }

    .tripo-test__toggles--compact {
        grid-template-columns: minmax(0, 1fr);
    }

    .tripo-test__toggle-copy small {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .tripo-test__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .tripo-test__summary small {
        max-width: none;
    }

    .tripo-test__footer-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .tripo-test__quantity {
        justify-content: space-between;
    }

    .tripo-test__generate {
        grid-column: 1 / -1;
        width: 100%;
    }

    .tripo-test__status {
        bottom: 124px;
    }
}

@container tripo-test-composer (max-width: 420px) {
    .tripo-test__workspace {
        padding-block: 10px;
    }

    .tripo-test__tool-workspace {
        padding-block: 10px 12px;
    }

    .tripo-test__source-card,
    .tripo-test__result-card {
        padding: 11px;
    }

    .tripo-test__source-card .tripo-test__section-heading--source.has-requirement {
        flex-direction: column;
        padding-inline: 0;
    }

    .tripo-test__source-card .tripo-test__section-heading--source .tripo-test__requirement {
        position: static;
        transform: none;
    }

    .tripo-test__multiview {
        --tripo-upload-size: clamp(52px, 18cqi, 68px);
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .tripo-test__texture-segments {
        grid-auto-flow: row;
        grid-auto-columns: minmax(0, 1fr);
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tripo-test__poly-control {
        grid-template-columns: minmax(0, 1fr) 68px;
    }

    .tripo-test__poly-heading {
        grid-column: 1 / -1;
    }

    .tripo-test__inline-empty {
        align-items: stretch;
        flex-direction: column;
    }

    .tripo-test__inline-empty button {
        width: 100%;
    }
}

@media (max-width: 520px) {
    body.is-super-admin #mediaModeSwitcher,
    body.is-intern #mediaModeSwitcher {
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }

    body.is-super-admin #modelTabs,
    body.is-intern #modelTabs {
        width: max-content;
    }
}

@media (pointer: coarse) {
    .media-mode-switcher .model-tab,
    .media-mode-switcher .tripo-test-tab,
    .tripo-test__source-switch button,
    .tripo-test__tools button,
    .tripo-test__profiles button,
    .tripo-test__model-source,
    .tripo-test__operation,
    .tripo-test__texture-segments .tripo-mode-segment,
    .tripo-test__toggle,
    .tripo-test__generate,
    .tripo-test__quantity button {
        min-height: 44px;
    }

    .media-mode-switcher .tripo-test-tab,
    .tripo-test__quantity button {
        min-width: 44px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .tripo-test-prototype *,
    .media-mode-switcher .tripo-test-tab {
        scroll-behavior: auto !important;
        transition: none !important;
    }

    .tripo-test__generate[aria-busy="true"] svg {
        animation: none;
    }
}
