/* 记忆卡片 · 苹果式简约大气（移动端优先，大留白、黑白灰骨架、克制蓝色点缀） */
:root {
  color-scheme: light;
  --ink: #1d1d1f; --muted: #86868b; --line: #e8e8ed; --brand: #0071e3;
  --brand-soft: #e8f2fd; --bg: #f5f5f7; --card: #fff; --danger: #d70015;
  --ok: #1d9e4b; --warn: #b7791f; --radius: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
header.top { background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-inner { max-width: 960px; margin: 0 auto; padding: 12px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.brand { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
nav.main { display: flex; gap: 4px; flex-wrap: wrap; }
nav.main a { color: var(--ink); font-size: 15px; padding: 6px 10px; border-radius: 999px; }
nav.main a:hover { text-decoration: none; background: #f0f0f2; }
nav.main a.active { background: var(--ink); color: #fff; }
.top-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.lang-btn { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.me-line { font-size: 13px; color: var(--muted); }
main { max-width: 960px; margin: 0 auto; padding: 24px 20px 80px; }
.hero { padding: 28px 4px 8px; }
.hero h1 { font-size: clamp(32px, 7vw, 56px); line-height: 1.15; letter-spacing: -.03em; margin: 0 0 8px; font-weight: 700; }
.hero p { font-size: 17px; color: var(--muted); margin: 0 0 16px; max-width: 640px; }
h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 4px; }
h3 { font-size: 18px; margin: 0 0 6px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.deck { cursor: default; display: flex; flex-direction: column; gap: 8px; }
.deck .cover { height: 8px; border-radius: 999px; background: var(--brand); }
.deck h3 { margin: 0; font-size: 19px; }
.deck .nums { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.deck .nums b { font-size: 20px; display: block; }
.deck .nums span { color: var(--muted); font-size: 12px; }
.deck .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
button { background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px; cursor: pointer; font-size: 15px; font-weight: 600; }
button:hover { opacity: .88; }
button:disabled { opacity: .45; cursor: default; }
button.secondary { background: #f0f0f2; color: var(--ink); }
button.ghost { background: transparent; color: var(--brand); padding: 10px 12px; }
button.danger { background: var(--danger); }
input, textarea, select { width: 100%; padding: 12px 14px; border: 1px solid #d2d2d7; border-radius: 12px; font-size: 16px; margin: 6px 0 12px; background: #fff; color: var(--ink); font-family: inherit; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
label { font-size: 14px; font-weight: 600; display: block; margin-top: 4px; }
.flash { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: clamp(22px, 5vw, 30px); font-weight: 600; text-align: center; padding: 32px 20px; line-height: 1.4; }
.flash .hint { font-size: 15px; font-weight: 400; color: var(--muted); margin-top: 12px; }
.grade-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.grade-row button { flex: 1; min-width: 72px; border-radius: 14px; padding: 14px 8px; }
.grade-again { background: #d70015; } .grade-hard { background: #c93400; }
.grade-good { background: #1d9e4b; } .grade-easy { background: #0071e3; }
.progress { height: 8px; background: #ececf0; border-radius: 999px; overflow: hidden; margin: 10px 0; }
.progress > i { display: block; height: 100%; background: var(--brand); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: #0b57d0; font-size: 12px; font-weight: 600; }
.badge.gray { background: #f0f0f2; color: var(--muted); }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.bad { background: #fee2e2; color: #991b1b; }
.badge.ok { background: #dcfce7; color: #166534; }
.notice { border-radius: 14px; padding: 14px 16px; margin: 12px 0; font-size: 15px; background: var(--brand-soft); color: #0b3d91; }
.notice.warn { background: #fef3c7; color: #713f12; }
.notice.error { background: #fee2e2; color: #7f1d1d; }
.notice.ok { background: #dcfce7; color: #14532d; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.price { text-align: left; }
.price .amount { font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.price ul { margin: 10px 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.price.featured { border: 2px solid var(--brand); }
canvas { width: 100%; height: 220px; display: block; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tabs button { border-radius: 999px; }
.tabs button[aria-selected="true"] { background: var(--ink); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 auto; }
.row button, .row .lang-btn { flex: 0 0 auto; }
footer { max-width: 960px; margin: 0 auto; padding: 0 20px 40px; color: var(--muted); font-size: 13px; }
img.preview { max-width: 100%; border-radius: 12px; margin: 8px 0; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.kv b { font-size: 28px; display: block; letter-spacing: -.02em; }
.kv span { color: var(--muted); font-size: 13px; }
@media (max-width: 560px) {
  main { padding: 16px 14px 64px; }
  .card { padding: 16px; }
  .grade-row button { min-width: 64px; padding: 12px 4px; font-size: 14px; }
}
