/* base.css - Web/H5 基础适配层
 * 小程序 rpx 换算: 750rpx = 100vw, 这里 1rem = 100rpx
 * 即 html { font-size: 13.3333vw } -> 375px 宽屏下 1rem = 50px, 1rpx = 0.5px
 * 桌面端 (>=500px) 锁定 rem, 界面保持 7.5rem (500px) 宽居中, 模拟手机视窗
 */

html {
  font-size: 13.3333vw;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (min-width: 500px) {
  html { font-size: 66.6667px; }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: #EFF0F4;
  font-size: 0.28rem;
  overscroll-behavior-y: none;
}

img { max-width: 100%; }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  outline: none;
  border: none;
  background: none;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}

button[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

input {
  font-family: inherit;
  outline: none;
  border: none;
  background: transparent;
  font-size: 0.28rem;
  color: var(--color-text, #1C1C1E);
}

input::placeholder { color: #C7C7CC; }

/* ===== 应用外壳 (手机视窗模拟) ===== */
.app-shell {
  position: relative;
  width: 100%;
  max-width: 7.5rem;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--color-bg, #F5F6FA);
  overflow-x: hidden;
}

@media (min-width: 500px) {
  .app-shell {
    box-shadow: 0 0 0.4rem rgba(0, 0, 0, 0.12);
    min-height: 100vh;
  }
}

/* ===== 导航栏 (替代小程序 navigationBar) ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 0.88rem;
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  background: #007AFF;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-title {
  margin: 0;
  font-size: 0.34rem;
  font-weight: 600;
  letter-spacing: 0.01rem;
}

.navbar-back {
  position: absolute;
  left: 0.16rem;
  top: env(safe-area-inset-top);
  height: 0.88rem;
  display: flex;
  align-items: center;
  padding: 0 0.16rem;
  color: #FFFFFF;
  font-size: 0.4rem;
  line-height: 1;
  background: none;
  border: none;
}

/* ===== 页面容器 ===== */
.page-root {
  min-height: calc(100vh - 0.88rem);
}

.page-root.has-tabbar {
  padding-bottom: calc(1.1rem + env(safe-area-inset-bottom));
}

.page {
  min-height: 100%;
}

/* 隐藏滚动条 */
::-webkit-scrollbar { width: 0; height: 0; }
