/* 基础样式（无框架，移动端友好） */
* { box-sizing: border-box; }
:root {
  --bg1: #eef2ff;
  --bg2: #f0f9ff;
  --bg3: #fff1f2;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e5e7eb;
  --primary: #059669;
  --primary-weak: #86efac;
  --dark: #0f172a;
  --light: #f1f5f9;
}
html, body { margin:0; padding:0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'PingFang SC','Noto Sans SC','Microsoft Yahei', sans-serif; color:var(--text); }
body { background: linear-gradient(135deg, var(--bg1), var(--bg2), var(--bg3)); min-height: 100vh; }
.app { max-width: 720px; margin: 0 auto; padding: 16px; }
.header { display:flex; align-items:center; justify-content:space-between; }
h1 { margin:0; font-size: 20px; font-weight: 800; }
h2 { margin:0; font-size: 16px; font-weight: 700; }
.title { font-weight: 600; }
.big { font-size: 28px; font-weight: 800; }
.mid { font-size: 18px; font-weight: 700; }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.muted { color: var(--muted); }
.green { color: #059669; }
.strong { font-weight: 700; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.text-right { text-align: right; }
.center { text-align: center; }
.row { display:flex; align-items:center; }
.col { display:flex; flex-direction: column; }
.gap { gap: 12px; }
.top { align-items: flex-start; }
.space-between { justify-content: space-between; }

.card { background:#fff; border:1px solid var(--border); border-radius: 16px; padding: 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }

.btn { border: none; border-radius: 12px; padding: 10px 14px; font-weight: 700; cursor: pointer; }
.btn.block { width: 100%; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary[disabled] { background: #cbd5e1; cursor: not-allowed; }
.btn.light { background: var(--light); color: var(--text); }
.btn.dark { background: var(--dark); color: #fff; }

.input { border:1px solid var(--border); padding:10px 12px; border-radius: 8px; }
.small-input { width: 100px; }

.badge { padding: 4px 8px; border-radius: 999px; background: var(--light); color: var(--muted); font-size: 12px; }

.list { margin: 6px 0 0; padding-left: 18px; }
.history { margin-top: 10px; }

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display:flex; align-items:center; justify-content:center; z-index: 100; }
.modal { width: 92%; max-width: 360px; background:#fff; border-radius: 16px; padding: 18px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.modal h3{ margin: 8px 0; font-size: 20px; }
.trophy { font-size: 40px; animation: bounce 1s infinite; }
@keyframes bounce { 0%,100%{ transform: translateY(-10%);} 50%{ transform: translateY(0);} }

.confetti { position: fixed; inset: 0; display:flex; align-items:center; justify-content:center; font-size: 64px; animation: pop 1s ease; z-index: 101; pointer-events:none; }
@keyframes pop { 0%{ transform: scale(0); opacity: 0;} 60%{ transform: scale(1); opacity:1;} 100%{ transform: scale(0.9); opacity:0;} }

.row.center { align-items: center; }
