/* ==========================================================================
   Hộp thoại thành tích + xem ảnh toàn màn hình.
   ========================================================================== */
.dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(43, 20, 6, .4);
  overflow: auto;
}
.dialog::backdrop { background: rgba(70, 30, 0, .45); backdrop-filter: blur(4px); }
.dialog[open] { animation: dialog-in .22s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }

.dialog__close,
.viewer__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(43, 20, 6, .15);
}

/* ---------- Chi tiết một lượt vinh danh (phương án B) ---------- */
.honor {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 40px clamp(20px, 5vw, 40px) 30px;
  text-align: center;
}

.honor__medal {
  width: 150px;
  margin: 6px 0 0;
  border: 0;
  cursor: zoom-in;
}
.honor__medal:disabled { cursor: default; }
.honor__medal .card__monogram { font-size: 3.2rem; }

.honor__thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.honor__thumb {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  opacity: .65;
}
.honor__thumb img { width: 100%; height: 100%; object-fit: cover; }
.honor__thumb[aria-current="true"] { border-color: var(--brand); opacity: 1; }

.honor__period { font-family: var(--f-display); font-style: italic; color: var(--gold-deep); }
.honor__name { font-size: var(--t-2xl); margin-top: 2px; }
.honor__meta { color: var(--ink-soft); margin-top: 4px; }
.honor .achievements { width: 100%; text-align: left; }

.achievements { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.achievement {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--gold-tint);
  box-shadow: inset 3px 0 0 var(--brand);
}
.achievement__category { font-size: .8rem; font-weight: 700; color: var(--gold-deep); }
.achievement__detail { font-family: var(--f-display); font-size: var(--t-lg); font-weight: 600; line-height: 1.4; margin-top: 2px; }

/* ---------- Danh sách theo đợt (mở từ "Những cái tên") ---------- */
.student { padding: clamp(28px, 4vw, 44px); display: grid; gap: 22px; }
.student__name { font-size: var(--t-2xl); padding-right: 40px; }
.student__intro { color: var(--ink-soft); margin-top: 4px; }
.student__periods { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.student__period {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.student__thumb {
  position: relative;
  width: 68px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--brand);
  overflow: hidden;
  background: linear-gradient(160deg, var(--brand), var(--stage-2));
}
.student__thumb img { width: 100%; height: 100%; object-fit: cover; }
.student__thumb .card__monogram { font-size: 1.6rem; }
.student__period h3 { font-size: var(--t-md); font-weight: 600; font-style: italic; color: var(--gold-deep); }
.student__period .achievements { margin-top: 8px; gap: 6px; }
.student__period .achievement { padding: 8px 12px; }
.student__period .achievement__detail { font-size: var(--t-md); }
.student__period .btn { margin-top: 10px; min-height: 38px; padding: 0 16px; font-size: var(--t-sm); }

.dialog__loading { padding: 48px; text-align: center; color: var(--ink-soft); }


/* ---------- Xem ảnh toàn màn hình ---------- */
.viewer {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(30, 14, 4, .96);
  color: #fff;
}
.viewer[open] { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; }
.viewer::backdrop { background: rgba(30, 14, 4, .96); }
.viewer__figure { margin: 0; display: grid; justify-items: center; gap: 10px; height: 100%; align-content: center; padding: 56px 0 24px; }
.viewer__image { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 6px; touch-action: pan-y; }
.viewer__caption { font-size: var(--t-sm); color: rgba(255, 255, 255, .8); text-align: center; padding: 0 12px; }
.viewer__nav {
  width: 48px;
  height: 48px;
  justify-self: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}
.viewer__nav:hover { background: rgba(255, 255, 255, .22); }
.viewer__nav[hidden] { display: block !important; visibility: hidden; }

@media (max-width: 600px) {
  .viewer[open] { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .viewer__nav { width: 38px; height: 38px; font-size: 1.6rem; }
}
