/* 专家模式 · 个性化页
   这是独立的最终布局层，避免旧样式再参与专家模式排版。 */
@media (min-width:721px) {
  /* 轨迹页始终保留左右两个窗口：左侧预览，右侧卫星图。 */
  .mode-pro:has(.step-panel[data-panel="track"].active) .split-stage {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  }
  .mode-pro:has(.step-panel[data-panel="track"].active) .map-pane { display:block !important; }
  .mode-pro:has(.step-panel[data-panel="track"].active) #mapTiles,
  .mode-pro:has(.step-panel[data-panel="track"].active) .map-overlay { display:block !important; }
  .mode-pro:has(.step-panel[data-panel="track"].active) #composeAside { display:none !important; }

  body:is(.mode-normal,.mode-pro):has(.step-panel[data-panel="compose"].active) #composeAside { display:block !important; padding:16px !important; overflow:hidden !important; }
  body:is(.mode-normal,.mode-pro) #personalizationSections {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:auto auto auto;
    gap:12px;
    align-content:start;
    height:100%;
  }
  body:is(.mode-normal,.mode-pro) #personalizationSections[hidden] { display:none !important; }
  body:is(.mode-normal,.mode-pro) .personal-section,
  body:is(.mode-normal,.mode-pro) .personal-export-section { min-width:0; border:1px solid #d7e1d9; border-radius:12px; background:#fafcf9; }
  body:is(.mode-normal,.mode-pro) .personal-section { padding:0 12px 12px; }
  body:is(.mode-normal,.mode-pro) .personal-section summary { display:flex; align-items:center; gap:8px; padding:10px 0; color:#365a44; font-size:12px; font-weight:900; cursor:pointer; list-style:none; }
  body:is(.mode-normal,.mode-pro) .personal-section summary::-webkit-details-marker { display:none; }
  body:is(.mode-normal,.mode-pro) .personal-section summary::before { content:'▸'; color:#5d7768; font-size:11px; transition:transform .16s ease; }
  body:is(.mode-normal,.mode-pro) .personal-section[open] summary::before { transform:rotate(90deg); }
  body:is(.mode-normal,.mode-pro) .personal-section summary span { display:grid; width:19px; height:19px; place-items:center; border-radius:6px; color:#fff; background:var(--green); font-size:8px; }
  body:is(.mode-normal,.mode-pro) .personal-section-content { display:grid; gap:10px; min-width:0; }
  body:is(.mode-normal,.mode-pro) .personal-section-content > * { min-width:0; margin:0; }

  body:is(.mode-normal,.mode-pro) #shapeRouteSection { grid-column:1; grid-row:1; }
  body:is(.mode-normal,.mode-pro) #copySection { grid-column:2; grid-row:1; }
  .mode-pro #terrainSection { grid-column:1; grid-row:2; }
  .mode-pro #baseSection { grid-column:2; grid-row:2; }
  body:is(.mode-normal,.mode-pro) #exportSection { grid-column:1/-1; grid-row:3; }

  body:is(.mode-normal,.mode-pro) #composeAside .compose-layout { display:block; }
  body:is(.mode-normal,.mode-pro) #composeAside .shape-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  body:is(.mode-normal,.mode-pro) #composeAside .shape-option { height:66px; }
  body:is(.mode-normal,.mode-pro) #composeAside .template-picker { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:8px !important; }
  body:is(.mode-normal,.mode-pro) #composeAside .template-option { min-height:46px; padding:7px; }
  body:is(.mode-normal,.mode-pro) #composeAside .template-option small { display:none; }
  body:is(.mode-normal,.mode-pro) #composeAside .route-visibility-control { min-height:40px; padding:8px 10px; }
  body:is(.mode-normal,.mode-pro) #composeAside .route-visibility-control small { display:none; }
  body:is(.mode-normal,.mode-pro) #composeAside .edge-copy-editor { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:9px 12px !important; }
  body:is(.mode-normal,.mode-pro) #composeAside .edge-field input { height:34px; padding-right:52px; }
  body:is(.mode-normal,.mode-pro) #composeAside .inline-status { display:none; }

  .mode-pro #composeAside .pro-panel { height:auto !important; max-height:none !important; padding:0 10px 10px; border:0; border-radius:0; background:transparent; overflow:visible !important; }
  .mode-pro #composeAside .pro-panel summary { display:none; }
  .mode-pro #composeAside .pro-panel .parameter-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:10px !important; }
  .mode-pro #composeAside .pro-panel .parameter-grid > * { min-width:0; overflow-wrap:anywhere; }
  .mode-pro #composeAside .pro-panel input,
  .mode-pro #composeAside .pro-panel select { min-width:0; }
  .mode-pro #composeAside .measurements { margin-top:10px; gap:8px; }
  .mode-pro #composeAside .measurements div { min-width:0; padding-left:8px; }

  body:is(.mode-normal,.mode-pro) #exportSection .finish-layout { display:block; }
  body:is(.mode-normal,.mode-pro) #exportSection .render-summary,
  body:is(.mode-normal,.mode-pro) #exportSection .quality-checks,
  body:is(.mode-normal,.mode-pro) #exportSection .render-callout { display:none !important; }
  body:is(.mode-normal,.mode-pro) #exportSection .actions { display:grid !important; grid-template-columns:1fr; gap:0; margin:0; }
  body:is(.mode-normal,.mode-pro) #exportSection .actions .primary-button { width:100%; min-height:42px; }
}
