/* 爱玩豆 · 基础样式与设计变量 */
:root {
  --green: #1DB58C;
  --green-dark: #149B77;
  --green-deep: #0E7C5F;
  --green-soft: #E4F5EF;
  --green-tint: #F2FBF7;
  --ink: #16241E;
  --ink-2: #3D4F47;
  --muted: #7C8C84;
  --line: #E3EAE6;
  --bg: #F6F8F7;
  --card: #FFFFFF;
  --amber: #F4B740;
  --shadow-sm: 0 1px 2px rgba(22, 36, 30, .05), 0 4px 14px rgba(22, 36, 30, .05);
  --shadow-md: 0 10px 30px rgba(22, 36, 30, .08);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--card);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
::selection { background: var(--green-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 12px;
  font-size: 15px; font-weight: 600; letter-spacing: .2px;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(29, 181, 140, .25); }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: #CFDDD6; background: #FBFDFC; }
.btn-soft { background: var(--green-soft); color: var(--green-deep); }
.btn-soft:hover { background: #D8F0E8; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-deep);
  font-size: 12.5px; font-weight: 600;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #2FD3A4, #12A981);
  display: grid; place-items: center; color: #fff; flex: none;
  box-shadow: 0 4px 12px rgba(29, 181, 140, .3);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.row { display: flex; align-items: center; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #D6E0DA; border-radius: 8px; border: 2px solid #fff; }
::-webkit-scrollbar-thumb:hover { background: #C2CFC8; }
::-webkit-scrollbar-track { background: transparent; }

/* 通用弹层 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 28, 23, .45);
  display: none; align-items: center; justify-content: center; z-index: 90;
  backdrop-filter: blur(3px); padding: 20px;
}
.modal-mask.on { display: flex; }
.modal {
  background: #fff; border-radius: 20px; box-shadow: var(--shadow-md);
  width: min(720px, 100%); max-height: 88vh; overflow: auto;
  animation: pop .16s ease;
}
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 12px;
}
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 700; }
.modal-body { padding: 0 22px 22px; }
.x-btn {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  color: var(--muted); font-size: 18px;
}
.x-btn:hover { background: var(--bg); color: var(--ink); }
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, select.input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; outline: none;
}
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(29, 181, 140, .12); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.switch input { width: 16px; height: 16px; accent-color: var(--green); }

/* 原生 hidden 优先于组件 display */
[hidden] { display: none !important; }
