/* 课程细节门禁 · 通用样式（所有子页面共用，勿删） */

#lesson-body[hidden] { display: none !important; }

html.unlocked body { background: #f4f7f9; }

/* ---------- 全屏遮罩 ---------- */
#gate-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(16, 30, 45, .72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
.gate-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid #e2e9ef;
  border-top: 4px solid #1b3a5c;
  border-radius: 10px;
  padding: 30px 32px 26px;
  box-shadow: 0 18px 50px rgba(10, 22, 36, .28);
}
.gate-card .gate-eyebrow {
  font-size: 11.5px; letter-spacing: .18em; font-weight: 700;
  color: #b0803a; margin-bottom: 10px;
}
.gate-card h1 { margin: 0 0 8px; font-size: 22px; color: #1b3a5c; }
.gate-card .gate-sub { margin: 0 0 22px; font-size: 13.5px; color: #42566a; line-height: 1.7; }

.gate-lock {
  width: 46px; height: 46px; border-radius: 50%;
  background: #eef3f8; color: #1b3a5c;
  display: grid; place-items: center; font-size: 21px; margin-bottom: 18px;
}

.gate-label { display: block; font-size: 13px; font-weight: 600; color: #42566a; margin-bottom: 8px; }
.gate-row { display: flex; gap: 8px; }
.gate-input {
  flex: 1; min-width: 0; padding: 11px 13px; font-size: 15px;
  border: 1px solid #cfd9e3; border-radius: 6px; outline: none; color: #1c2b3a;
  background: #fcfdfe; font-family: inherit;
}
.gate-input:focus { border-color: #1b3a5c; box-shadow: 0 0 0 3px rgba(27,58,92,.10); }
.gate-btn {
  flex: none; padding: 11px 18px; font-size: 14px; font-weight: 700;
  border: 0; border-radius: 6px; background: #1b3a5c; color: #fff;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.gate-btn:hover { background: #24476b; }

.gate-error {
  min-height: 20px; margin: 10px 0 0; font-size: 13px; color: #a33b3b;
}
.gate-card.shake { animation: gate-shake .32s ease; }
@keyframes gate-shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  50% { transform: translateX(7px); }
  75% { transform: translateX(-4px); }
}

.gate-hint {
  margin: 14px 0 0; padding-top: 14px; border-top: 1px solid #eef2f6;
  font-size: 12px; color: #6e7f90; line-height: 1.65;
}
.gate-remember {
  display: flex; align-items: center; gap: 7px;
  margin: 14px 0 0; font-size: 12.5px; color: #42566a; cursor: pointer;
}
.gate-remember input { accent-color: #1b3a5c; }

.gate-back {
  display: inline-block; margin-top: 18px; font-size: 12.5px;
  color: #24476b; text-decoration: none;
}
.gate-back:hover { text-decoration: underline; }

/* ---------- 解锁后的状态条 / 重新锁定 ---------- */
#gate-status {
  position: sticky; top: 0; z-index: 900;
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: space-between; align-items: center;
  padding: 8px 18px; background: #eaf5ef; border-bottom: 1px solid #c8e5d5;
  font: 600 12.5px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #225c45;
}
#gate-status .gate-status-left { display: flex; align-items: center; gap: 8px; }
#gate-relock {
  border: 1px solid #b7dec7; background: #fff; color: #2c7a5b;
  border-radius: 5px; padding: 3px 11px; font: 600 12px/1.5 inherit;
  cursor: pointer;
}
#gate-relock:hover { background: #2c7a5b; color: #fff; border-color: #2c7a5b; }

/* 打印：未解锁时不出内容，避免空转打印泄露结构 */
@media print {
  #gate-overlay, #gate-status, #gate-relock { display: none !important; }
  #lesson-body[hidden] { display: none !important; }
}
