/* ============================================================
 * 3D Generation Page styles
 * Hunyuan 3D v3.1 family (FAL provider)
 * Spec: ТЗ_Hunyuan_3D_v3.1_FAL.md
 * ============================================================ */

.aidc-3d-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
  color: #e6e8ee;
  font-family: inherit;
  max-width: 880px;
  margin: 0 auto;
}

.aidc-3d-form h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #fff;
}

.aidc-3d-form .aidc-3d-hint {
  font-size: 13px;
  color: #8c93a8;
  margin: 0 0 8px;
}

.aidc-3d-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aidc-3d-row label {
  font-size: 13px;
  font-weight: 500;
  color: #c0c5d4;
}

.aidc-3d-row select,
.aidc-3d-row input[type="number"],
.aidc-3d-row input[type="text"],
.aidc-3d-row textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  color: #f3f6ff;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  min-height: 34px;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
  box-sizing: border-box;
}
.aidc-3d-row select:focus,
.aidc-3d-row input:focus,
.aidc-3d-row textarea:focus {
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
}
.aidc-3d-row textarea {
  min-height: 110px;
  resize: vertical;
}

.aidc-3d-row.aidc-3d-row-inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.aidc-3d-row.aidc-3d-row-inline label {
  flex: 1;
}

/* Multi-view image grid (Pro: up to 8) */
.aidc-3d-views {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.aidc-3d-view-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #15181f;
  border: 1px dashed #2a2f3d;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s;
}
.aidc-3d-view-slot:hover {
  border-color: #4a6cf7;
}
.aidc-3d-view-slot.has-image {
  border-style: solid;
  border-color: #2a2f3d;
}
.aidc-3d-view-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.aidc-3d-view-slot .aidc-3d-view-label {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #c0c5d4;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}
.aidc-3d-view-slot .aidc-3d-view-clear {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  font-size: 14px;
  line-height: 1;
}
.aidc-3d-view-slot.has-image .aidc-3d-view-clear { display: block; }
.aidc-3d-view-slot.is-required:not(.has-image) {
  border-color: var(--aidc-action-primary-from, #ff2ea6);
}
.aidc-3d-view-slot.is-required.is-invalid:not(.has-image) {
  border-color: #d65a5a;
  background: rgba(214, 90, 90, 0.08);
  outline: 2px solid rgba(214, 90, 90, 0.22);
  outline-offset: 2px;
}
.aidc-3d-required-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 46, 166, 0.42);
  border-radius: 999px;
  background: rgba(255, 46, 166, 0.12);
  color: var(--aidc-text-primary, #fff);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}
.aidc-3d-view-slot.has-image .aidc-3d-required-badge {
  display: none;
}
.aidc-3d-primary-ref-hint {
  margin: 7px 0 12px;
  color: var(--aidc-text-secondary, #8c93a8);
  font-size: 12px;
  line-height: 1.4;
}
.aidc-3d-primary-ref-hint.is-error {
  color: #d65a5a;
  font-weight: 650;
}

.aidc-3d-token-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #15181f;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #2a2f3d;
}
.aidc-3d-token-display .aidc-3d-token-label {
  color: #8c93a8;
  font-size: 13px;
}
.aidc-3d-token-display .aidc-3d-token-value {
  color: #fff;
  font-weight: 600;
  font-size: 18px;
}

.aidc-3d-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
/* Big primary "ГЕНЕРАЦИЯ ⚡ N ткн" button (parity with image/video) */
.aidc-3d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
  width: 100%;
  background: linear-gradient(135deg, #ff2ea6 0%, #c644fc 50%, #6a5cff 100%);
  color: #fff;
  border: none;
  padding: 14px 22px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 8px 24px rgba(255,46,166,0.25);
}
.aidc-3d-btn:hover { filter: brightness(1.08); box-shadow: 0 10px 28px rgba(255,46,166,0.35); }
.aidc-3d-btn:active { transform: translateY(1px); }
.aidc-3d-btn:disabled {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.35);
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}
.aidc-3d-btn__title { font-weight: 800; }
.aidc-3d-btn__spark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
}
.aidc-3d-btn__spark svg { color: #fff; }
.aidc-3d-btn__cost {
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #fff;
}
.aidc-3d-btn.aidc-3d-btn-secondary {
  background: transparent;
  border: 1px solid #2a2f3d;
  box-shadow: none;
}

.aidc-3d-status {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  display: none;
}
.aidc-3d-status.is-info  { display: block; background: #1a2540; color: #8fb3ff; border: 1px solid #2c4180; }
.aidc-3d-status.is-error { display: block; background: #3a1a1a; color: #ff9090; border: 1px solid #6a2828; }
.aidc-3d-status.is-success { display: block; background: #1a3a25; color: #8fff9f; border: 1px solid #285a32; }

/* ─────────── Viewer ─────────── */
.aidc-3d-viewer-wrap {
  width: 100%;
  height: 480px;
  background: #0a0d14;
  border-radius: 8px;
  border: 1px solid #2a2f3d;
  overflow: hidden;
  position: relative;
}
.aidc-3d-viewer-wrap model-viewer {
  width: 100%;
  height: 100%;
  background-color: transparent;
  --poster-color: transparent;
}
.aidc-3d-viewer-toolbar {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* Lightweight timeline preview: real provider/stored image with a durable
 * reference fallback and an explicit fullscreen interaction hint. */
.aidc-3d-static-preview.is-poster-missing {
  background: linear-gradient(145deg, #10131b, #0c0d12 62%);
}
.aidc-3d-static-preview:not(.is-poster-missing),
.aidc-3d-static-preview:not(.is-poster-missing) .aidc-3d-static-preview__poster {
  background: #fff !important;
}
.aidc-3d-static-preview__hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  max-width: calc(100% - 32px);
  padding: 8px 14px;
  border: 1px solid rgba(125, 233, 255, 0.28);
  border-radius: 999px;
  background: rgba(10, 13, 20, 0.82);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  color: #dffbff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.aidc-3d-static-preview:focus-visible {
  outline: 2px solid #7de9ff !important;
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .aidc-3d-static-preview__hint {
    bottom: 12px;
    padding: 7px 11px;
    font-size: 11px;
    white-space: normal;
  }
}

/* Hide section by default; JS toggles */
.aidc-3d-only-pro,
.aidc-3d-only-text,
.aidc-3d-only-rapid {
  display: none;
}
.aidc-3d-form[data-model="hunyuan_3d_v3_1_pro"]      .aidc-3d-only-pro   { display: block; }
.aidc-3d-form[data-model="hunyuan_3d_v3_1_pro_text"] .aidc-3d-only-text  { display: block; }
.aidc-3d-form[data-model="hunyuan_3d_v3_1_rapid"]    .aidc-3d-only-rapid { display: block; }

@media (max-width: 720px) {
  .aidc-3d-views { grid-template-columns: repeat(2, 1fr); }
  .aidc-3d-viewer-wrap { height: 360px; }
}


/* ============================================================
 * 3D Asset Card integration (timeline / resources grid)
 * Spec: TZ_3D_CARDS_INTEGRATION.md
 * ============================================================ */
.rv2-card--3d .rv2-card__media { background: linear-gradient(135deg, #1a1f2e 0%, #20263a 100%); }
.rv2-card__3d-ph { color: rgba(143,179,255,0.85); position: relative; }
/* Server-stored thumbnail (real GLB render). When loaded, fades in over the cube
 * placeholder; on 404 it triggers client render+upload (see 3d-thumbnail.js). */
.rv2-card__3d-thumb {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 220ms ease;
  background: transparent;
  pointer-events: none;
  z-index: 1;
}
.rv2-card__3d-thumb.is-loaded { opacity: 1; }
/* Имя 3D-ассета: спускаем ВНИЗ карточки (а не держим по центру, где оно
 * перекрывает превью модели и плохо читается). Полупрозрачная градиентная
 * подложка обеспечивает читаемость поверх любого thumbnail. z-index выше
 * thumb (z-index:1), чтобы имя не перекрывалось картинкой. */
.rv2-card__3d-ph .rv2-card__audio-name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 16px 8px 6px;
  z-index: 2;
  text-align: center;
  font-size: 11px;
  line-height: 1.3;
  color: rgba(225,235,255,0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(to top, rgba(8,11,20,0.85) 0%, rgba(8,11,20,0.55) 55%, rgba(8,11,20,0) 100%);
  pointer-events: none;
}
.rv2-card__badge {
  position: absolute; top: 8px; left: 8px;
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  z-index: 3;
  pointer-events: none;
}
.rv2-card__badge--3d {
  background: linear-gradient(135deg, #4a8aff 0%, #6a5cff 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.rv2-card__qbtn--viewer { color: #8fb3ff; }
.rv2-card__qbtn--viewer:hover { color: #fff; background: rgba(74,138,255,0.35); }
/* 3D post-process / zip quick-action buttons */
.rv2-card__qbtn--3d { color: #b8c8ff; border-color: rgba(120,150,255,0.35); }
.rv2-card__qbtn--3d:hover { color: #fff; background: rgba(74,138,255,0.4); border-color: rgba(150,180,255,0.6); }
.rv2-card__qbtn[data-action="3d-download-zip"]:hover { background: rgba(80,160,90,0.45); }
.rv2-card__qbtn[data-action="3d-smart-topology"]:hover { background: rgba(160,90,200,0.45); }
.rv2-card__qbtn[data-action="3d-part-split"]:hover { background: rgba(220,150,60,0.45); }
.rv2-card__qbtn:disabled { opacity: 0.5; cursor: wait; }

/* ===== 3D Modal Viewer (overlay) ===== */
.aidc-3d-modal-overlay {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: aidc3dFadeIn 160ms ease-out;
}
@keyframes aidc3dFadeIn { from { opacity: 0; } to { opacity: 1; } }
.aidc-3d-modal {
  width: 90vw; max-width: 1280px;
  height: 85vh; max-height: 900px;
  background: #15181f;
  border: 1px solid #2a2f3d;
  border-radius: 12px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.aidc-3d-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #2a2f3d;
  background: #1a1d25;
}
.aidc-3d-modal__title {
  font-size: 14px; font-weight: 600; color: #e6e8ee;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aidc-3d-modal__close {
  background: transparent; border: 0; color: #c0c5d4;
  font-size: 28px; line-height: 1; cursor: pointer;
  padding: 0 8px;
  border-radius: 6px;
}
.aidc-3d-modal__close:hover { color: #fff; background: rgba(255,255,255,0.08); }
.aidc-3d-modal__body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.aidc-3d-modal__viewer { flex: 1 1 auto; min-height: 400px; height: 100%; background: #0e1117; position: relative; }
.aidc-3d-modal__viewer model-viewer { width: 100% !important; height: 100% !important; min-height: 400px; display: block; }
.aidc-3d-modal__body .aidc-3d-viewer-toolbar {
  padding: 10px 16px;
  border-top: 1px solid #2a2f3d;
  display: flex; flex-wrap: wrap; gap: 8px;
  background: #1a1d25;
}

@media (max-width: 720px) {
  .aidc-3d-modal { width: 96vw; height: 92vh; padding: 0; }
}
/* 
   3D progress bar + log stream (TZ_3D_PROGRESS_STREAMING)
   ─ */
.aidc-3d-progress { margin-top: 12px; padding: 10px 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; }
.aidc-3d-progress__label { font-size: 13px; color: #cfd8e3; margin-bottom: 6px; }
.aidc-3d-progress__bar { width: 100%; height: 8px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; }
.aidc-3d-progress__fill { height: 100%; width: 0%; background: linear-gradient(90deg, #4a90ff, #6ab0ff); transition: width .35s ease; }
.aidc-3d-log-stream { margin-top: 10px; padding: 10px 12px; background: #0e1320; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; max-height: 220px; display: flex; flex-direction: column; }
.aidc-3d-log-stream__title { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #8ea0b8; margin-bottom: 6px; }
.aidc-3d-log-stream__list { flex: 1 1 auto; overflow-y: auto; font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.45; color: #c0cdde; }
.aidc-3d-log-line { padding: 2px 0; word-break: break-word; white-space: pre-wrap; }
.aidc-3d-log-line--warn { color: #ffc56e; }
.aidc-3d-log-line--error { color: #ff7474; }

/* ============================================================
 * 3D form  panel/tabs integration (matches image/video pages)
 * Added in v1.9.0 (TZ_3D_UI_PANEL_PARITY)
 * ============================================================ */

/* When form lives inside .generation-panel__content  drop max-width
   and decorative padding, use the panel's internal scroll. */
.aidc-3d-form--panel {
  max-width: none;
  margin: 0;
  padding: 14px 18px 18px;
  gap: 14px;
}

/* Caret для select — повышаем специфичность над .aidc-3d-row select,
   используем pink-gradient mask как .ms-select. */
.aidc-3d-form .aidc-3d-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
  padding-right: 36px;
  position: relative;
}
.aidc-3d-form .aidc-3d-row {
  position: relative;
}
/* Каретка через background-image (pink → cyan gradient) */
.aidc-3d-form select.aidc-3d-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='%23ff7de9'/><stop offset='1' stop-color='%237ae2ff'/></linearGradient></defs><path fill='url(%23g)' d='M6.5 9l5.5 6 5.5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
}

/* PBR checkbox  pink accent matching panel */
.aidc-3d-check {
  width: 18px; height: 18px;
  accent-color: #ff2ea6;
  cursor: pointer;
}

/* Token cost  coin SVG + value */
.aidc-3d-token-display { gap: 12px; }
.aidc-3d-token-left {
  display: inline-flex; align-items: center; gap: 8px;
  color: #c0c5d4;
}
.aidc-3d-token-left svg { color: #ffc46a; flex-shrink: 0; }

/* (Removed v1.9.3) duplicate .aidc-3d-btn override — primary styles
   live above. Keep only SVG flex-shrink helper. */
.aidc-3d-btn svg { flex-shrink: 0; }

/* Slot upload-icon placeholder (SVG) shown when empty */
.aidc-3d-view-placeholder {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  inset: 0;
  color: rgba(255,255,255,0.32);
  pointer-events: none;
  transition: color .15s;
}
.aidc-3d-view-slot:hover .aidc-3d-view-placeholder { color: rgba(255,46,166,0.7); }
.aidc-3d-view-slot.has-image .aidc-3d-view-placeholder { display: none; }

/* Clear button  SVG cross */
.aidc-3d-view-clear {
  display: none !important;
  align-items: center; justify-content: center;
  font-size: 0;
  padding: 0;
}
.aidc-3d-view-slot.has-image .aidc-3d-view-clear { display: inline-flex !important; }
.aidc-3d-view-clear svg { color: #fff; }

/* Custom scroll inside textarea + log list (uses .aidc-scroll class hooks) */
.aidc-3d-form--panel textarea {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.10) transparent;
}
.aidc-3d-form--panel textarea::-webkit-scrollbar { width: 4px; }
.aidc-3d-form--panel textarea::-webkit-scrollbar-track { background: transparent; }
.aidc-3d-form--panel textarea::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 4px; }

/* ============================================================
 * 3D references panel polish (v1.9.2)
 * - Detach "Опорные изображения" label from tabs header
 * - Per-slot view-direction SVG (front/back/left/right/top/bottom/3-quarter)
 * - Multi-view toggle styled as .refp-drop-block parity
 * ============================================================ */

/* Single slot grid (just the main "3D вид") */
.aidc-3d-views.aidc-3d-views--single {
  grid-template-columns: 1fr;
  max-width: 220px;
}
.aidc-3d-views.aidc-3d-views--single .aidc-3d-view-slot {
  aspect-ratio: 1 / 1;
}

/* Extra views (multi-view section behind a checkbox) */
.aidc-3d-views.aidc-3d-views--extra {
  margin-top: 10px;
  grid-template-columns: repeat(4, 1fr);
}

/* Detach the «Опорные изображения» label so it isn't glued to the tabs */
.aidc-3d-only-pro {
  display: block;
  margin-top: 6px;
}
.aidc-3d-only-pro > .aidc-3d-row-label {
  display: block;
  margin: 14px 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #c0c5d4;
  letter-spacing: 0.04em;
}

/* View-direction SVG hint inside empty slot */
.aidc-3d-view-placeholder svg {
  width: 60%;
  height: 60%;
  max-width: 64px;
  max-height: 64px;
  color: rgba(255,255,255,0.35);
  transition: color .15s, transform .2s;
}
.aidc-3d-view-slot:hover .aidc-3d-view-placeholder svg {
  color: rgba(255,255,255,0.55);
  transform: scale(1.05);
}
.aidc-3d-view-slot.has-image .aidc-3d-view-placeholder svg { display: none; }

/* Multi-view toggle row — styled like .refp-drop-block panels */
.aidc-3d-multiview-toggle {
  margin: 12px 0 10px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.aidc-3d-multiview-toggle label {
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: #d8dcec;
  flex: 1;
}

/* Helper button (Multi-view prompt helper) */
.aidc-3d-helper-row {
  margin: 0 0 12px;
  display: flex;
  justify-content: flex-start;
}
.aidc-3d-helper-btn {
  background: rgba(255, 46, 166, 0.10);
  color: #ff7de9;
  border: 1px solid rgba(255, 46, 166, 0.32);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  letter-spacing: 0.2px;
}
.aidc-3d-helper-btn:hover {
  background: rgba(255, 46, 166, 0.18);
  border-color: rgba(255, 46, 166, 0.55);
  color: #ffb0e8;
}

/* Slot dragover state */
.aidc-3d-view-slot.is-dragover {
  border-color: #ff2ea6 !important;
  background: rgba(255,46,166,0.08);
  box-shadow: 0 0 0 4px rgba(255,46,166,0.18);
}

@media (max-width: 720px) {
  .aidc-3d-views.aidc-3d-views--extra { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
 * v1.9.3 — slot polish, range slider, big primary button
 * ============================================================ */

/* Brighter slot border (was rgba(255,255,255,0.06) — едва видный) */
.aidc-3d-form .aidc-3d-view-slot {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1.5px dashed rgba(255,255,255,0.22);
  border-radius: 12px;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.aidc-3d-form .aidc-3d-view-slot:hover {
  border-color: #ff7de9;
  background: rgba(255,46,166,0.05);
  box-shadow: 0 0 0 3px rgba(255,46,166,0.12);
}
.aidc-3d-form .aidc-3d-view-slot.has-image {
  border-style: solid;
  border-color: rgba(255,255,255,0.30);
}

/* Главный «3D вид» — крупнее (~280px), one-up grid */
.aidc-3d-views.aidc-3d-views--single {
  grid-template-columns: 1fr;
  max-width: 280px;
}

/* Multi-view extra grid — 3 в ряд, slot покрупнее, чтобы label не перекрывал SVG */
.aidc-3d-views.aidc-3d-views--extra {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 360px;
}

/* SVG view-direction hint — крупнее (60% → 70%, max 80px), чтобы было читаемо */
.aidc-3d-view-placeholder svg {
  width: 70%;
  height: 70%;
  max-width: 80px;
  max-height: 80px;
}

/* Label слота — переносим ниже (под SVG), а не поверх */
.aidc-3d-view-slot .aidc-3d-view-label {
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #f3f6ff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
/* Скрываем label на пустых extra-слотах если он перекрывает иконку — поднимаем выше */
.aidc-3d-views--extra .aidc-3d-view-slot:not(.has-image) .aidc-3d-view-label {
  bottom: 4px;
  background: rgba(0,0,0,0.7);
  font-size: 9.5px;
}

@media (max-width: 720px) {
  .aidc-3d-views.aidc-3d-views--extra { grid-template-columns: repeat(2, 1fr); }
}

/* ─────────── Range slider for face_count ─────────── */
.aidc-3d-slider-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.aidc-3d-slider-label label {
  font-size: 13px;
  font-weight: 500;
  color: #c0c5d4;
}
.aidc-3d-slider-value {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.aidc-3d-slider-addon {
  font-size: 11px;
  font-weight: 600;
  color: #ff7de9;
  letter-spacing: 0.02em;
}
.aidc-3d-slider-box {
  padding: 8px 4px 4px;
}
.aidc-3d-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,46,166,0.45), rgba(106,92,255,0.55));
  outline: none;
  cursor: pointer;
}
.aidc-3d-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7de9, #6a5cff);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(255,46,166,0.5);
  cursor: grab;
  transition: transform .1s;
}
.aidc-3d-slider::-webkit-slider-thumb:hover { transform: scale(1.12); }
.aidc-3d-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.05); }
.aidc-3d-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7de9, #6a5cff);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(255,46,166,0.5);
  cursor: grab;
}
.aidc-3d-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,46,166,0.45), rgba(106,92,255,0.55));
}
