/* IN3D workspace: preserve the established ink/green palette and type. */
.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 2000; padding: .75rem 1rem; color: #0c0f0d; background: #c4ff57; }
.skip-link:focus { top: 1rem; }
:where(a, button, input, select, summary):focus-visible { outline: 3px solid #c4ff57 !important; outline-offset: 4px; }
.app-nav .nav-link { white-space: nowrap; font-size: .95rem; }
.app-nav button.nav-link { border: 0; background: transparent; }
.app-nav .nav-link.active { color: var(--primary-color); text-decoration: underline; text-underline-offset: .45rem; }
.app-nav .dropdown-item.active { color: #0c0f0d; background: var(--primary-color); }
.app-nav .lang-switcher { max-width: 5rem; }
.editor-workspace { max-width: 1800px; margin-inline: auto; }
.editor-bar { display: flex; flex-wrap: wrap; align-items: end; gap: .85rem 1.25rem; margin-bottom: 1rem; }
.editor-identity { flex: 1 1 20rem; max-width: 36rem; }
.editor-identity label { font-size: .8rem; color: var(--text-muted); margin-bottom: .3rem; }
.editor-status { min-height: 1.5em; font-size: .85rem; color: #c4ff57; margin-top: .4rem; }
.editor-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 1rem; align-items: start; }
.editor-scene { min-width: 0; }
.editor-tools { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: .6rem 0 .85rem; }
.editor-tool-group { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.editor-tool-group .btn { padding: .4rem .75rem; font-size: .85rem; }
.editor-tool-group + .editor-tool-group { border-left: 1px solid var(--border-soft); padding-left: 1rem; }
.editor-viewport { height: 62vh; min-height: 360px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 1.25rem; overflow: hidden; touch-action: none; }
.editor-viewport canvas { display: block; touch-action: none; }
.editor-views { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.editor-help { max-width: 80ch; color: var(--text-muted); font-size: .8rem; margin-top: .6rem; }
.editor-panel { padding: 1rem; margin-bottom: .85rem; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 16px; }
.editor-panel summary { font-weight: 600; cursor: pointer; }
.editor-panel .form-control, .editor-panel .form-select { border-radius: 8px; }
.editor-panel label, .editor-panel .property-label { font-size: .8rem; }
.editor-panel .property-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .35rem; }
.editor-panel .property-axis { display: block; color: var(--text-muted); font-size: .7rem; }
.editor-panel .property-row input { width: 100%; min-width: 0; padding-inline: .4rem; }
.editor-panel output { font-size: .8rem; display: block; margin-top: .5rem; }
.editor-ai summary { display: flex; align-items: center; }
.editor-ai textarea { resize: vertical; min-height: 7rem; }
.editor-ai-balance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-top: .8rem; }
.editor-ai-balance__item { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: .1rem .45rem; min-width: 0; padding: .7rem .75rem; background: color-mix(in srgb, var(--primary-color) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary-color) 22%, var(--border-soft)); border-radius: 12px; }
.editor-ai-balance__label { color: var(--text-muted); font-size: .7rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.editor-ai-balance__item strong { justify-self: end; min-width: 0; overflow-wrap: anywhere; color: var(--primary-color); font-size: 1rem; font-variant-numeric: tabular-nums; }
.editor-ai-balance__note { grid-column: 1 / -1; color: var(--text-muted); font-size: .7rem; line-height: 1.25; }
.editor-ai-buy { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .65rem .7rem; color: var(--text-primary); text-align: left; background: color-mix(in srgb, var(--primary-color) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary-color) 42%, var(--border-soft)); border-radius: .75rem; transition: background-color .18s ease, border-color .18s ease, transform .18s ease; }
.editor-ai-buy:hover { color: var(--text-primary); background: color-mix(in srgb, var(--primary-color) 13%, var(--surface)); border-color: var(--primary-color); transform: translateY(-1px); }
.editor-ai-buy:active { transform: translateY(0); }
.editor-ai-buy:disabled { cursor: wait; opacity: .62; transform: none; }
.editor-ai-buy__icon { display: grid; width: 2.1rem; aspect-ratio: 1; place-items: center; color: #0c0f0d; background: var(--primary-color); border-radius: .5rem; }
.editor-ai-buy__copy { display: grid; min-width: 0; line-height: 1.15; }
.editor-ai-buy__copy strong { font-size: .82rem; }
.editor-ai-buy__copy small { margin-top: .15rem; color: var(--text-muted); font-size: .68rem; }
.editor-ai-buy__price { padding: .3rem .45rem; color: var(--primary-color); font-size: .76rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; background: color-mix(in srgb, var(--primary-color) 8%, transparent); border-radius: .5rem; }
.editor-ai-history ol { margin: 0; padding-left: 1.2rem; color: var(--text-muted); font-size: .78rem; }
.editor-ai-history li + li { margin-top: .45rem; }
.editor-ai-history li { overflow-wrap: anywhere; }
.editor-ai-progress { position: relative; display: flex; align-items: center; gap: .8rem; overflow: hidden; padding: .9rem; color: var(--text-primary); font-size: .82rem; background: color-mix(in srgb, var(--primary-color) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary-color) 40%, var(--border-soft)); border-radius: .75rem; box-shadow: 0 0 24px rgb(196 255 87 / .08); }
.editor-ai-progress[hidden] { display: none; }
.editor-ai-progress__mark { position: relative; display: grid; flex: 0 0 2.5rem; width: 2.5rem; aspect-ratio: 1; place-items: center; color: #0c0f0d; background: var(--primary-color); border-radius: 12px; box-shadow: 0 0 0 0 rgb(196 255 87 / .35); animation: ai-mark-pulse 1.8s ease-out infinite; }
.editor-ai-progress__mark i { font-size: 1.15rem; }
.editor-ai-progress__content { display: grid; flex: 1; min-width: 0; gap: .18rem; }
.editor-ai-progress__content strong { color: var(--primary-color); font-size: .86rem; }
.editor-ai-progress__content > span:not(.editor-ai-progress__track) { color: var(--text-muted); line-height: 1.35; }
.editor-ai-progress__meta { display: flex; justify-content: space-between; gap: .75rem; margin-top: .35rem; color: var(--text-muted); font-size: .7rem; font-variant-numeric: tabular-nums; }
.editor-ai-progress__content small { margin-top: .2rem; color: var(--text-muted); font-size: .68rem; line-height: 1.35; }
.editor-ai-progress__track { display: block; height: 4px; margin-top: .25rem; overflow: hidden; background: rgb(196 255 87 / .14); border-radius: 999px; }
.editor-ai-progress__track span { display: block; width: var(--ai-progress, 8%); height: 100%; background: var(--primary-color); border-radius: inherit; box-shadow: 0 0 12px rgb(196 255 87 / .3); transition: width 1s cubic-bezier(.16, 1, .3, 1); }
.editor-ai-scene-progress { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; padding: 2rem; text-align: center; background: rgb(12 15 13 / .86); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); border-radius: 1.25rem; }
.editor-ai-scene-progress[hidden] { display: none; }
.editor-ai-scene-progress__mark { display: grid; width: 4rem; aspect-ratio: 1; place-items: center; margin-bottom: .35rem; color: #0c0f0d; background: var(--primary-color); border-radius: 1.25rem; box-shadow: var(--shadow-md); animation: ai-mark-pulse 1.8s ease-out infinite; }
.editor-ai-scene-progress__mark i { font-size: 1.65rem; }
.editor-ai-scene-progress strong { color: var(--text-primary); font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif; font-size: clamp(1.15rem, 2vw, 1.55rem); text-wrap: balance; }
.editor-ai-scene-progress > span:not(.editor-ai-scene-progress__mark, .editor-ai-scene-progress__track) { max-width: 38ch; color: var(--text-muted); }
.editor-ai-scene-progress .editor-ai-progress__meta { width: min(20rem, 72%); color: var(--text-primary); }
.editor-ai-scene-progress small { max-width: 38ch; color: var(--text-muted); font-size: .78rem; }
.editor-ai-scene-progress__track { display: block; width: min(20rem, 72%); height: 4px; margin-top: .55rem; overflow: hidden; background: rgb(196 255 87 / .18); border-radius: 999px; }
.editor-ai-scene-progress__track span { display: block; width: var(--ai-progress, 8%); height: 100%; background: var(--primary-color); border-radius: inherit; box-shadow: 0 0 16px rgb(196 255 87 / .35); transition: width 1s cubic-bezier(.16, 1, .3, 1); }
@keyframes ai-mark-pulse { 70%, 100% { box-shadow: 0 0 0 12px rgb(196 255 87 / 0); } }
.editor-dialog { max-width: 30rem; width: calc(100% - 2rem); background: var(--surface); color: var(--text-primary); border: 1px solid var(--border-soft); border-radius: 18px; padding: 1.5rem; }
.editor-dialog::backdrop { background: rgb(0 0 0 / .75); }
.editor-dialog .dialog-actions { display: grid; gap: .65rem; margin-top: 1rem; }
.editor-draft-note { font-size: .85rem; color: var(--text-muted); max-width: 85ch; }
.gallery-source { position: absolute; bottom: .75rem; left: .75rem; background: #151a17; color: #f0f3ed; border-radius: 8px; padding: .3rem .6rem; font-size: .75rem; }
@media (max-width: 1199.98px) {
    .app-nav .navbar-collapse { padding-block: .75rem; max-height: calc(100dvh - 70px); overflow: auto; }
    .app-nav .nav-link { padding-block: .65rem; }
    .app-nav .nav-account { border-top: 1px solid var(--border-soft); margin-top: .5rem; padding-top: .5rem; }
    .app-nav .dropdown-menu { border: 0; border-left: 2px solid var(--border-soft); margin-left: .5rem; }
}
@media (max-width: 991.98px) {
    .editor-layout { grid-template-columns: minmax(0,1fr); }
    .editor-sidebar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
    .editor-viewport { height: 52vh; }
}
@media (max-width: 575.98px) {
    .editor-sidebar { display: block; }
    .editor-actions { margin-left: 0; width: 100%; }
    .editor-actions .btn { flex: 1; padding-inline: .6rem; font-size: .85rem; }
    .editor-viewport { min-height: 300px; height: 48dvh; }
    .editor-tool-group + .editor-tool-group { padding-left: 0; border-left: 0; }
    .editor-tool-group .btn { min-height: 40px; }
    .editor-ai-balance__item { padding-inline: .65rem; }
}
@media (prefers-reduced-motion: reduce) { .editor-workspace *, .app-nav * { transition: none !important; animation: none !important; } }
.editor-workspace .btn-secondary { color: #e6eee8; background: #26312a; border-color: #455449; }
.editor-workspace .btn-secondary:hover { background: #344438; }
.editor-workspace .form-control:disabled { background: #1d2420; color: #89948c; opacity: 1; }
.gallery-detail__image { position: relative; }
.editor-workspace .btn-outline-danger { color: #ff8b8b; border-color: #ef6464; }
.editor-workspace .btn-outline-danger:hover { color: #0c0f0d; background: #ef6464; }

/* Simple mode keeps the scene central and reveals precision tools on demand. */
.editor-workspace[data-mode="simple"] .advanced-only,
.editor-workspace[data-mode="advanced"] .simple-only { display: none !important; }
.editor-mode-description { font-size: .85rem; color: var(--text-muted); margin-bottom: .25rem; }
.editor-canvas-wrap { position: relative; }
.editor-empty-scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 2rem; pointer-events: none; z-index: 1; background: rgb(12 15 13 / .58); }
.editor-empty-scene[hidden] { display: none; }
.editor-empty-scene h2 { font-size: 1.4rem; }
.editor-empty-scene p { max-width: 38ch; font-size: .95rem; color: var(--text-muted); }
.editor-parameter-section { border-top: 1px solid var(--border-soft); padding-top: .8rem; margin-top: .8rem; }
.editor-parameter-section > summary { margin-bottom: .75rem; }
.editor-nudge { display: flex; flex-wrap: wrap; gap: .35rem; }
.editor-field-note { display: block; color: var(--text-muted); font-size: .75rem; margin: .2rem 0 .5rem; }
@media (min-width: 992px) { .editor-scene { position: sticky; top: 1rem; } }

.editor-base-controls { margin-bottom: .9rem; }
.editor-shape-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.editor-shape-choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; min-width: 0; min-height: 76px; padding: .5rem .15rem; color: var(--text-muted); background: transparent; border: 1px solid var(--border-soft); border-radius: 8px; font-size: .72rem; }
.editor-shape-choice svg { width: 54px; max-width: 85%; height: 34px; fill: currentColor; fill-opacity: .18; stroke: currentColor; stroke-width: 2; }
.editor-shape-choice[aria-pressed="true"] { color: var(--primary-color); border-color: var(--primary-color); background: rgb(196 255 87 / .06); }
.editor-shape-choice:hover:not(:disabled) { color: var(--primary-color); border-color: var(--primary-color); }
.editor-shape-choice:disabled { opacity: .5; }
.editor-base-sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.editor-base-sizes .btn { min-width: 0; padding: .45rem .15rem; white-space: normal; border-radius: 8px; }
.editor-base-sizes small { display: block; font-size: .66rem; margin-top: .15rem; }
.editor-base-sizes [aria-pressed="true"] { color: var(--primary-color); border-color: var(--primary-color); }

.editor-catalog-colors { display: flex; flex-wrap: wrap; gap: .4rem; }
.editor-catalog-color { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .55rem; background: transparent; color: var(--text-primary); border: 1px solid var(--border-soft); border-radius: 8px; font-size: .8rem; }
.editor-catalog-color[aria-pressed="true"] { border-color: var(--primary-color); color: var(--primary-color); }
.editor-color-swatch { width: 18px; height: 18px; display: inline-block; flex-shrink: 0; border: 1px solid #768079; border-radius: 50%; }

.editor-zoom-button svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.editor-zoom-button { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
