/* ==========================================================================
   DMDG Student Projects Showcase - Ambient Aurora Glassmorphism Theme
   Adapted from dmdg_live_dot_com/aurora_theme.css
   ========================================================================== */

:root {
  --bg-deep: #0b1936;
  --glass-bg: rgba(15, 26, 52, 0.54);
  --glass-bg-strong: rgba(11, 20, 42, 0.84);
  --glass-border: rgba(255, 255, 255, 0.2);
  --sky: #38bdf8;
  --emerald: #34d399;
  --violet: #a78bfa;
  --pink: #f472b6;
  --amber: #fbbf24;
  --rose: #fb7185;
  --text-main: #f8fafc;
  --text-sub: #cbd5e1;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body.aurora-portal-body {
  position: relative;
  background-color: #0b1936;
  background-image:
    radial-gradient(ellipse 85% 60% at 12% 8%, rgba(52, 211, 153, 0.52), transparent 62%),
    radial-gradient(ellipse 75% 55% at 88% 12%, rgba(56, 189, 248, 0.48), transparent 60%),
    radial-gradient(ellipse 72% 58% at 70% 58%, rgba(167, 139, 250, 0.44), transparent 62%),
    radial-gradient(ellipse 68% 52% at 22% 88%, rgba(244, 114, 182, 0.36), transparent 62%),
    linear-gradient(155deg, #0b1936 0%, #122b52 42%, #1d2259 74%, #0f2447 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body.aurora-portal-body::before,
body.aurora-portal-body::after {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: 0;
  pointer-events: none;
  filter: blur(58px);
  opacity: 0.9;
  will-change: transform;
}

body.aurora-portal-body::before {
  background:
    radial-gradient(46% 34% at 22% 24%, rgba(52, 211, 153, 0.55), transparent 72%),
    radial-gradient(44% 32% at 78% 20%, rgba(56, 189, 248, 0.52), transparent 70%),
    radial-gradient(48% 36% at 52% 50%, rgba(168, 85, 247, 0.44), transparent 74%);
  animation: auroraDriftA 18s ease-in-out infinite alternate;
}

body.aurora-portal-body::after {
  background:
    radial-gradient(42% 30% at 82% 72%, rgba(244, 114, 182, 0.42), transparent 72%),
    radial-gradient(46% 34% at 24% 76%, rgba(251, 191, 36, 0.28), transparent 72%),
    radial-gradient(40% 28% at 50% 14%, rgba(94, 234, 212, 0.44), transparent 70%);
  animation: auroraDriftB 22s ease-in-out infinite alternate;
}

@keyframes auroraDriftA {
  0% { transform: translate3d(-2%, -1%, 0) scale(1) rotate(0deg); }
  100% { transform: translate3d(3%, 2%, 0) scale(1.06) rotate(4deg); }
}

@keyframes auroraDriftB {
  0% { transform: translate3d(2%, 1%, 0) scale(1.03) rotate(0deg); }
  100% { transform: translate3d(-3%, -2%, 0) scale(0.98) rotate(-4deg); }
}

.portal-main-wrapper {
  position: relative;
  z-index: 2;
  max-width: 1420px;
  margin: 0 auto;
  padding: 1.35rem 1.5rem 3.5rem;
}

/* ── Top Header ── */
.portal-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.15rem;
  border-radius: 20px;
  background: rgba(13, 23, 46, 0.54);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.header-brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-orb {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #34d399, #38bdf8, #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.05rem;
  color: #0b1936;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
  flex-shrink: 0;
}

.brand-title-dmdg {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #38bdf8, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-title-platform {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.portal-search-box {
  flex: 1 1 240px;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.52rem 0.95rem;
  border-radius: 9999px;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.26);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.portal-search-box:focus-within {
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.portal-search-box input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-size: 0.86rem;
  font-family: inherit;
}

.portal-search-box input::placeholder {
  color: #64748b;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s, background 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}

.nav-pill-btn:hover {
  transform: translateY(-1px);
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.pill-cyan { border-color: rgba(56, 189, 248, 0.55); color: #bae6fd; }
.pill-emerald { border-color: rgba(52, 211, 153, 0.55); color: #a7f3d0; }

/* ── Hero Title Studio Card ── */
.hero-studio-card {
  position: relative;
  padding: 1.6rem 2rem 1.45rem;
  margin-bottom: 1.15rem;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(15, 26, 52, 0.58), rgba(19, 30, 58, 0.46));
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  text-align: center;
}

.studio-badge-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.95rem;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #bae6fd;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 0.7rem;
}

.studio-main-title {
  margin: 0 auto 0.65rem;
  max-width: 1120px;
  font-size: clamp(1.22rem, 2.25vw, 1.88rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #ffffff 8%, #a7f3d0 45%, #38bdf8 72%, #f9a8d4 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.studio-sub-guide {
  margin: 0 auto 1.15rem;
  max-width: 780px;
  font-size: 0.88rem;
  color: var(--text-sub);
}

/* KPI Row */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  max-width: 980px;
  margin: 0 auto;
}

.kpi-box {
  padding: 0.7rem 0.9rem;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.kpi-num {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.2;
  color: #ffffff;
}

.kpi-num.accent-sky { color: var(--sky); }
.kpi-num.accent-emerald { color: var(--emerald); }
.kpi-num.accent-violet { color: var(--violet); }
.kpi-num.accent-amber { color: var(--amber); }

.kpi-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.15rem;
}

/* ── Course Combo Box & Stage Navigation Bar ── */
.tabs-control-bar {
  display: flex;
  flex-direction: column;
  gap: 0.78rem;
  padding: 0.95rem 1.15rem;
  margin-bottom: 1.15rem;
  border-radius: 20px;
  background: rgba(15, 26, 52, 0.58);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

.track-selector-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.track-select-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: #bae6fd;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.track-select-wrap {
  position: relative;
  flex: 1 1 320px;
  max-width: 480px;
}

.track-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 0.58rem 2.3rem 0.58rem 1rem;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(19, 34, 68, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.52);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}

.track-select:hover,
.track-select:focus {
  outline: none;
  border-color: #34d399;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}

.track-select option {
  background: #0f172a;
  color: #f8fafc;
  font-weight: 700;
}

.track-period-hint {
  font-size: 0.78rem;
  color: #a7f3d0;
  font-weight: 700;
  margin-left: auto;
  padding: 0.28rem 0.72rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.34);
  white-space: nowrap;
}

.stage-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.main-tabs-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.main-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--text-sub);
  font-size: 0.9rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.main-tab-btn:hover {
  background: rgba(30, 41, 59, 0.92);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.45);
}

.main-tab-btn.active {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.28), rgba(56, 189, 248, 0.3));
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.32);
}

.tab-count-pill {
  padding: 0.1rem 0.52rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.filter-pills-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-chip {
  padding: 0.38rem 0.85rem;
  border-radius: 9999px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s ease;
}

.filter-chip.active,
.filter-chip:hover {
  background: rgba(167, 139, 250, 0.24);
  border-color: rgba(167, 139, 250, 0.6);
  color: #ffffff;
}

/* Common Banner inside Tab 1 */
.common-info-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 0.85rem 1.2rem;
  margin-bottom: 1.1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(37, 99, 235, 0.18));
  border: 1px solid rgba(34, 211, 238, 0.36);
}

/* ── Project Grid Cards ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
  gap: 1.15rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(15, 26, 52, 0.66), rgba(11, 20, 42, 0.78));
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.48), 0 0 24px rgba(56, 189, 248, 0.16);
}

.card-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.author-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.author-chip {
  padding: 0.18rem 0.58rem;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  font-size: 0.74rem;
  font-weight: 700;
}

.grade-badge {
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
  flex-shrink: 0;
}

.g-aplus { background: rgba(16, 185, 129, 0.25); border: 1px solid #34d399; color: #6ee7b7; }
.g-a     { background: rgba(56, 189, 248, 0.25); border: 1px solid #38bdf8; color: #bae6fd; }
.g-b     { background: rgba(245, 158, 11, 0.22); border: 1px solid #fbbf24; color: #fde68a; }
.g-c     { background: rgba(244, 63, 94, 0.22);  border: 1px solid #fb7185; color: #fecdd3; }

.card-title {
  margin: 0 0 0.45rem;
  font-size: 1.06rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
}

.card-summary {
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.5;
}

/* 3 Service Status Rows inside Card */
.service-status-panel {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.16);
  margin-bottom: 0.9rem;
}

.svc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.79rem;
}

.svc-label {
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.svc-pill {
  padding: 0.14rem 0.58rem;
  border-radius: 9999px;
  font-size: 0.73rem;
  font-weight: 800;
}

.svc-ok {
  background: rgba(52, 211, 153, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
}

.svc-missing {
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(251, 113, 133, 0.52);
  color: #fecdd3;
}

.svc-pdf {
  background: rgba(167, 139, 250, 0.22);
  border: 1px solid rgba(192, 132, 252, 0.48);
  color: #e9d5ff;
}

.card-actions-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}

.btn-open-modal {
  padding: 0.62rem 0.9rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border: 1px solid rgba(103, 232, 249, 0.45);
  color: #ffffff;
  font-size: 0.83rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s;
}

.btn-open-modal:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.38);
}

.btn-zip-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.62rem 0.85rem;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s, transform 0.16s;
}

.btn-zip-dl:hover {
  background: rgba(16, 185, 129, 0.32);
  transform: translateY(-1px);
}

/* ── Fullscreen Glass Detail Modal ── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
}

.modal-backdrop.show {
  display: flex;
}

.modal-shell {
  width: 100%;
  max-width: 1280px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.96), rgba(9, 14, 29, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.72);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.05rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 26, 52, 0.75);
}

.modal-title {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
}

.modal-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.35);
}

.modal-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  background: rgba(2, 6, 23, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.subtab-btn {
  padding: 0.46rem 1rem;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text-sub);
  font-size: 0.82rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}

.subtab-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(167, 139, 250, 0.3));
  border-color: #38bdf8;
  color: #ffffff;
}

.modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.split-viewer {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 320px 1fr;
}

.file-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.9rem;
  overflow-y: auto;
  background: rgba(2, 6, 23, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-select-item {
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--text-sub);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.15s;
}

.file-select-item:hover,
.file-select-item.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
}

.file-item-name {
  font-size: 0.82rem;
  font-weight: 700;
  word-break: break-all;
}

.file-item-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.viewer-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(2, 6, 23, 0.5);
}

.viewer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
}

.viewer-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #0b1936;
}

/* ── PDF.js Multi-Page Vertically Scrollable Viewer ── */
.pdf-viewer-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #091328;
}

.pdf-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(56, 189, 248, 0.24);
  font-size: 0.76rem;
  color: #cbd5e1;
  flex-shrink: 0;
}

.pdf-page-status {
  font-weight: 700;
  color: #bae6fd;
}

.pdf-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.pdf-zoom-btn {
  padding: 0.24rem 0.6rem;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.34);
  color: #f8fafc;
  font-size: 0.74rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}

.pdf-zoom-btn:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.22);
}

.pdf-zoom-label {
  min-width: 48px;
  text-align: center;
  font-weight: 800;
  color: #e2e8f0;
  font-size: 0.75rem;
}

.pdf-pages-viewport {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  background: #0b1428;
}

.pdf-page-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}

.pdf-page-label {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 0.28rem;
}

.pdf-canvas-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #ffffff;
}

.pdf-canvas-wrap canvas {
  display: block;
}

.pdf-loading-note {
  padding: 2rem 1rem;
  text-align: center;
  color: #93c5fd;
  font-weight: 700;
  font-size: 0.86rem;
}

.single-panel-scroll {
  flex: 1;
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
}

.video-missing-box {
  max-width: 620px;
  margin: 2.5rem auto;
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.4);
}

.video-missing-badge {
  display: inline-block;
  padding: 0.35rem 1.1rem;
  border-radius: 9999px;
  background: rgba(244, 63, 94, 0.25);
  border: 1px solid #fb7185;
  color: #fecdd3;
  font-size: 1.05rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.video-player-wrap {
  max-width: 920px;
  margin: 0 auto;
}

.video-player-wrap video {
  width: 100%;
  max-height: 62vh;
  border-radius: 16px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.dl-table th, .dl-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  text-align: left;
}

.dl-table th {
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.1);
}

.site-footer {
  margin-top: 2.2rem;
  padding: 1.1rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.common-resources-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.common-resources-box > *,
.common-resources-box details {
  width: 100%;
}

.common-photo-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.common-photo-card {
  width: 100%;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.65);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.common-photo-card:hover {
  transform: translateY(-2px);
  border-color: #34d399;
}

.common-photo-card img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  display: block;
}

.common-file-list {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 0.5rem;
}

.common-file-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.72rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 0.78rem;
  color: #e2e8f0;
}

.video-switcher-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

@media (max-width: 900px) {
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects-grid { grid-template-columns: 1fr; }
  .common-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .track-period-hint { margin-left: 0; }

  /* 모바일 전체 모달 세로 스크롤 & PDF 다중 페이지 수직/수평 스크롤 지원 */
  .modal-backdrop {
    padding: 0.4rem;
    align-items: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-shell {
    height: auto;
    min-height: calc(100dvh - 0.8rem);
    max-height: calc(100dvh - 0.8rem);
    border-radius: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .modal-header {
    padding: 0.78rem 0.95rem;
    flex-shrink: 0;
  }

  .modal-title {
    font-size: 1rem;
    line-height: 1.3;
  }

  .modal-subtabs {
    padding: 0.55rem 0.95rem;
    gap: 0.38rem;
    flex-shrink: 0;
  }

  .subtab-btn {
    padding: 0.38rem 0.72rem;
    font-size: 0.75rem;
  }

  .modal-body {
    flex: none;
    min-height: auto;
    overflow: visible;
    display: block;
  }

  .split-viewer {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .file-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    max-height: 132px;
    height: auto;
    padding: 0.55rem 0.75rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
  }

  .viewer-pane {
    flex: none;
    min-height: auto;
    overflow: visible;
  }

  .viewer-toolbar {
    padding: 0.5rem 0.75rem;
  }

  .pdf-viewer-shell {
    flex: none;
    min-height: auto;
  }

  .pdf-controls-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 0.42rem 0.75rem;
  }

  .pdf-pages-viewport {
    flex: none;
    min-height: 62vh;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    padding: 0.65rem 0.45rem 1.25rem;
    align-items: flex-start;
  }

  .pdf-page-card {
    margin: 0 auto;
  }

  .viewer-frame {
    min-height: 75vh;
    height: 75vh;
  }

  .single-panel-scroll {
    flex: none;
    overflow-y: visible;
    padding: 0.9rem 0.85rem 1.25rem;
  }
}

@media (max-width: 520px) {
  .common-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

