.ai3d-wrap,
.ai3d-wrap * {
    box-sizing: border-box;
}

.ai3d-wrap {
    --ai3d-ink: #152b36;
    --ai3d-muted: #657882;
    --ai3d-line: #dbe5e8;
    --ai3d-soft: #f3f7f7;
    --ai3d-primary: #173f4b;
    --ai3d-primary-dark: #0e303a;
    --ai3d-accent: #d9a441;
    --ai3d-success: #14735b;
    width: min(100%, 860px);
    margin: 28px auto;
    color: var(--ai3d-ink);
    font-family: inherit;
}

.ai3d-card {
    position: relative;
    overflow: hidden;
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid rgba(23, 63, 75, .14);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0, rgba(217, 164, 65, .13), transparent 31%),
        linear-gradient(145deg, #ffffff 0%, #fbfdfd 64%, #f4f8f7 100%);
    box-shadow: 0 24px 65px rgba(20, 48, 58, .12), 0 3px 12px rgba(20, 48, 58, .05);
}

.ai3d-card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    content: "";
    background: linear-gradient(90deg, var(--ai3d-primary), #2a7a79 58%, var(--ai3d-accent));
}

.ai3d-hero {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin: 0 0 30px;
}

.ai3d-hero-tools {
    display: grid;
    width: 68px;
    gap: 9px;
    justify-items: center;
}

.ai3d-hero-icon {
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 19px;
    color: #fff;
    background: linear-gradient(145deg, #245b68, var(--ai3d-primary-dark));
    box-shadow: 0 12px 24px rgba(14, 48, 58, .2);
}

.ai3d-hero-icon svg {
    width: 39px;
    height: 39px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai3d-helper-button,
.ai3d-account-trigger {
    display: inline-flex;
    width: 68px;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex-direction: column;
    margin: 0;
    padding: 6px 5px;
    border: 1px solid #cddbdd;
    border-radius: 9px;
    color: var(--ai3d-primary);
    background: #fff;
    box-shadow: 0 4px 12px rgba(23, 63, 75, .07);
    font: inherit;
    font-size: 10px;
    font-weight: 750;
    line-height: 1;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.ai3d-helper-button:hover,
.ai3d-helper-button:focus-visible,
.ai3d-account-trigger:hover,
.ai3d-account-trigger:focus-visible {
    border-color: #6c999b;
    background: #f3f9f8;
    box-shadow: 0 6px 15px rgba(23, 63, 75, .11);
    outline: 0;
    transform: translateY(-1px);
}

.ai3d-helper-button svg,
.ai3d-account-trigger svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai3d-eyebrow {
    display: block;
    margin: 1px 0 5px;
    color: #24706f;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .1em;
    line-height: 1.4;
    text-transform: uppercase;
}

.ai3d-hero h2 {
    margin: 0;
    color: var(--ai3d-ink);
    font-size: clamp(25px, 4vw, 36px);
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.14;
}

.ai3d-hero p {
    max-width: 650px;
    margin: 10px 0 0;
    color: var(--ai3d-muted);
    font-size: 15px;
    line-height: 1.65;
}

.ai3d-credit-balance {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 16px;
    align-items: center;
    margin: -9px 0 22px;
    padding: 13px 16px;
    border: 1px solid #bedbcd;
    border-radius: 13px;
    color: #1f5c49;
    background: #f0f9f4;
}

.ai3d-credit-balance > span {
    font-size: 13px;
    font-weight: 750;
}

.ai3d-credit-balance > strong {
    grid-row: 1 / span 2;
    grid-column: 2;
    font-size: 25px;
    line-height: 1;
}

.ai3d-credit-balance > small {
    color: #527568;
    font-size: 11px;
    line-height: 1.45;
}

.ai3d-credit-balance.is-low {
    border-color: #e8c0bc;
    color: #8d2e29;
    background: #fff4f3;
}

.ai3d-credit-balance.is-low > small {
    color: #8d514d;
}

.ai3d-form {
    display: grid;
    gap: 18px;
    margin: 0;
}

.ai3d-input-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0 0 18px;
    padding: 5px;
    border: 1px solid #d5e1e3;
    border-radius: 14px;
    background: #edf3f3;
}

.ai3d-input-tab {
    display: flex;
    min-width: 0;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #597078;
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.25;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.ai3d-input-tab svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai3d-input-tab:hover,
.ai3d-input-tab:focus-visible {
    color: var(--ai3d-primary);
    outline: 0;
}

.ai3d-input-tab.is-active {
    border-color: #d1dfe1;
    color: var(--ai3d-primary);
    background: #fff;
    box-shadow: 0 4px 12px rgba(23, 63, 75, .08);
}

.ai3d-input-panel {
    min-width: 0;
}

.ai3d-drop {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 17px;
    align-items: center;
    min-height: 142px;
    padding: 24px;
    border: 2px dashed #a9bcc2;
    border-radius: 17px;
    background: rgba(245, 249, 249, .78);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.ai3d-drop:hover,
.ai3d-drop:focus-within,
.ai3d-drop.is-dragging {
    border-color: #307b7b;
    background: #f0f8f7;
    box-shadow: 0 0 0 4px rgba(48, 123, 123, .09);
    transform: translateY(-1px);
}

.ai3d-drop input[type="file"] {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

.ai3d-upload-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 1px solid #cfdee1;
    border-radius: 15px;
    color: var(--ai3d-primary);
    background: #fff;
    box-shadow: 0 6px 16px rgba(23, 63, 75, .08);
}

.ai3d-upload-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai3d-drop-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ai3d-drop-copy strong {
    color: var(--ai3d-ink);
    font-size: 17px;
    line-height: 1.4;
}

.ai3d-drop-copy small {
    color: var(--ai3d-muted);
    font-size: 13px;
    line-height: 1.45;
}

.ai3d-drop-copy small:last-child {
    margin-top: 2px;
    color: #82929a;
    font-size: 12px;
}

.ai3d-file-button {
    padding: 10px 15px;
    border: 1px solid #c9d7da;
    border-radius: 9px;
    color: var(--ai3d-primary);
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.ai3d-source {
    display: grid;
    grid-template-columns: 144px minmax(0, 1fr);
    gap: 17px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--ai3d-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(23, 63, 75, .05);
}

.ai3d-preview-frame {
    position: relative;
    display: grid;
    width: 144px;
    height: 104px;
    overflow: hidden;
    place-items: center;
    padding: 8px;
    border: 1px solid #e0e8ea;
    border-radius: 10px;
    background: #f5f8f8;
}

.ai3d-preview-frame img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff;
}

.ai3d-pdf-mark {
    display: grid;
    width: 52px;
    height: 58px;
    place-items: center;
    border-radius: 7px;
    color: #fff;
    background: linear-gradient(145deg, #d94e48, #a92420);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    box-shadow: 0 6px 13px rgba(169, 36, 32, .22);
}

/* Uploaded plans need a readable preview before their pixels are rotated. */
.ai3d-source.is-orientable { grid-template-columns: minmax(0, 1fr); }
.ai3d-source.is-orientable .ai3d-preview-frame { width: 100%; height: clamp(180px, 36vw, 440px); grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.ai3d-source.is-orientable .ai3d-preview-frame img { width: 100%; height: 100%; min-width: 0; min-height: 0; max-height: 100%; }
.ai3d-orientation { grid-column: 1 / -1; min-width: 0; }
.ai3d-orientation > strong { font-size: 14px; color: var(--ai3d-ink); }
.ai3d-orientation-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ai3d-orientation-actions button { min-height: 40px; padding: 8px 12px; border: 1px solid var(--ai3d-line); border-radius: 7px; background: #fff; color: var(--ai3d-ink); font: inherit; font-size: 13px; cursor: pointer; }
.ai3d-orientation-actions button:hover:not(:disabled), .ai3d-orientation-actions button:focus-visible { background: #eaf4f3; border-color: var(--ai3d-primary); }
.ai3d-orientation-actions button:disabled { opacity: .55; cursor: wait; }
.ai3d-orientation p { margin: 10px 0 0; color: var(--ai3d-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }

.ai3d-file-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 14px;
    align-items: center;
    min-width: 0;
}

.ai3d-file-name {
    overflow: hidden;
    color: var(--ai3d-ink);
    font-size: 14px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai3d-file-info {
    color: var(--ai3d-muted);
    font-size: 12px;
}

.ai3d-file-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.ai3d-remove-file,
.ai3d-edit-sketch {
    padding: 8px 11px;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ai3d-remove-file {
    color: #9b312d;
    background: #fff1f0;
}

.ai3d-edit-sketch {
    color: var(--ai3d-primary);
    background: #eaf4f3;
}

.ai3d-remove-file:hover,
.ai3d-remove-file:focus-visible,
.ai3d-edit-sketch:hover,
.ai3d-edit-sketch:focus-visible {
    outline: 2px solid rgba(48, 123, 123, .22);
    outline-offset: 1px;
}

.ai3d-sketch-panel {
    min-width: 0;
}

.ai3d-sketch-editor {
    --ai3d-canvas-border: #b7c8cc;
    position: relative;
    display: grid;
    gap: 0;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #cddbdd;
    border-radius: 17px;
    background: #eef3f3;
    box-shadow: 0 10px 30px rgba(23, 63, 75, .08);
}

.ai3d-sketch-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 16px;
    border-bottom: 1px solid #d3e0e2;
    background: #fff;
}

.ai3d-sketch-heading > div:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ai3d-sketch-heading strong {
    color: var(--ai3d-ink);
    font-size: 15px;
    line-height: 1.35;
}

.ai3d-sketch-heading small {
    color: var(--ai3d-muted);
    font-size: 11px;
    line-height: 1.45;
}

.ai3d-sketch-heading-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.ai3d-sketch-text-button,
.ai3d-sketch-secondary,
.ai3d-sketch-use,
.ai3d-selection-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.25;
    cursor: pointer;
}

.ai3d-sketch-text-button {
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid #cfdddf;
    color: var(--ai3d-primary);
    background: #f8fbfb;
}

.ai3d-sketch-text-button:hover,
.ai3d-sketch-text-button:focus-visible {
    border-color: #75a0a1;
    outline: 0;
    background: #edf6f5;
}

.ai3d-sketch-text-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai3d-sketch-toolbar {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #cfdddf;
    background: #f8fafa;
}

.ai3d-sketch-tool-group {
    display: flex;
    align-items: stretch;
    gap: 4px;
}

.ai3d-sketch-tool,
.ai3d-icon-button {
    display: inline-flex;
    min-width: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0;
    padding: 6px 8px;
    border: 1px solid #d3dfe1;
    border-radius: 8px;
    color: #536a72;
    background: #fff;
    box-shadow: none;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
}

.ai3d-sketch-tool {
    flex-direction: column;
}

.ai3d-sketch-tool svg,
.ai3d-icon-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai3d-sketch-tool:hover,
.ai3d-sketch-tool:focus-visible,
.ai3d-icon-button:hover:not(:disabled),
.ai3d-icon-button:focus-visible:not(:disabled) {
    border-color: #75a0a1;
    color: var(--ai3d-primary);
    outline: 0;
    background: #edf6f5;
}

.ai3d-sketch-tool.is-active {
    border-color: #276e70;
    color: #fff;
    background: #276e70;
    box-shadow: 0 5px 12px rgba(39, 110, 112, .2);
}

.ai3d-icon-button:disabled {
    cursor: not-allowed;
    opacity: .35;
}

.ai3d-clear-button {
    color: #983c36;
}

.ai3d-line-width {
    display: grid;
    min-width: 120px;
    gap: 3px;
    color: #5d7077;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ai3d-line-width input {
    width: 100%;
    margin: 0;
    accent-color: #276e70;
}

.ai3d-sketch-workspace {
    display: grid;
    grid-template-columns: 142px minmax(0, 1fr);
    min-width: 0;
    min-height: 390px;
}

.ai3d-symbol-palette {
    min-width: 0;
    padding: 12px 10px;
    border-right: 1px solid #cbd9dc;
    background: #f6f9f9;
}

.ai3d-symbol-palette > strong,
.ai3d-symbol-palette > small {
    display: block;
    padding: 0 3px;
}

.ai3d-symbol-palette > strong {
    color: var(--ai3d-ink);
    font-size: 12px;
}

.ai3d-symbol-palette > small {
    margin-top: 2px;
    color: #7a8c93;
    font-size: 9px;
}

.ai3d-symbol-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 9px;
}

.ai3d-symbol-tool {
    display: grid;
    min-width: 0;
    min-height: 69px;
    place-items: center;
    gap: 2px;
    margin: 0;
    padding: 6px 3px 5px;
    touch-action: none;
    border: 1px solid #d4e0e2;
    border-radius: 9px;
    color: #233f48;
    background: #fff;
    box-shadow: 0 2px 6px rgba(23, 63, 75, .04);
    font: inherit;
    font-size: 8px;
    font-weight: 700;
    line-height: 1.1;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.ai3d-symbol-tool:active {
    cursor: grabbing;
}

.ai3d-symbol-tool:hover,
.ai3d-symbol-tool:focus-visible {
    border-color: #5f9294;
    color: var(--ai3d-primary);
    outline: 0;
    background: #eef7f6;
}

.ai3d-symbol-tool svg {
    width: 39px;
    height: 39px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai3d-symbol-ghost {
    position: fixed !important;
    z-index: 1000001 !important;
    width: 76px !important;
    min-height: 76px !important;
    pointer-events: none !important;
    opacity: .88;
    transform: translate(-50%, -50%) scale(1.04);
    box-shadow: 0 12px 28px rgba(14, 48, 58, .25) !important;
}

.ai3d-canvas-column {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 12px;
    background: #dfe7e8;
}

.ai3d-canvas-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--ai3d-canvas-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(23, 63, 75, .12);
}

.ai3d-sketch-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    outline: 0;
    background: #fff;
    cursor: crosshair;
}

.ai3d-sketch-canvas[data-tool="select"] {
    cursor: default;
}

.ai3d-sketch-canvas[data-tool="eraser"] {
    cursor: cell;
}

.ai3d-sketch-canvas:focus-visible {
    box-shadow: inset 0 0 0 4px rgba(48, 123, 123, .22);
}

.ai3d-canvas-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: min(80%, 330px);
    gap: 4px;
    pointer-events: none;
    color: #90a0a6;
    text-align: center;
    transform: translate(-50%, -50%);
}

.ai3d-canvas-hint strong {
    font-size: 16px;
}

.ai3d-canvas-hint span {
    font-size: 11px;
    line-height: 1.45;
}

.ai3d-selection-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 9px;
    padding: 7px;
    border: 1px solid #c8d8da;
    border-radius: 9px;
    background: #f8fbfb;
}

.ai3d-selection-actions > span {
    margin-right: auto;
    padding: 0 5px;
    color: #5e737b;
    font-size: 10px;
    font-weight: 750;
}

.ai3d-selection-actions button {
    min-height: 30px;
    padding: 5px 8px;
    border: 1px solid #cfdddf;
    color: var(--ai3d-primary);
    background: #fff;
}

.ai3d-selection-actions button:hover:not(:disabled),
.ai3d-selection-actions button:focus-visible:not(:disabled) {
    border-color: #75a0a1;
    outline: 0;
    background: #edf6f5;
}

.ai3d-selection-actions button:disabled {
    cursor: not-allowed;
    opacity: .4;
}

.ai3d-selection-actions button.is-danger {
    color: #9b312d;
}

.ai3d-sketch-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-top: 1px solid #cfdddf;
    background: #fff;
}

.ai3d-sketch-footer > div {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.ai3d-sketch-save-state {
    color: #657980;
    font-size: 10px;
    line-height: 1.35;
}

.ai3d-sketch-secondary,
.ai3d-sketch-use {
    min-height: 38px;
    padding: 8px 13px;
}

.ai3d-sketch-secondary {
    border: 1px solid #ccdadd;
    color: var(--ai3d-primary);
    background: #fff;
}

.ai3d-sketch-use {
    border: 1px solid var(--ai3d-primary);
    color: #fff;
    background: var(--ai3d-primary);
    box-shadow: 0 6px 14px rgba(23, 63, 75, .18);
}

.ai3d-sketch-use:disabled {
    border-color: #98a7ac;
    background: #98a7ac;
    box-shadow: none;
    cursor: not-allowed;
    opacity: .55;
}

.ai3d-sketch-secondary:hover,
.ai3d-sketch-secondary:focus-visible,
.ai3d-sketch-use:hover:not(:disabled),
.ai3d-sketch-use:focus-visible:not(:disabled) {
    outline: 2px solid rgba(48, 123, 123, .23);
    outline-offset: 2px;
}

.ai3d-sketch-editor:fullscreen,
.ai3d-sketch-editor.is-fullscreen-fallback {
    z-index: 1000000;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    border: 0;
    border-radius: 0;
    background: #e4ebec;
}

.ai3d-sketch-editor.is-fullscreen-fallback {
    position: fixed;
    inset: 0;
}

.ai3d-sketch-editor:fullscreen .ai3d-sketch-workspace,
.ai3d-sketch-editor.is-fullscreen-fallback .ai3d-sketch-workspace {
    min-height: calc(100vh - 190px);
}

.ai3d-sketch-editor:fullscreen .ai3d-canvas-stage,
.ai3d-sketch-editor.is-fullscreen-fallback .ai3d-canvas-stage {
    width: min(100%, calc((100vh - 245px) * 4 / 3));
    min-width: 540px;
    margin: auto;
}

html.ai3d-sketch-no-scroll {
    overflow: hidden !important;
}

.ai3d-field {
    display: grid;
    gap: 8px;
    color: var(--ai3d-ink);
    font-size: 14px;
    font-weight: 700;
}

.ai3d-field > span small {
    margin-left: 5px;
    color: #85949b;
    font-size: 12px;
    font-weight: 500;
}

.ai3d-field textarea {
    width: 100%;
    min-height: 112px;
    margin: 0;
    padding: 14px 15px;
    resize: vertical;
    border: 1px solid #cbd8dc;
    border-radius: 12px;
    outline: 0;
    color: var(--ai3d-ink);
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(23, 63, 75, .03);
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.ai3d-field textarea:focus {
    border-color: #3a8584;
    box-shadow: 0 0 0 4px rgba(48, 123, 123, .1);
}

.ai3d-field textarea::placeholder {
    color: #94a2a8;
}

.ai3d-generate {
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 2px 0 0;
    padding: 14px 20px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(110deg, var(--ai3d-primary-dark), #245f69);
    box-shadow: 0 10px 23px rgba(14, 48, 58, .2);
    font: inherit;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.4;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.ai3d-generate:not(:disabled):hover {
    box-shadow: 0 13px 29px rgba(14, 48, 58, .26);
    transform: translateY(-1px);
}

.ai3d-generate:disabled {
    box-shadow: none;
    cursor: not-allowed;
    opacity: .48;
}

.ai3d-button-arrow {
    font-size: 20px;
    font-weight: 400;
    transition: transform .2s ease;
}

.ai3d-generate:not(:disabled):hover .ai3d-button-arrow {
    transform: translateX(3px);
}

.ai3d-status {
    display: block;
    min-height: 46px;
    margin-top: 17px;
    padding: 12px 14px;
    border: 1px solid #d9e4e7;
    border-radius: 11px;
    color: #536770;
    background: rgba(244, 248, 249, .92);
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.ai3d-status[data-state="working"] {
    position: relative;
    padding-left: 42px;
    border-color: #b8d6d5;
    color: #205b5c;
    background: #eef8f7;
}

.ai3d-status[data-state="working"]::before {
    position: absolute;
    top: 14px;
    left: 15px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(32, 91, 92, .22);
    border-top-color: #205b5c;
    border-radius: 50%;
    content: "";
    animation: ai3d-spin .8s linear infinite;
}

.ai3d-status[data-state="success"] {
    border-color: #b8daca;
    color: #185e4b;
    background: #eff9f4;
}

.ai3d-status[data-state="error"] {
    border-color: #ecc0bc;
    color: #8d2e29;
    background: #fff3f2;
}

.ai3d-consumption {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #d2e2d9;
    border-radius: 11px;
    color: #245848;
    background: #f4faf7;
    font-size: 13px;
    line-height: 1.55;
}

.ai3d-consumption strong {
    display: block;
    margin: 0;
    font-size: 15px;
}

.ai3d-helper-modal,
.ai3d-account-modal {
    position: fixed;
    z-index: 1000002;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(14px, 3vw, 32px);
}

.ai3d-helper-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 25, 31, .72);
    backdrop-filter: blur(3px);
}

.ai3d-helper-panel {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(940px, 100%);
    max-height: calc(100vh - 40px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 18px;
    outline: 0;
    background: #fff;
    box-shadow: 0 28px 80px rgba(4, 18, 23, .35);
}

.ai3d-helper-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--ai3d-line);
    background: #f7faf9;
}

.ai3d-helper-heading span {
    display: block;
    margin-bottom: 2px;
    color: #287373;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ai3d-helper-heading h3 {
    margin: 0;
    color: var(--ai3d-ink);
    font-size: 20px;
    line-height: 1.25;
}

.ai3d-helper-close {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 1px solid #d2dfe1;
    border-radius: 10px;
    color: var(--ai3d-primary);
    background: #fff;
    cursor: pointer;
}

.ai3d-helper-close:hover,
.ai3d-helper-close:focus-visible {
    border-color: #75a0a1;
    background: #edf6f5;
    outline: 0;
}

.ai3d-helper-close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
}

.ai3d-helper-image-wrap {
    overflow: auto;
    padding: clamp(12px, 2.5vw, 24px);
    background: #eef3f3;
}

.ai3d-helper-image-wrap img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 145px);
    margin: 0 auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 63, 75, .12);
}

.ai3d-account-panel {
    width: min(1050px, 100%);
}

.ai3d-account-scroll {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: clamp(12px, 2.5vw, 24px);
    background: #f3f7f7;
}

.ai3d-account-load {
    margin: 0;
    padding: 16px;
    border-radius: 10px;
    color: var(--ai3d-primary);
    background: #fff;
}

.ai3d-result {
    margin-top: 24px;
    padding: 12px;
    border: 1px solid #d8e3e5;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 13px 30px rgba(23, 63, 75, .09);
}

.ai3d-result-heading {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 3px 4px 13px;
    color: var(--ai3d-ink);
    font-size: 14px;
}

.ai3d-result-heading > div {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ai3d-success-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #25a477;
    box-shadow: 0 0 0 4px rgba(37, 164, 119, .12);
}

.ai3d-result > img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 11px;
    background: #f5f7f7;
}

.ai3d-download {
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--ai3d-primary) !important;
    background: #edf4f4;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
    text-decoration: none !important;
    white-space: nowrap;
}

.ai3d-download:hover {
    background: #e2eeee;
}

.ai3d-footnote {
    margin: 12px 8px 0;
    color: #819198;
    font-size: 11px;
    line-height: 1.55;
    text-align: center;
}

.ai3d-note {
    max-width: 860px;
    margin: 20px auto;
    padding: 14px 16px;
    border: 1px solid #dbe4e6;
    border-radius: 12px;
    color: #445a64;
    background: #f7f9f9;
    line-height: 1.55;
}

.ai3d-wrap [hidden] {
    display: none !important;
}

.ai3d-wrap[aria-busy="true"] .ai3d-drop,
.ai3d-wrap[aria-busy="true"] .ai3d-field,
.ai3d-wrap[aria-busy="true"] .ai3d-sketch-editor,
.ai3d-wrap[aria-busy="true"] .ai3d-input-tabs {
    opacity: .65;
}

.ai3d-wrap[aria-busy="true"] .ai3d-sketch-canvas {
    pointer-events: none;
}

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

@media (max-width: 620px) {
    .ai3d-wrap {
        margin: 18px auto;
    }

    .ai3d-card {
        border-radius: 18px;
    }

    .ai3d-hero {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 14px;
        margin-bottom: 23px;
    }

    .ai3d-hero-icon {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }

    .ai3d-hero-tools {
        width: 50px;
        gap: 7px;
    }

    .ai3d-helper-button,
    .ai3d-account-trigger {
        width: 50px;
        min-height: 43px;
        padding: 4px 2px;
        gap: 2px;
        font-size: 8px;
    }

    .ai3d-helper-button svg,
    .ai3d-account-trigger svg {
        width: 13px;
        height: 13px;
    }

    .ai3d-hero-icon svg {
        width: 30px;
        height: 30px;
    }

    .ai3d-eyebrow {
        font-size: 10px;
    }

    .ai3d-hero p {
        grid-column: 1 / -1;
    }

    .ai3d-credit-balance {
        margin-top: -5px;
    }

    .ai3d-drop {
        grid-template-columns: 44px minmax(0, 1fr);
        min-height: 132px;
        padding: 19px;
    }

    .ai3d-upload-icon {
        width: 44px;
        height: 44px;
    }

    .ai3d-file-button {
        display: none;
    }

    .ai3d-source {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
    }

    .ai3d-preview-frame {
        width: 96px;
        height: 78px;
        padding: 6px;
    }

    .ai3d-file-meta {
        grid-template-columns: minmax(0, 1fr);
    }

    .ai3d-file-actions {
        grid-column: 1;
        grid-row: auto;
        margin-top: 5px;
        justify-content: flex-start;
    }

    .ai3d-input-tab {
        min-height: 45px;
        gap: 6px;
        padding: 8px 7px;
        font-size: 11px;
    }

    .ai3d-input-tab svg {
        width: 18px;
        height: 18px;
    }

    .ai3d-sketch-heading {
        align-items: flex-start;
        flex-direction: column;
        padding: 13px;
    }

    .ai3d-sketch-heading-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .ai3d-sketch-toolbar {
        align-items: stretch;
        flex-wrap: wrap;
        gap: 8px;
        padding: 9px;
    }

    .ai3d-sketch-tool-group:first-child {
        width: 100%;
    }

    .ai3d-sketch-tool {
        min-width: 0;
        flex: 1 1 0;
        padding: 5px 3px;
    }

    .ai3d-line-width {
        min-width: 130px;
        flex: 1 1 130px;
    }

    .ai3d-history-tools {
        flex: 0 0 auto;
    }

    .ai3d-sketch-workspace {
        display: block;
        min-height: 0;
    }

    .ai3d-symbol-palette {
        padding: 9px;
        border-right: 0;
        border-bottom: 1px solid #cbd9dc;
    }

    .ai3d-symbol-list {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 0 0 5px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .ai3d-symbol-tool {
        min-width: 70px;
        flex: 0 0 70px;
        scroll-snap-align: start;
    }

    .ai3d-canvas-column {
        padding: 8px;
    }

    .ai3d-selection-actions > span {
        width: 100%;
        margin: 0 0 2px;
    }

    .ai3d-sketch-footer {
        align-items: stretch;
        flex-direction: column;
        padding: 10px;
    }

    .ai3d-sketch-footer > div {
        width: 100%;
    }

    .ai3d-sketch-secondary,
    .ai3d-sketch-use {
        flex: 1 1 0;
    }

    .ai3d-sketch-editor:fullscreen .ai3d-canvas-stage,
    .ai3d-sketch-editor.is-fullscreen-fallback .ai3d-canvas-stage {
        width: 100%;
        min-width: 0;
    }

    .ai3d-result-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .ai3d-helper-modal,
    .ai3d-account-modal {
        padding: 10px;
    }

    .ai3d-helper-panel {
        max-height: calc(100vh - 20px);
        border-radius: 14px;
    }

    .ai3d-helper-heading {
        padding: 13px 14px;
    }

    .ai3d-helper-image-wrap img {
        max-height: calc(100vh - 118px);
    }
}

@media (min-width: 621px) and (max-width: 820px) {
    .ai3d-sketch-toolbar {
        flex-wrap: wrap;
    }

    .ai3d-line-width {
        flex: 1 1 120px;
    }
}

@media (max-height: 620px) and (orientation: landscape) {
    .ai3d-sketch-editor:fullscreen .ai3d-sketch-heading,
    .ai3d-sketch-editor.is-fullscreen-fallback .ai3d-sketch-heading {
        padding-block: 8px;
    }

    .ai3d-sketch-editor:fullscreen .ai3d-sketch-toolbar,
    .ai3d-sketch-editor.is-fullscreen-fallback .ai3d-sketch-toolbar {
        padding-block: 6px;
    }

    .ai3d-sketch-editor:fullscreen .ai3d-sketch-workspace,
    .ai3d-sketch-editor.is-fullscreen-fallback .ai3d-sketch-workspace {
        min-height: 420px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai3d-wrap *,
    .ai3d-wrap *::before,
    .ai3d-wrap *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
