/* ============================================================
 * AI 3D 预演 · 只在 #/ai3d 页面用到，跟三套主题共用变量
 * ============================================================ */
.a3-input-card { margin-bottom: 14px; }
.a3-text { width: 100%; resize: vertical; line-height: 1.65; font-size: 14px; }
.a3-input-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.a3-input-row .dim { font-size: 12px; }

.a3-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 244px;
  gap: 14px;
  align-items: start;
}
.a3-left, .a3-right, .a3-main { min-width: 0; }
.a3-left, .a3-right { display: flex; flex-direction: column; gap: 14px; }
.a3-card { padding: 12px; }
.a3-card .card-title { margin-bottom: 10px; }
.a3-card .form-row { margin-bottom: 9px; }
.a3-card .form-row label { font-size: 12px; color: var(--dim); }
.a3-card .scrub { width: 100%; }

/* 走位俯视图 */
.a3-map-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin: 12px 0 6px; font-size: 12px; font-weight: 600; }
.a3-map-head .dim { font-weight: 400; font-size: 10px; }
.a3-map {
  display: block; width: 100%; height: 196px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--input-bg); cursor: crosshair; touch-action: none;
}
.a3-walk-btns { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0 10px; }
.a3-walk-btns .btn-xs { font-size: 11px; padding: 5px 11px; gap: 4px; white-space: nowrap; }
.a3-check { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--dim); margin-top: 8px; cursor: pointer; }

/* 3D 舞台 */
.a3-stage-card { padding: 10px; margin-bottom: 14px; }
.a3-stage-top { display: flex; align-items: center; gap: 10px; padding: 2px 4px 10px; font-size: 12px; }
.a3-stage-top .mono { font-size: 13px; font-weight: 700; color: var(--acc); }
.a3-stage-wrap { display: block; }
.a3-stage-wrap.a3-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a3-stage-box {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.a3-stage-box canvas { display: block; width: 100%; height: 100%; }
.a3-stage-box[hidden] { display: none !important; }
.a3-stage-label {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border: 1px solid var(--border); color: var(--text);
  pointer-events: none;
}
.a3-controls { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 11px 4px 2px; }
.a3-scrub { flex: 1 1 180px; min-width: 120px; }
.a3-rate { width: 72px; flex: none; }
.a3-desc-card { padding: 12px; }
.a3-prompt { width: 100%; resize: vertical; line-height: 1.6; font-size: 12.5px; }
.a3-desc-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.a3-sel { width: auto; min-width: 90px; }

/* Take 列表 */
.a3-takes-card { max-height: calc(100vh - 150px); display: flex; flex-direction: column; }
.a3-hint { font-size: 11.5px; line-height: 1.6; margin: 0 0 10px; }
.a3-take-list { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }
.a3-take {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px; background: var(--panel2);
}
.a3-take.on { border-color: var(--acc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 22%, transparent); }
.a3-take.cmp { border-color: var(--ok); }
.a3-take-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 12.5px; }
.a3-take-top .dim { font-size: 10px; }
.a3-take-meta { font-size: 10.5px; line-height: 1.5; margin: 4px 0 7px; }
.a3-take-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.a3-take-btns .btn-xs { font-size: 10.5px; padding: 4px 10px; gap: 4px; white-space: nowrap; }
.a3-exit { margin-top: 10px; }

.a3-help p { font-size: 13px; line-height: 1.8; margin: 0 0 10px; }
.a3-help b { color: var(--acc); }

@media (max-width: 1240px) {
  .a3-layout { grid-template-columns: 250px minmax(0, 1fr); }
  .a3-right { grid-column: 1 / -1; }
  .a3-takes-card { max-height: 320px; }
}
@media (max-width: 860px) {
  .a3-layout { grid-template-columns: minmax(0, 1fr); }
  .a3-right { grid-column: auto; }
  .a3-map { height: 230px; }
  .a3-stage-wrap.a3-split { grid-template-columns: 1fr; }
}
body.fx-off .a3-stage-box, body.fx-off .a3-take { transition: none; }
