/* GESP 站点 · 登录态与打卡同步（由 build.mjs 注入到页面） */
.gesp-logo {
  height: 30px;
  width: auto;
  display: block;
  margin-right: 10px;
  flex: 0 0 auto;
}

.gesp-brand-logo {
  height: 26px;
  width: auto;
  vertical-align: -5px;
  margin-right: 8px;
}

.gesp-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}

.gesp-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  font-size: 12px;
  line-height: 1.6;
  color: #475569;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.gesp-user:hover {
  border-color: #4f46e5;
  color: #4f46e5;
}

.gesp-user .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.gesp-user.ok .dot {
  background: #16a34a;
}

.gesp-user.syncing .dot {
  background: #f59e0b;
}

.gesp-user.err .dot {
  background: #dc2626;
}

.gesp-user b {
  font-weight: 600;
}

/* 编程题挑战入口（闯关页总览按钮旁） */
.btn-problems {
  display: inline-block;
  margin-left: 10px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 2px solid #4f46e5;
  background: #eef0ff;
  color: #4f46e5;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  transition: all 0.16s;
  vertical-align: middle;
}

.btn-problems:hover {
  background: #4f46e5;
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .btn-problems {
    display: block;
    margin: 10px 0 0;
    text-align: center;
  }
}

/* 未登录遮罩：参考纸质题解风格 */
.gesp-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 249, 236, 0.97);
  backdrop-filter: blur(2px);
}

.gesp-gate-card {
  width: 100%;
  max-width: 420px;
  background: #fffdf5;
  border: 2px solid #9e8b6b;
  border-radius: 18px;
  box-shadow: 6px 6px 0 rgba(158, 139, 107, 0.25);
  padding: 34px 28px 28px;
  text-align: center;
  color: #1a1208;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.gesp-gate-card img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  margin-bottom: 14px;
}

.gesp-gate-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.gesp-gate-sub {
  font-size: 14px;
  line-height: 1.8;
  color: #4a3a24;
  margin-bottom: 20px;
}

.gesp-gate-btn {
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 18px;
  border-radius: 12px;
  border: 2px dashed #b8391e;
  background: rgba(184, 57, 30, 0.06);
  color: #b8391e;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s;
}

.gesp-gate-btn:hover {
  background: #b8391e;
  color: #fff;
  border-style: solid;
}

.gesp-gate-tip {
  margin-top: 14px;
  font-size: 12px;
  color: #7a6a52;
  line-height: 1.7;
}

/* 首页打卡入口区 */
.runs {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 20px 10px;
}

.runs-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.runs-title {
  font-size: 22px;
  font-weight: 800;
  color: #1a1208;
}

.runs-sub {
  font-size: 13px;
  color: #7a6a52;
}

.run-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.run-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 2px solid #9e8b6b;
  border-radius: 14px;
  background: #fffdf5;
  box-shadow: 3px 3px 0 rgba(158, 139, 107, 0.2);
  text-decoration: none;
  color: #1a1208;
  transition: all 0.2s;
}

.run-card:hover {
  border-color: #b8391e;
  color: #b8391e;
  transform: translateY(-2px);
}

.run-num {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 11px;
  background: #b8391e;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.run-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.run-meta {
  display: block;
  font-size: 12px;
  color: #7a6a52;
}

@media (max-width: 768px) {
  .gesp-gate-card {
    padding: 26px 18px 22px;
  }

  .gesp-tools .gesp-user {
    max-width: 150px;
  }
}
