/* 桌面端：390px 手机画布 + 深色舞台（对齐 Stitch 展示稿）；移动端全宽 */
html { background: #070B14; }
body {
  background: radial-gradient(circle at 50% 0%, #1E293B 0%, #0F172A 45%, #070B14 100%);
}
body::-webkit-scrollbar { width: 8px; }
body::-webkit-scrollbar-track { background: transparent; }
body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 4px; }

#app {
  max-width: 390px;
  margin: 36px auto;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 35px 80px -15px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .1);
}

@media (min-width: 521px) {
  .tabbar, .bottombar, .home .bottom-tabbar, .home .action-dock { max-width: 390px; }

  /* 让首页系列成为固定高度的“手机”，内部滚动，底栏贴在画布底部 */
  #app:has(.home) {
    height: calc(100vh - 72px);
    min-height: 640px;
    overflow: hidden;
    border: 8px solid #1E293B;
    border-radius: 44px;
  }
  #app:has(.home) .home {
    height: 100%;
    min-height: 0;
  }
  #app:has(.home) .home .screen {
    flex: 1;
    overflow-y: auto;
  }
  #app:has(.home) .home .bottom-tabbar,
  #app:has(.home) .home .action-dock {
    position: absolute;
    left: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 520px) {
  body { background: #F8FAFC; }
  #app {
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }
}
