/* ══════════════════════════════════════════════════════════════════════════════
   MÀN HƯỚNG DẪN GIỮA NỀN TRẮNG — 18/09/2026
   ──────────────────────────────────────────────────────────────────────────────
   Boss giao: *"ở các công cụ khác nhau khi công cụ chưa mở hoặc thêm thông tin gì
   màn hình còn trắng trong thì ở giữa màn hình sẽ có hướng dẫn và ko cần hiện cái
   bảng lên trước đâu… làm y hệt của 21st dev"*.

   Bản mẫu: 21st.dev @jatin-yadav05/project-showcase (id 9607). Số đo lấy THẲNG từ
   mã gốc, không phỏng đoán:
     · khung  max-w-2xl = 672px, lề trong 24px, trên/dưới 64px
     · mỗi dòng  py-5 = 20px trên/dưới, viền trên 1px
     · tên dòng  18px / 500 / letter-spacing -0.025em
     · mô tả     14px, cách tên 4px
     · ảnh nổi   280×180, bo 12px, lệch con trỏ +20px ngang / −100px dọc
     · lerp      0.15 mỗi khung hình
     · ảnh đổi   500ms, scale 1.1→1, blur(10px)→none
     · dòng sáng 300ms, nền mờ, bo 8px, scale .95→1

   ⛔ BỐN HIỆU ỨNG CÙNG LÚC — Boss chọn đủ cả bốn ngày 18/09: gạch chân chạy · nền
      dòng sáng · mũi tên trượt vào · chữ đậm màu lên. Gỡ bớt cái nào là lệch bản
      mẫu Boss đã duyệt.
   ⛔ MŨI TÊN LÀ NGOẠI LỆ DUY NHẤT của luật "không thêm icon nào" — Boss đã đọc
      cảnh báo ấy ngay trong ô chọn và vẫn chọn. Đừng thêm icon thứ hai.
   ══════════════════════════════════════════════════════════════════════════════ */

.hd-khoi {
  /* 672px = max-w-2xl của bản mẫu. Boss chốt giữ đúng số này. */
  max-width: 672px;
  margin: 0 auto;
  /* ⛔ 80px TRÊN, không phải căn giữa theo chiều dọc — Boss chọn "giữa ngang, cách
     thanh công cụ một khoảng". Căn giữa cả chiều dọc thì ở màn cao khối tụt sâu
     xuống, trông hụt hẳn so với thanh công cụ. */
  padding: 80px 24px 64px;
  box-sizing: border-box;
  position: relative;
}
@media (max-width: 720px) {
  /* ⛔ ĐỆM ĐÁY 120px — điện thoại có thanh đáy cố định (Trang chủ · Danh sách
     lớp · Công việc · Lịch giáo viên) cao ~80px. Để 40px thì bước cuối bị thanh đáy
     nuốt mất nửa dòng — đã chụp ở 390×844 và thấy rõ. */
  .hd-khoi { padding: 32px 16px 120px; }
}

/* ── đầu khối: tên công cụ + một câu nó làm gì ─────────────────────────────── */
.hd-ten {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--chu);
}
.hd-mo-ta {
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--mo);
  max-width: 60ch;
  /* ⛔ `pretty` để không rớt một chữ lẻ xuống dòng cuối — đã chụp và thấy chữ
     "em." đứng trơ một mình. */
  text-wrap: pretty;
}

/* ── danh sách bước ────────────────────────────────────────────────────────── */
.hd-ds { position: relative; }
/* Viền dưới cho mục cuối — bản mẫu để một <div> trơn, ở đây làm bằng viền dưới
   của chính danh sách cho khỏi đẻ thêm thẻ rỗng. */
.hd-ds { border-bottom: 1px solid var(--vien); }

.hd-buoc {
  display: block;
  position: relative;
  padding: 20px 0;
  border-top: 1px solid var(--vien);
  cursor: pointer;
  /* ⛔ Đây là <button>, phải gỡ hết nếp mặc định của nút. */
  width: 100%;
  background: transparent;
  border-left: 0; border-right: 0; border-bottom: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

/* ① nền dòng sáng lên nhẹ — vẽ bằng ::before để không đụng vào bố cục */
.hd-buoc::before {
  content: "";
  position: absolute;
  inset: 0 -16px;
  border-radius: 8px;
  background: var(--nen2);
  opacity: 0;
  transform: scale(.95);
  transition: opacity .3s cubic-bezier(.4, 0, .2, 1), transform .3s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
}
.hd-buoc.hd-dang::before { opacity: 1; transform: scale(1); }

.hd-buoc-trong {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.hd-buoc-trai { flex: 1 1 auto; min-width: 0; }

.hd-buoc-dau {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hd-buoc-ten {
  position: relative;
  display: inline-block;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.35;
  color: var(--chu);
}
/* ② gạch chân chạy từ trái sang phải */
.hd-buoc-ten::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 0;
  background: currentColor;
  transition: width .3s cubic-bezier(.4, 0, .2, 1);
}
.hd-buoc.hd-dang .hd-buoc-ten::after { width: 100%; }

/* ③ mũi tên chéo trượt vào — icon vector theo đúng nếp bộ icon app
   (viewBox 24, stroke-width 1.8, tô bằng currentColor qua mask). */
.hd-mt {
  flex: 0 0 auto;
  width: 16px; height: 16px;
  background-color: currentColor;
  color: var(--mo);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;  mask-position: center;
  -webkit-mask-size: contain;     mask-size: contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7'/%3E%3Cpath d='M8.5 7H17v8.5'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7'/%3E%3Cpath d='M8.5 7H17v8.5'/%3E%3C/svg%3E");
  opacity: 0;
  transform: translate(-8px, 8px);
  transition: opacity .3s cubic-bezier(.4, 0, .2, 1), transform .3s cubic-bezier(.4, 0, .2, 1);
}
.hd-buoc.hd-dang .hd-mt { opacity: 1; transform: translate(0, 0); }

/* ④ chữ mô tả đậm màu lên */
.hd-buoc-y {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--mo);
  text-wrap: pretty;
  transition: color .3s cubic-bezier(.4, 0, .2, 1);
}
.hd-buoc.hd-dang .hd-buoc-y { color: var(--chu); }

/* Nhãn phải — chỗ đặt số thứ tự khi màn nào đó cần thứ tự. Boss chốt 18/09 là
   KHÔNG đánh số, nên mặc định trống; giữ luật để màn sau cần thì có sẵn. */
.hd-buoc-phai {
  flex: 0 0 auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--mo);
  padding-top: 4px;
}

/* ── ảnh nổi bay theo con trỏ (chỉ trên máy tính) ──────────────────────────── */
.hd-anh-bay {
  position: fixed;
  z-index: 99990;
  pointer-events: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .22), 0 3px 10px rgba(0, 0, 0, .10);
  opacity: 0;
  transition: opacity .3s cubic-bezier(.4, 0, .2, 1), scale .3s cubic-bezier(.4, 0, .2, 1);
  scale: .8;
}
.hd-anh-bay.hd-hien { opacity: 1; scale: 1; }
.hd-anh-khung {
  position: relative;
  width: 280px; height: 180px;
  background: var(--nen2);
  border-radius: 12px;
  overflow: hidden;
}
.hd-anh-khung > img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top left;
  opacity: 0;
  scale: 1.1;
  filter: blur(10px);
  transition: opacity .5s ease-out, scale .5s ease-out, filter .5s ease-out;
}
.hd-anh-khung > img.hd-ro { opacity: 1; scale: 1; filter: none; }

/* ⛔ NỀN TỐI THÌ LÀM DỊU ẢNH, KHÔNG ĐỔI ẢNH — Boss chốt 18/09: chỉ chụp một bộ
   ảnh nền sáng. Để nguyên thì ảnh trắng chói giữa màn tối. Rê/bấm vào thì trả
   về sáng bình thường để nhìn cho rõ. */
body.toi .hd-anh-khung > img { filter: blur(10px) brightness(.86); }
body.toi .hd-anh-khung > img.hd-ro { filter: brightness(.92); }
body.toi .hd-anh-khung > img.hd-ro:hover { filter: none; }

/* ── ảnh mở to toàn màn (điện thoại bấm vào, máy tính cũng bấm được) ───────── */
.hd-to {
  position: fixed;
  inset: 0;
  z-index: 99992;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  box-sizing: border-box;
  /* ⛔ .92 CHỨ ĐỪNG .82 — đã chụp ở 390px và thấy chữ của trang bên dưới
     vẫn đọc được, chồng lên chính dòng chú thích của ảnh. Thêm lớp làm mờ
     phía sau cho chữa dứt — máy cũ không hỗ trợ thì riêng nền .92 đã đủ. */
  background: rgba(0, 0, 0, .92);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .2s ease;
}
.hd-to.hd-hien { opacity: 1; }
.hd-to-anh {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  object-fit: contain;
}
.hd-to-ten {
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  max-width: 46ch;
  line-height: 1.5;
}
.hd-to-y {
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  text-align: center;
  max-width: 52ch;
  line-height: 1.5;
  margin-top: -8px;
}
.hd-to-lai {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(255, 255, 255, .8);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.hd-to-nut {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.hd-to-nut:disabled { opacity: .3; cursor: default; }
.hd-to-dong {
  position: absolute;
  top: 14px; right: 14px;
  width: 40px; height: 40px;
}

/* ⛔ MÁY NÀO XIN GIẢM CHUYỂN ĐỘNG THÌ TẮT HẾT HIỆU ỨNG, nhưng giữ nguyên trạng
   thái cuối — tắt bằng cách cho thời lượng về 0, không bằng cách bỏ luật, để
   dòng vẫn sáng và gạch chân vẫn hiện đủ. */
@media (prefers-reduced-motion: reduce) {
  .hd-buoc::before, .hd-buoc-ten::after, .hd-mt, .hd-buoc-y,
  .hd-anh-bay, .hd-anh-khung > img, .hd-to { transition-duration: .01ms; }
}
