/* ============================================================
   layout.css — 顶栏 / 主区域 / 左右分栏骨架
   ============================================================ */

header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  transition: background var(--speed), border-color var(--speed);
}

header h1 {
  font-size: 16px;
  font-weight: 600;
}

header .subtitle {
  font-size: 11px;
  color: var(--muted);
}

main {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* 左侧：手柄画布 */
.pad-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 16px;
  min-width: 0;
}

/* 右侧：控制面板 */
.side {
  width: var(--side-width);
  flex: 0 0 var(--side-width);
  border-left: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: background var(--speed), border-color var(--speed);
}

/* 窄屏：面板改为下方堆叠 */
@media (max-width: 860px) {
  main {
    flex-direction: column;
  }

  .side {
    width: auto;
    flex: 1 1 auto;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}
