/* =============================================================
   嵌入版覆盖样式（只用于 output/thousand-town 的副本）
   源项目 /Users/pika/fsf/project/thousand-town-main 未做任何修改
   1) 隐藏三个外部入口
   2) 整页固定，去掉纵向滚动条
   3) 左侧参数栏改成按钮唤起的居中弹窗
   ============================================================= */

/* ---------- 1. 隐藏「返回作品集 / 平面图集 / 无人机图库」 ---------- */
.version-nav { display: none; }

/* ---------- 2. 顶部「参数设置」按钮 ---------- */
.settings-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 15px;
  border: 1px solid #c4d3de;
  border-radius: 999px;
  background: #fbfdff;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .07em;
  white-space: nowrap;
}
.settings-trigger:hover { background: #e6f1f6; border-color: #9ab8c9; }
.settings-trigger svg { flex: 0 0 auto; }

/* ---------- 3. 视口固定：整页不出现滚动条 ---------- */
html, body { height: 100%; overflow: hidden; }
body { position: relative; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  height: calc(100svh - 65px);
  min-height: 0;
  padding: 14px 22px 10px;
  overflow: hidden;
}
.scene-panel {
  height: 100%;
  min-height: 0;
  align-self: stretch;
  position: static !important; /* 覆盖 desktop 的 sticky */
  top: auto;
}
.scene-header { flex: 0 0 auto; }
.model-frame { flex: 1 1 auto; min-height: 0; }
#stage { height: 100%; min-height: 0; }
.playback-bar { flex: 0 0 auto; }
.scene-footer { flex: 0 0 auto; }

/* ---------- 4. 左侧栏 → 居中弹窗 ---------- */
.controls {
  position: fixed;
  z-index: 60;
  top: 50%;
  left: 50%;
  width: min(720px, calc(100vw - 44px));
  height: auto !important;          /* 覆盖 min-width:1000px 里的固定高度 */
  max-height: min(86svh, 780px);
  margin: 0;
  padding: 24px 26px 22px;
  transform: translate(-50%, -50%);
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(20, 41, 56, .28);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  display: none;
}
body.settings-open .controls { display: block; }

.controls-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(19, 37, 51, .38);
  backdrop-filter: blur(3px);
}
.controls-backdrop[hidden] { display: none; }

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -4px 0 18px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.settings-title {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
}
.settings-close {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f4f8fa;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
.settings-close:hover { background: #e6f1f6; color: var(--ink); }

/* 弹窗内不必再给右侧留滚动条空隙 */
.controls .control-section:first-of-type { margin-top: 18px; }
.controls .sidebar-actions { margin-bottom: 4px; }

/* ---------- 5. 窄屏适配 ---------- */
@media (max-width: 760px) {
  .workspace {
    height: calc(100svh - 57px);
    padding: 10px 12px 8px;
  }
  .controls {
    width: calc(100vw - 26px);
    max-height: 88svh;
    padding: 22px 18px 18px;
  }
  .scene-footer { display: none; }
  .settings-trigger { padding: 0 11px; font-size: 10px; }
}
