:root {
  --bg: #faf7f2;
  --bg-card: #ffffff;
  --ink: #2b2724;
  --ink-soft: #6b625a;
  --ink-mute: #a8a098;
  --line: #ece7df;
  --pink: #e8c8c4;
  --pink-deep: #c89a96;
  --blue: #c8d6dc;
  --blue-deep: #8fa6ad;
  --mint: #cfe0d2;
  --mint-deep: #8fb39a;
  --sand: #ead8c0;
  --primary: #b58d80;
  --primary-deep: #8f6a5e;
  --shadow-sm: 0 2px 8px rgba(60,40,30,0.05);
  --shadow-md: 0 6px 22px rgba(60,40,30,0.08);
  --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: 40px;
}
a { color: var(--ink-soft); text-decoration: none; }

.site-header {
  text-align: center;
  padding: 36px 20px 20px;
}
.site-title {
  font-size: 26px;
  margin: 0;
  letter-spacing: 4px;
  font-weight: 600;
  color: var(--ink);
}
.site-slogan {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 1px;
}

.container { padding: 8px 16px 24px; max-width: 720px; margin: 0 auto; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.test-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 14px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 178px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}
.test-card .tag {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-soft);
  margin-bottom: 8px;
  width: fit-content;
}
.test-card .name {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
  line-height: 1.35;
}
.test-card .desc {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0 0 12px;
  flex: 1;
  line-height: 1.5;
}
.test-card .start {
  align-self: flex-start;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.test-card .start:active { transform: scale(0.97); }
.test-card .resume-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #c8784A;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.test-card.theme-1 { background: linear-gradient(160deg,#f7e8e6 0%, #fff 70%); }
.test-card.theme-2 { background: linear-gradient(160deg,#e6eef0 0%, #fff 70%); }
.test-card.theme-3 { background: linear-gradient(160deg,#e8f0e8 0%, #fff 70%); }
.test-card.theme-4 { background: linear-gradient(160deg,#f4ead7 0%, #fff 70%); }
.test-card.theme-5 { background: linear-gradient(160deg,#efe6ee 0%, #fff 70%); }

.site-footer {
  text-align: center;
  font-size: 12px;
  color: var(--ink-mute);
  padding: 28px 16px 8px;
}
.site-footer a { color: var(--ink-mute); }
.site-footer .dot { margin: 0 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-deep); }
.btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 22px; font-size: 15px; font-weight: 600; }

.modal-mask {
  position: fixed; inset: 0;
  background: rgba(40,30,25,0.45);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .2s ease;
}
.modal-mask[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: #fff;
  width: 100%;
  max-width: 360px;
  border-radius: 20px;
  padding: 24px 20px;
  position: relative;
  box-shadow: var(--shadow-md);
}
.modal-card h3 { margin: 0 0 10px; font-size: 17px; }
.modal-card p { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; }

.close-x {
  position: absolute;
  top: 10px; right: 12px;
  background: none; border: none;
  font-size: 24px; line-height: 1;
  color: var(--ink-mute);
  cursor: pointer;
}
.close-x.light { color: #fff; top: -36px; right: 0; }

.resume-actions {
  display: flex; gap: 10px;
}
.resume-actions .btn { flex: 1; }

.community {
  margin: 24px 0 8px;
  animation: fadeIn .3s ease;
}
.community-card {
  background: linear-gradient(135deg, #e8f0e8, #f7e8e6);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.community-emoji { font-size: 32px; }
.community-text { flex: 1; }
.community-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.community-sub { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.community-btn { padding: 7px 14px !important; font-size: 12px; background: rgba(255,255,255,0.7) !important; }

@media (max-width: 360px) {
  .site-title { font-size: 22px; letter-spacing: 3px; }
  .test-card { min-height: 168px; padding: 14px 12px 12px; }
  .test-card .name { font-size: 14px; }
  .modal-card { padding: 20px 16px; }
}

.modal-mask { padding: 16px; }
