/* common.css —— 公共样式（移动端优先）| 飞轮 · 数字产品铺 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: #3a332a;
  background: #f7f4ee;
  line-height: 1.7;
}
img { max-width: 100%; }
a { color: #a0622d; }

/* 顶栏 */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: #fff;
  border-bottom: 1px solid #eee6d8;
  position: sticky; top: 0; z-index: 50;
}
.topbar .brand { font-weight: 700; font-size: 14px; color: #a0622d; letter-spacing: 1px; }
.topbar nav { display: flex; gap: 14px; }
.topbar nav a { font-size: 13px; color: #6b6155; text-decoration: none; }
.topbar nav a:active { color: #a0622d; }

/* 页脚 */
.footer { text-align: center; padding: 28px 16px calc(28px + env(safe-area-inset-bottom)); color: #a49a89; background: #f0ebe0; }
.footer p { margin: 4px 0; font-size: 13px; }
.footer .copyright { font-size: 12px; }

/* 按钮 */
.btn {
  display: inline-block; border: none; cursor: pointer;
  background: #a0622d; color: #fff; font-size: 15px;
  padding: 12px 28px; border-radius: 999px; text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: #a0622d; border: 1.5px solid #d8c5ab; }
.btn.block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* 通用容器 */
.container { max-width: 640px; margin: 0 auto; padding: 20px 16px calc(40px + env(safe-area-inset-bottom)); }

/* 表单 */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field label .req { color: #c0503a; margin-left: 2px; }
.field input[type=text], .field textarea {
  width: 100%; border: 1.5px solid #e0d7c6; border-radius: 10px;
  padding: 10px 12px; font-size: 15px; font-family: inherit;
  background: #fff; color: #3a332a; outline: none;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: #a0622d; }

/* Toast */
#toast {
  position: fixed; left: 50%; bottom: 18%; transform: translateX(-50%);
  background: rgba(40,34,26,.88); color: #fff; font-size: 14px;
  padding: 10px 20px; border-radius: 999px; z-index: 999;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  max-width: 80vw; text-align: center;
}
#toast.show { opacity: 1; }

@media (min-width: 768px) {
  html { font-size: 17px; }
}
