/* Client 공통 스타일. 모바일 반응형(≤ 768px, ≤ 480px) 브레이크포인트는 파일 하단 참고. */

:root {
  /* Brand */
  --c-primary: #2563eb;
  --c-primary-600: #1d4ed8;
  --c-primary-50: #eff6ff;
  --c-indigo: #4f46e5;
  --c-indigo-600: #4338ca;
  --c-indigo-50: #eef2ff;
  --c-violet: #7c3aed;

  --grad-brand: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
  --grad-brand-soft: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);

  /* Accents (메뉴/상태) */
  --c-teal: #0d9488;
  --c-teal-50: #ccfbf1;
  --c-teal-600: #0f766e;
  --c-green: #059669;
  --c-green-50: #ecfdf5;
  --c-green-600: #047857;
  --c-amber: #d97706;
  --c-amber-50: #fef3c7;
  --c-amber-600: #b45309;
  --c-rose: #e11d48;
  --c-rose-50: #ffe4e6;
  --c-rose-600: #be123c;

  /* Neutrals */
  --c-ink: #0f172a;
  --c-text: #1f2937;
  --c-muted: #475569;
  --c-hint: #94a3b8;
  --c-line: #e5e7eb;
  --c-line-soft: #f1f5f9;
  --c-surface: #ffffff;
  --c-bg: #f5f7fb;

  /* Elevation */
  --sh-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh-sm: 0 2px 6px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh-md: 0 10px 30px -12px rgba(37, 99, 235, 0.28), 0 4px 10px -6px rgba(15, 23, 42, 0.08);
  --sh-brand: 0 10px 30px -10px rgba(79, 70, 229, 0.45);

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* 도트 그리드 (14px 격자, 브랜드 블루) */
  --dot-grid: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='1.5' cy='1.5' r='1.2' fill='%232563eb' fill-opacity='0.28'/%3E%3C/svg%3E");
  /* 도트 그리드(흰색) — 그라디언트 위 */
  --dot-grid-white: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Ccircle cx='2' cy='2' r='1.2' fill='%23ffffff' fill-opacity='0.22'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR",
               "Apple SD Gothic Neo", "맑은 고딕", sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 로그인 화면 ==================================================== */
.login-body {
  min-height: 100vh;
  background:
    radial-gradient(1000px 600px at 90% -10%, rgba(124, 58, 237, 0.09), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(37, 99, 235, 0.08), transparent 55%),
    #f4f5fb;
  position: relative;
  overflow-x: hidden;
}
.login-body::before {
  /* 은은한 도트 그리드 오버레이 */
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--dot-grid);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.login-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 18px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  box-shadow:
    0 24px 50px -20px rgba(15, 23, 42, 0.18),
    0 8px 20px -10px rgba(79, 70, 229, 0.22);
  overflow: hidden;
}
.login-card-head {
  position: relative;
  padding: 32px 30px 28px;
  background: var(--grad-brand);
  color: #fff;
  overflow: hidden;
}
.login-card-head::after {
  /* 헤더 우상단 도트 페이드 */
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--dot-grid-white);
  -webkit-mask-image: radial-gradient(ellipse at top right, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at top right, #000 0%, transparent 70%);
  pointer-events: none;
}
.login-card-society {
  position: relative;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.login-card-title {
  position: relative;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
  word-break: keep-all;
  letter-spacing: -0.01em;
}
.login-card-period {
  position: relative;
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  font-variant-numeric: tabular-nums;
}
.login-card-summary {
  position: relative;
  margin: 16px 0 0;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r-md);
  backdrop-filter: blur(6px);
  word-break: break-all;
}

.login-card-body {
  padding: 26px 30px 30px;
}
.login-card-form-title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.login-card-form-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--grad-brand);
}

.login-stage-foot {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: var(--c-hint);
  text-align: center;
}

/* 필드 공통 */
.fld {
  display: block;
  margin-bottom: 14px;
}
.fld-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}
.fld input[type="text"],
.fld input[type="password"],
.fld input[type="email"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--c-ink);
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: var(--r-md);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.fld textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-ink);
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: var(--r-md);
  outline: none;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
.fld textarea:focus,
.fld input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

/* 버튼 */
.btn {
  display: inline-block;
  padding: 0 16px;
  height: 38px;
  line-height: 36px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s ease;
}
.btn:hover { background: #f9fafb; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: #fff;
  background: var(--c-primary);
  border-color: var(--c-primary);
  box-shadow: 0 4px 12px -6px rgba(37, 99, 235, 0.55);
}
.btn-primary:hover {
  background: var(--c-primary-600);
  border-color: var(--c-primary-600);
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.65);
}
.btn-block {
  display: block;
  width: 100%;
  height: 46px;
  line-height: 44px;
  margin-top: 6px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  background: var(--grad-brand);
  border-color: transparent;
  box-shadow: var(--sh-brand);
}
.btn-block:hover {
  background: var(--grad-brand);
  border-color: transparent;
  filter: brightness(1.06);
  box-shadow: 0 14px 32px -10px rgba(79, 70, 229, 0.55);
}
.btn-sm {
  height: 28px;
  line-height: 26px;
  padding: 0 10px;
  font-size: 12px;
}

/* Flash */
.flash {
  margin-bottom: 14px;
  padding: 10px 12px 10px 14px;
  font-size: 13px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  border-left-width: 3px;
}
.flash-error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
  border-left-color: #dc2626;
}
.flash-info {
  color: #1e3a8a;
  background: var(--c-primary-50);
  border-color: #bfdbfe;
  border-left-color: var(--c-primary);
}

/* ===== 안내(Notice) 페이지 =========================================== */
.notice-box {
  width: 100%;
  max-width: 440px;
  padding: 36px 30px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  text-align: center;
  box-shadow:
    0 24px 50px -20px rgba(15, 23, 42, 0.18),
    0 8px 20px -10px rgba(79, 70, 229, 0.22);
}
.notice-title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--c-ink);
}
.notice-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-muted);
  word-break: keep-all;
}

/* ===== 로그인 이후 내부 페이지 (layout.php) =========================== */
.event-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(79, 70, 229, 0.05), transparent 400px),
    var(--c-bg);
}

.event-top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--c-line);
  box-shadow: var(--sh-xs);
}
.event-top::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--grad-brand);
  opacity: 0.85;
}
.event-top-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.event-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: #111827;
  text-decoration: none;
  line-height: 1.25;
}
.event-brand:hover { text-decoration: none; }
.event-brand-society {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-brand-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-top-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #374151;
  flex-shrink: 0;
}
.event-top-user .inline { display: inline; margin: 0; }
.event-top-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  user-select: none;
  box-shadow: 0 4px 10px -4px rgba(79, 70, 229, 0.5);
}
.event-top-name {
  font-weight: 600;
  color: #111827;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-content { flex: 1; padding: 24px; max-width: 1120px; width: 100%; margin: 0 auto; }
.event-foot { padding: 16px 24px; color: #9ca3af; font-size: 12px; text-align: center; }

.btn-ghost {
  height: 32px;
  line-height: 30px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-muted);
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-ghost:hover {
  background: var(--c-primary-50);
  color: var(--c-primary);
  border-color: #bfdbfe;
}

.card {
  position: relative;
  padding: 24px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
.card-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--c-ink);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}
.card-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--grad-brand);
  flex: 0 0 auto;
}
.card-desc  { margin: 0 0 12px; font-size: 14px; color: var(--c-muted); }
.empty { margin: 0; padding: 16px 0; color: var(--c-hint); font-size: 13px; text-align: center; }

/* ===== 홈 화면 ======================================================= */
.event-content { max-width: 1120px; }

.event-banner {
  margin-bottom: 20px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a 0%, #4f46e5 100%);
  box-shadow: 0 10px 30px -15px rgba(79, 70, 229, 0.45), 0 2px 6px -2px rgba(15, 23, 42, 0.1);
  /* PC: 가로 4:1 비율로 고정하고, 세로가 과하게 커지지 않도록 max-height 가드.
     원본이 세로로 길면 object-fit: cover 로 중앙만 노출. */
  aspect-ratio: 4 / 1;
  max-height: 280px;
}
.event-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-profile {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
  padding: 16px 20px 16px 24px;
  background: var(--grad-brand-soft);
  border: 1px solid #dbe3ff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}
.home-profile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-brand);
}
.home-profile-item { display: flex; align-items: baseline; gap: 8px; }
.home-profile-label {
  font-size: 12px;
  color: var(--c-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.home-profile-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-ink);
}
.home-profile-value strong {
  font-weight: 700;
  background: var(--grad-brand);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-size: 15px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
}
.home-col-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.home-col-side { display: flex; flex-direction: column; gap: 16px; }

.home-overview {
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px 16px;
  font-size: 14px;
}
.home-overview dt {
  color: var(--c-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 12.5px;
  text-transform: uppercase;
}
.home-overview dd {
  margin: 0;
  color: var(--c-ink);
  font-weight: 600;
}

.home-summary {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--c-line);
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-muted);
  word-break: keep-all;
}

/* 행사 개요 카드 — 우상단 도트 그리드 배경 */
.card--overview {
  position: relative;
  overflow: hidden;
}
.card--overview::after {
  content: "";
  position: absolute;
  top: -12px;
  right: -12px;
  width: 220px;
  height: 180px;
  background-image: var(--dot-grid);
  -webkit-mask-image: radial-gradient(ellipse at top right, #000 5%, transparent 75%);
          mask-image: radial-gradient(ellipse at top right, #000 5%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.card--overview > * { position: relative; z-index: 1; }
.home-summary p { margin: 0 0 8px; }
.home-summary p:last-child { margin-bottom: 0; }
.home-summary h1, .home-summary h2, .home-summary h3 { margin: 12px 0 6px; line-height: 1.4; color: #111827; }
.home-summary ul, .home-summary ol { margin: 6px 0; padding-left: 22px; }
.home-summary li { margin: 2px 0; }
.home-summary a { color: #2563eb; text-decoration: underline; }
.home-summary blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid #d1d5db; color: #4b5563; }
.home-summary img { max-width: 100%; height: auto; }

.login-card-summary p { margin: 0 0 6px; }
.login-card-summary p:last-child { margin-bottom: 0; }
.login-card-summary h1, .login-card-summary h2, .login-card-summary h3 { margin: 10px 0 4px; line-height: 1.4; color: #fff; font-size: 13px; font-weight: 700; }
.login-card-summary ul, .login-card-summary ol { margin: 4px 0; padding-left: 20px; text-align: left; }
.login-card-summary li { margin: 2px 0; }
.login-card-summary a { color: #fff; text-decoration: underline; }
.login-card-summary blockquote { margin: 6px 0; padding: 4px 10px; border-left: 3px solid rgba(255,255,255,0.4); color: rgba(255,255,255,0.82); }
.login-card-summary img { max-width: 100%; height: auto; }

.material-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.material-item {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.material-link {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 12px;
  background: #f9fafb;
  border: 1px solid var(--c-line);
  border-left: 3px solid transparent;
  border-radius: var(--r-md);
  color: var(--c-ink);
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s ease;
}
.material-link:hover {
  background: var(--c-primary-50);
  border-color: #bfdbfe;
  border-left-color: var(--c-primary);
  text-decoration: none;
}
.material-download {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  background: #f9fafb;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  color: var(--c-primary);
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.material-download:hover {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--sh-brand);
}
.material-download:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}
.material-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--r-sm);
  letter-spacing: 0.04em;
  box-shadow: 0 2px 6px -2px rgba(185, 28, 28, 0.5);
}
.material-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-size {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--c-muted);
  font-variant-numeric: tabular-nums;
}

.home-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
.home-menu-item {
  --menu-accent: var(--c-primary);
  --menu-accent-soft: var(--c-primary-50);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  text-decoration: none;
  overflow: hidden;
  transition: background .18s, color .18s, border-color .18s, transform .1s ease, box-shadow .18s;
}
.home-menu-item::before {
  /* 좌측 액센트 바 — hover 시 확장 */
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--menu-accent);
  opacity: 0;
  transition: opacity .18s;
}
.home-menu-item:hover {
  background: var(--menu-accent-soft);
  color: var(--menu-accent);
  border-color: var(--menu-accent);
  text-decoration: none;
  transform: translateX(2px);
  box-shadow: 0 6px 16px -10px rgba(37, 99, 235, 0.4);
}
.home-menu-item:hover::before { opacity: 1; }
.home-menu-item:hover .home-menu-arrow { color: var(--menu-accent); opacity: 1; transform: translateX(2px); }

.home-menu-arrow {
  font-size: 18px;
  line-height: 1;
  opacity: 0.4;
  color: var(--c-hint);
  transition: color .18s, opacity .18s, transform .18s;
}
.home-menu-label { flex: 1; min-width: 0; }
.home-menu-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-right: 12px;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
  color: var(--menu-accent);
}

/* 메뉴 항목별 액센트 */
.home-menu-item[data-menu="video"]   { --menu-accent: var(--c-primary);  --menu-accent-soft: var(--c-primary-50); }
.home-menu-item[data-menu="program"] { --menu-accent: var(--c-teal);     --menu-accent-soft: var(--c-teal-50); }
.home-menu-item[data-menu="record"]  { --menu-accent: var(--c-green);    --menu-accent-soft: var(--c-green-50); }
.home-menu-item[data-menu="qna"]     { --menu-accent: var(--c-amber);    --menu-accent-soft: var(--c-amber-50); }

.home-menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 7px;
  margin-right: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14);
}

/* ===== Q&A =========================================================== */
.qna-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.qna-head .card-title { margin: 0; }

.qna-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qna-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: background .15s, border-color .15s;
}
.qna-row:hover { background: #eff6ff; border-color: #bfdbfe; }
.qna-row-new { border-color: #fecaca; background: #fff7ed; }
.qna-row-new:hover { background: #fff1e6; border-color: #fdba74; }

.qna-row-link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: #111827;
  text-decoration: none;
}
.qna-row-link:hover { text-decoration: none; }

.qna-row-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}
.qna-row-status.is-answered { color: var(--c-green-600); background: var(--c-green-50); border: 1px solid #a7f3d0; }
.qna-row-status.is-waiting  { color: var(--c-amber-600); background: var(--c-amber-50); border: 1px solid #fde68a; }

.qna-row-question {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qna-new-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.15);
}

.qna-row-date {
  flex: 0 0 auto;
  font-size: 12px;
  color: #6b7280;
}

.qna-row-del {
  flex: 0 0 auto;
  margin: 0 12px 0 0;
}

/* Write form */
.qna-form textarea { min-height: 200px; }
.qna-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* Detail */
.qna-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}
.qna-detail-date { margin-left: auto; font-size: 12px; color: #6b7280; }

.qna-block { margin-bottom: 16px; }
.qna-block:last-child { margin-bottom: 0; }
.qna-block-label {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #6b7280;
  text-transform: uppercase;
}
.qna-block-body {
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: #111827;
  word-break: break-word;
}
.qna-block-answer .qna-block-body { background: #eff6ff; border-color: #bfdbfe; }
.qna-block-empty {
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 8px;
  color: #9ca3af;
  font-size: 13px;
  text-align: center;
}
.qna-block-meta {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
  text-align: right;
}

/* ===== 페이지 공통 ==================================================== */
.page-nav {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
}
.page-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  color: #4b5563;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
}
.page-back:hover { background: #f3f4f6; color: #111827; text-decoration: none; }

/* ===== 강의프로그램 =================================================== */
.program-image {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.program-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* ===== 반응형 ======================================================== */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-col-side { order: -1; }
}

@media (max-width: 768px) {
  /* 내부 페이지 헤더 */
  .event-top-inner { padding: 10px 14px; gap: 10px; }
  .event-brand-society { font-size: 10px; }
  .event-brand-title { font-size: 15px; }
  .event-top-avatar { width: 28px; height: 28px; font-size: 12px; }
  .event-top-name { max-width: 80px; font-size: 12px; }
  .btn-ghost { height: 30px; line-height: 28px; padding: 0 10px; font-size: 11px; }
  .event-content { padding: 14px; }
  .event-foot { padding: 12px 14px; }

  /* 배너 / 홈 — 모바일은 원본 비율 유지(잘라내지 않음) */
  .event-banner {
    margin-bottom: 14px;
    border-radius: var(--r-md);
    aspect-ratio: auto;
    max-height: none;
  }
  .event-banner img { height: auto; object-fit: unset; }
  .home-profile {
    gap: 12px 16px;
    margin-bottom: 14px;
    padding: 12px 14px 12px 18px;
    border-radius: var(--r-md);
  }
  .home-profile-label { font-size: 11px; }
  .home-profile-value { font-size: 13px; }

  .home-grid { gap: 14px; }
  .home-col-main { gap: 12px; }

  .card { padding: 16px; border-radius: var(--r-md); }
  .card-title { font-size: 15px; margin-bottom: 10px; }
  .card--overview::after { width: 150px; height: 130px; }

  .home-overview { grid-template-columns: 72px 1fr; font-size: 13px; }

  .material-link { padding: 9px 12px; gap: 10px; }
  .material-icon { width: 36px; height: 36px; font-size: 10px; }
  .material-name { font-size: 13px; }
  .material-size { font-size: 11px; }
  .material-download { width: 40px; }

  .home-menu { padding: 6px; }
  .home-menu-item { padding: 12px 14px; font-size: 13px; }

  .qna-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .qna-row-link { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .qna-row-question { flex: 1 1 100%; white-space: normal; }
  .qna-row-date { margin-left: auto; }
  .qna-form textarea { min-height: 160px; font-size: 15px; /* iOS 확대 방지 */ }

  /* 로그인 */
  .login-stage { padding: 28px 14px; gap: 14px; }
  .login-card { border-radius: var(--r-lg); }
  .login-card-head { padding: 26px 22px 22px; }
  .login-card-title { font-size: 19px; }
  .login-card-period { font-size: 12px; }
  .login-card-summary { padding: 10px 12px; font-size: 12.5px; }
  .login-card-body { padding: 22px 22px 26px; }
  .login-card-form-title { font-size: 14px; margin-bottom: 14px; }
  .fld input[type="text"],
  .fld input[type="password"],
  .fld input[type="email"] { height: 44px; font-size: 15px; /* iOS 자동 확대 방지 */ }
  .btn-block { height: 46px; line-height: 44px; font-size: 15px; }

  /* 안내 페이지 */
  .notice-box { padding: 28px 22px; border-radius: var(--r-lg); }
  .notice-title { font-size: 17px; }
}

@media (max-width: 480px) {
  .event-top-inner { padding: 8px 12px; }
  .event-brand-society { display: none; }
  .event-top-name { max-width: 56px; }
  .event-content { padding: 12px; }

  /* 행사 개요: 좁은 화면에서 라벨/값 세로 배치 */
  .home-overview { grid-template-columns: 1fr; gap: 2px 0; }
  .home-overview dt { font-size: 11px; color: #6b7280; }
  .home-overview dd { margin-bottom: 6px; }
  .home-overview dd:last-child { margin-bottom: 0; }

  .material-link { flex-wrap: wrap; }
  .material-name { flex: 1 1 100%; order: 2; white-space: normal; overflow: visible; text-overflow: clip; }
  .material-icon { order: 1; width: 32px; height: 32px; }
  .material-size { order: 3; margin-left: auto; }
  .material-download { width: 38px; }

  .login-stage { padding: 20px 12px; }
  .login-card-head { padding: 22px 18px 20px; }
  .login-card-title { font-size: 17px; }
  .login-card-body { padding: 20px 18px 22px; }
}

/* ===== 강의 영상 목록 / 수강 팝업 ===================================== */
.video-list-head { padding: 4px 0 16px; border-bottom: 1px solid #e5e7eb; margin-bottom: 16px; }
.video-list-title { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: #111827; }
.video-list-sub   { margin: 0; font-size: 13px; color: #6b7280; }

.video-score-banner {
  position: relative;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px;
  padding: 14px 18px; margin: 0 0 16px;
  background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 100%);
  border: 1px solid #c7d2fe;
  border-radius: var(--r-lg);
  color: #3730a3;
  overflow: hidden;
  box-shadow: var(--sh-xs);
}
.video-score-banner::after {
  content: "";
  position: absolute;
  top: -8px; right: -8px;
  width: 180px; height: 120px;
  background-image: var(--dot-grid);
  -webkit-mask-image: radial-gradient(ellipse at top right, #000 5%, transparent 75%);
          mask-image: radial-gradient(ellipse at top right, #000 5%, transparent 75%);
  pointer-events: none;
}
.video-score-banner > * { position: relative; }
.video-score-label { font-size: 13px; color: #4338ca; font-weight: 500; margin-right: 4px; }
.video-score-value {
  font-size: 24px; font-weight: 800;
  background: var(--grad-brand);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.video-score-slash { color: #94a3b8; }
.video-score-max   { font-size: 15px; font-weight: 600; color: #3730a3; }
.video-score-hint  { margin-left: auto; font-size: 12px; color: #64748b; }

.video-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.video-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  transition: border-color .15s, box-shadow .15s, transform .1s ease;
}
.video-row:hover { border-color: #c7d2fe; box-shadow: var(--sh-sm); }
.video-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.video-row-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--c-ink); word-break: break-word; }
.video-row-badge {
  display: inline-block; margin-left: 8px;
  padding: 2px 8px; font-size: 11px; font-weight: 700;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff; border-radius: 999px; vertical-align: 2px;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
  letter-spacing: 0.02em;
}
.video-row-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--c-muted); }
.video-row-meta strong { color: var(--c-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.video-row-progress { display: flex; align-items: center; gap: 10px; }
.video-row-bar { flex: 1; height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.video-row-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-indigo) 100%);
  box-shadow: 0 0 8px -1px rgba(79, 70, 229, 0.4);
  transition: width .3s ease;
}
.video-row-pct { font-size: 12px; color: #4b5563; font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }
.video-row-pct strong { color: #111827; font-weight: 600; }
.video-row-action { flex: 0 0 auto; }
.video-row-action .btn { min-width: 92px; }
.video-row-action .btn[disabled] { opacity: .6; cursor: not-allowed; }
.video-row-lock-hint {
  display: inline-flex; align-items: center; gap: 5px;
  align-self: flex-start; margin: 2px 0 0;
  padding: 3px 9px; font-size: 11.5px; line-height: 1.3;
  color: #9a6a00; background: #fff7e6;
  border: 1px solid #ffe2a8; border-radius: 999px;
}
.video-row-lock-hint svg { flex: 0 0 auto; }

@media (max-width: 640px) {
  .video-row { flex-direction: column; align-items: stretch; }
  .video-row-action { display: flex; }
  .video-row-action .btn { width: 100%; }
  .video-score-hint { margin-left: 0; width: 100%; }
}

/* 수강 팝업 */
.watch-modal { position: fixed; inset: 0; z-index: 100; display: block; }
.watch-modal[hidden] { display: none; }
.watch-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.6); }
.watch-modal-dialog {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: calc(100% - 24px); max-width: 960px;
  max-height: calc(var(--watch-vh, 100vh) - 32px);
  background: #fff; border-radius: 12px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}
.watch-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid #e5e7eb; background: #f9fafb;
}
.watch-modal-title { margin: 0; font-size: 16px; font-weight: 700; color: #111827; flex: 1; min-width: 0; word-break: break-word; }
.watch-modal-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.watch-modal-body { padding: 0 16px 18px; overflow: auto; }
.watch-modal-player {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border-radius: 8px; overflow: hidden; margin-bottom: 12px;
}
.watch-modal-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* iframe(cross-origin) 이 마우스 이벤트를 흡수하므로 그 위에 투명 캡처 레이어를 덮어 mousemove/click 을 부모로 전달 */
.watch-player-capture {
  position: absolute; inset: 0; z-index: 1;
  background: transparent; cursor: pointer;
}
.watch-modal-player.is-idle .watch-player-capture { cursor: none; }

/* 중앙 오버레이 컨트롤 그룹 (뒤로 / 재생토글 / 앞으로) */
.watch-player-overlay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 18px;
  z-index: 2;
  opacity: 1; transition: opacity .2s ease;
}
.watch-player-overlay[data-state="playing"] { opacity: 0; }
.watch-modal-player:hover .watch-player-overlay,
.watch-player-overlay:focus-within { opacity: 1; }

.watch-player-toggle {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff; border: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .18s ease, transform .12s ease;
}
.watch-player-toggle:hover { background: rgba(0, 0, 0, 0.78); transform: scale(1.06); }
.watch-player-toggle:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; }
.watch-player-toggle .watch-player-icon { width: 32px; height: 32px; display: none; }
.watch-player-toggle[data-state="paused"] .watch-player-icon-play { display: block; }
.watch-player-toggle[data-state="playing"] .watch-player-icon-pause { display: block; }

/* 상단 헤더 아이콘 토글 */
.watch-icon-btn-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  background: #4f46e5; border: 1px solid #4f46e5; color: #fff; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.watch-icon-btn-toggle:hover { background: #4338ca; border-color: #4338ca; }
.watch-icon-btn-toggle:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; }
.watch-icon-btn-toggle .watch-player-icon { width: 18px; height: 18px; display: none; }
.watch-icon-btn-toggle[data-state="paused"] .watch-player-icon-play { display: block; }
.watch-icon-btn-toggle[data-state="playing"] .watch-player-icon-pause { display: block; }

/* 전체화면 아이콘 버튼 */
.watch-icon-btn-fs {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; border: 1px solid #d1d5db; color: #374151; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.watch-icon-btn-fs:hover { background: #f3f4f6; border-color: #9ca3af; color: #111827; }
.watch-icon-btn-fs:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; }
.watch-icon-btn-fs .watch-fs-icon { width: 18px; height: 18px; display: none; }
.watch-icon-btn-fs[data-fs="off"] .watch-fs-icon-enter { display: block; }
.watch-icon-btn-fs[data-fs="on"]  .watch-fs-icon-exit  { display: block; }

/* 전체화면 종료 버튼 — 기본 숨김, fullscreen / fallback 상태에서만 표시 */
.watch-player-fs-exit {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  height: 40px; padding: 0 14px 0 10px; gap: 6px;
  border: 0; border-radius: 999px;
  background: rgba(0, 0, 0, 0.62); color: #fff;
  display: none; align-items: center; justify-content: center;
  cursor: pointer; font-size: 13px; font-weight: 600;
  transition: background .15s ease, opacity .3s ease, transform .12s ease;
}
.watch-player-fs-exit:hover { background: rgba(0, 0, 0, 0.85); transform: scale(1.03); }
.watch-player-fs-exit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.watch-player-fs-exit svg { width: 18px; height: 18px; display: block; }
.watch-player-fs-exit-text { line-height: 1; }

/* 네이티브 fullscreen — .watch-modal-player 가 전체화면이 되는 경우 */
.watch-modal-player:fullscreen         { aspect-ratio: auto; width: 100vw; height: 100vh; border-radius: 0; margin: 0; background: #000; }
.watch-modal-player:-webkit-full-screen{ aspect-ratio: auto; width: 100vw; height: 100vh; border-radius: 0; margin: 0; background: #000; }
.watch-modal-player:fullscreen iframe,
.watch-modal-player:-webkit-full-screen iframe { width: 100vw; height: 100vh; }
.watch-modal-player:fullscreen .watch-player-toggle,
.watch-modal-player:-webkit-full-screen .watch-player-toggle { width: 88px; height: 88px; }
.watch-modal-player:fullscreen .watch-player-toggle .watch-player-icon,
.watch-modal-player:-webkit-full-screen .watch-player-toggle .watch-player-icon { width: 40px; height: 40px; }

/* 전체화면 상태에서 종료 버튼 노출 */
.watch-modal-player:fullscreen         .watch-player-fs-exit,
.watch-modal-player:-webkit-full-screen .watch-player-fs-exit,
body.watch-fs-fallback                 .watch-player-fs-exit { display: inline-flex; }

/* 전체화면 상태에서 영상 위 오버레이 컨트롤 노출 */
.watch-modal-player:fullscreen          .watch-player-controls,
.watch-modal-player:-webkit-full-screen .watch-player-controls,
body.watch-fs-fallback                  .watch-player-controls { display: flex; }
.watch-modal-player:fullscreen          .watch-player-controls,
.watch-modal-player:-webkit-full-screen .watch-player-controls { padding: 32px 24px 16px; }
.watch-modal-player:fullscreen          .watch-volume-slider,
.watch-modal-player:-webkit-full-screen .watch-volume-slider { width: 140px; }

/* 전체화면 idle — 일정시간 움직임 없으면 커서/컨트롤 숨김 (JS 가 is-idle 클래스 토글) */
.watch-modal-player.is-idle { cursor: none; }
.watch-modal-player.is-idle .watch-player-overlay,
.watch-modal-player.is-idle .watch-player-fs-exit,
.watch-modal-player.is-idle .watch-player-controls {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity .4s ease;
}
.watch-modal-player .watch-player-overlay,
.watch-modal-player .watch-player-fs-exit,
.watch-modal-player .watch-player-controls { transition: opacity .2s ease, background .15s ease, transform .12s ease; }
/* 슬라이더 조작/포커스 / hover 중에는 idle 처리 무시 */
.watch-modal-player .watch-player-controls:hover,
.watch-modal-player .watch-player-controls:focus-within { opacity: 1 !important; pointer-events: auto; }

/* iOS 대체(네이티브 fullscreen 미지원) — body 에 watch-fs-fallback 클래스가 붙음 */
body.watch-fs-fallback { overflow: hidden; }
body.watch-fs-fallback .watch-modal-dialog {
  position: fixed; inset: 0; transform: none;
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh;
  border-radius: 0;
}
body.watch-fs-fallback .watch-modal-body { padding: 0 10px 6px; overflow: auto; }
body.watch-fs-fallback .watch-modal-player { aspect-ratio: auto; height: calc(100vh - 56px - 72px); }
body.watch-fs-fallback .watch-seek,
body.watch-fs-fallback .watch-modal-meta,
body.watch-fs-fallback .watch-section-info,
body.watch-fs-fallback .watch-modal-sponsors { display: none; }
/* 시크 프로그레스바 */
.watch-seek { display: flex; align-items: center; gap: 12px; margin: 0 2px 10px; }
.watch-seek-track {
  position: relative; flex: 1; height: 10px; border-radius: 999px;
  background: #e5e7eb; cursor: pointer; overflow: visible;
}
.watch-seek-reached {
  position: absolute; left: 0; top: 0; height: 100%;
  background: #c7d2fe; border-radius: 999px; transition: width .15s linear;
}
.watch-seek-played {
  position: absolute; left: 0; top: 0; height: 100%;
  background: #4f46e5; border-radius: 999px; transition: width .12s linear;
}
.watch-seek-thumb {
  position: absolute; top: 50%; width: 16px; height: 16px; margin-left: -8px;
  transform: translateY(-50%);
  background: #4f46e5; border: 2px solid #fff; border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2); pointer-events: none;
  transition: left .12s linear, transform .1s ease;
}
.watch-seek-track:hover .watch-seek-thumb { transform: translateY(-50%) scale(1.15); }
.watch-seek-times {
  font-size: 12px; color: #4b5563; font-variant-numeric: tabular-nums;
  display: inline-flex; gap: 4px; white-space: nowrap;
}
.watch-seek-sep { color: #9ca3af; }

/* 볼륨 컨트롤 — 외부 시크바 우측에 인라인으로 / 풀스크린 오버레이 안에 다크 테마로 사용 */
.watch-volume { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.watch-volume--inline { margin-left: 4px; }
.watch-volume-btn {
  width: 32px; height: 32px; padding: 0; border: 1px solid #d1d5db; background: #fff;
  color: #374151; cursor: pointer; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.watch-volume-btn:hover { background: #f3f4f6; border-color: #9ca3af; color: #111827; }
.watch-volume-btn:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; }
.watch-volume-btn .watch-vol-icon { width: 18px; height: 18px; display: none; }
.watch-volume-btn[data-muted="false"] .watch-vol-icon-on  { display: block; }
.watch-volume-btn[data-muted="true"]  .watch-vol-icon-off { display: block; }

.watch-volume-slider {
  -webkit-appearance: none; appearance: none;
  width: 88px; height: 4px; border-radius: 999px;
  background: #e5e7eb; cursor: pointer; outline: none;
}
.watch-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #4f46e5; border: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.watch-volume-slider::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: #4f46e5; border: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.watch-volume-slider:focus-visible { outline: 2px solid #4f46e5; outline-offset: 4px; }

/* 풀스크린 전용 영상 위 오버레이 컨트롤 바 (기본 숨김; 풀스크린/iOS 폴백 시 노출) */
/* 비풀스크린의 외부 .watch-seek 와 동일하게 한 줄에 [시크 트랙][시간][볼륨] 배치 */
.watch-player-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 24px 14px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%);
  display: none;
  flex-direction: row; align-items: center; gap: 12px;
  color: #fff;
  opacity: 1;
}
.watch-time {
  font-size: 12px; color: rgba(255,255,255,0.92); font-variant-numeric: tabular-nums;
  display: inline-flex; gap: 4px; white-space: nowrap; flex: 0 0 auto;
}
.watch-time .watch-seek-sep { color: rgba(255,255,255,0.55); }

.watch-volume--overlay { margin-left: auto; }
.watch-volume--overlay .watch-volume-btn { border: 0; background: transparent; color: #fff; }
.watch-volume--overlay .watch-volume-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.watch-volume--overlay .watch-volume-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.watch-volume--overlay .watch-volume-slider { background: rgba(255,255,255,0.35); }
.watch-volume--overlay .watch-volume-slider::-webkit-slider-thumb { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.watch-volume--overlay .watch-volume-slider::-moz-range-thumb     { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.watch-volume--overlay .watch-volume-slider:focus-visible { outline: 2px solid #fff; }

/* 오버레이 안 시크 트랙 다크 테마 (기존 .watch-seek-* 룰셋의 flex:1 그대로 활용 — row 안에서 가로 grow) */
.watch-player-controls .watch-seek-track { height: 6px; background: rgba(255,255,255,0.30); }
.watch-player-controls .watch-seek-track:hover { height: 8px; transition: height .12s ease; }
.watch-player-controls .watch-seek-reached { background: rgba(255,255,255,0.55); }
.watch-player-controls .watch-seek-played  { background: #fff; }
.watch-player-controls .watch-seek-thumb {
  width: 12px; height: 12px; margin-left: -6px;
  background: #fff; border: 0;
}

/* pending (seek 버퍼링 중) */
.watch-seek.is-pending .watch-seek-track,
.watch-player-controls.is-pending .watch-seek-track { cursor: progress; }
.watch-seek.is-pending .watch-seek-played,
.watch-player-controls.is-pending .watch-seek-played {
  background: linear-gradient(90deg, #4f46e5 0%, #a5b4fc 50%, #4f46e5 100%);
  background-size: 200% 100%;
  animation: watch-seek-shimmer 1.1s linear infinite;
  opacity: 0.85;
}
@keyframes watch-seek-shimmer {
  from { background-position: 0% 0; }
  to   { background-position: -200% 0; }
}
.watch-seek.is-pending .watch-seek-thumb,
.watch-player-controls.is-pending .watch-seek-thumb {
  background: #fff; border: 2px solid rgba(79, 70, 229, 0.25); border-top-color: #4f46e5;
  animation: watch-seek-spin 0.7s linear infinite;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}
@keyframes watch-seek-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

.watch-modal-meta { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; }
.watch-modal-stats { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: #6b7280; }
.watch-modal-stats strong { color: #111827; font-weight: 600; font-variant-numeric: tabular-nums; }
.watch-modal-hint { color: #9ca3af; }

.watch-modal-sponsors { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e5e7eb; }
.watch-modal-sponsors-title { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; }
.watch-modal-sponsors-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.watch-modal-sponsors-list li { background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 1; }
.watch-modal-sponsors-list img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }

body.modal-open { overflow: hidden; }

/* 모바일 landscape — 수강 팝업 풀 뷰포트 활용 (주소창 대응) */
@media (orientation: landscape) and (max-height: 520px) {
  .watch-modal-dialog {
    position: fixed; inset: 0; top: 0; left: 0; right: 0; bottom: 0;
    transform: none;
    width: 100vw; height: var(--watch-vh, 100vh);
    max-width: 100vw; max-height: var(--watch-vh, 100vh);
    border-radius: 0;
  }
  .watch-modal-head { padding: 6px 12px; }
  .watch-modal-title { font-size: 13px; }
  .watch-section-info { font-size: 12px; gap: 8px; margin-bottom: 6px; }
  .watch-section-info-title { font-size: 14px; }
  .watch-section-info-item + .watch-section-info-item::before { margin-right: 8px; }
  .watch-modal-body { padding: 0 12px 8px; overflow: auto; }
  .watch-modal-player { aspect-ratio: auto; height: calc(var(--watch-vh, 100vh) - 56px - 74px); margin-bottom: 6px; }
  .watch-seek { margin-bottom: 4px; }
  .watch-volume--inline { display: none; }
  .watch-volume--overlay .watch-volume-slider { width: 80px; }
  .watch-player-controls { padding: 18px 10px 6px; }
  .watch-time { font-size: 11px; }
  .watch-modal-meta { padding: 6px 10px; }
  .watch-modal-sponsors { display: none; }
  .watch-icon-btn-toggle { width: 34px; height: 34px; }
  .watch-icon-btn-fs { width: 30px; height: 30px; }
  .watch-icon-btn-fs .watch-fs-icon { width: 16px; height: 16px; }
  .watch-icon-btn-toggle .watch-player-icon { width: 14px; height: 14px; }
}

/* 모바일 portrait — 모달을 주소창 아래 실제 뷰포트에 꽉 맞춤 */
@media (max-width: 480px) and (orientation: portrait) {
  .watch-modal-dialog {
    position: fixed; top: 0; left: 0; right: 0; bottom: auto;
    transform: none;
    width: 100vw;
    height: var(--watch-vh, 100vh);
    max-height: var(--watch-vh, 100vh);
    border-radius: 0;
  }
  .watch-modal-body { padding: 0 12px 14px; }
  .watch-modal-sponsors-list { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .watch-volume--inline .watch-volume-slider { width: 64px; }
}

/* 이수내역 */
.record-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.record-table th, .record-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; text-align: left; font-size: 13px; white-space: nowrap; }
.record-table thead th { background: #f9fafb; color: #374151; font-weight: 600; }
.record-table tbody tr:last-child td { border-bottom: 0; }
.record-table .col-num { font-variant-numeric: tabular-nums; }
.record-table .col-title { white-space: normal; }
.record-summary { margin-top: 14px; padding: 12px 16px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; color: #374151; }
.record-summary strong { color: #111827; }

.record-log-row td.record-log-cell { padding: 0 12px 8px; background: #fcfdff; border-bottom: 1px solid #f1f5f9; }
.record-log { font-size: 13px; color: #475569; }
.record-log > summary { cursor: pointer; padding: 6px 0; color: #4338ca; font-weight: 500; list-style: none; user-select: none; }
.record-log > summary::marker { display: none; }
.record-log > summary::-webkit-details-marker { display: none; }
.record-log > summary::before { content: '▸ '; transition: transform .15s ease; display: inline-block; }
.record-log[open] > summary::before { content: '▾ '; }
.record-log-list { list-style: none; margin: 4px 0 8px 16px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.record-log-list li { display: flex; gap: 12px; align-items: center; font-variant-numeric: tabular-nums; }
.record-log-when { color: #334155; }
.record-log-dur { color: #6b7280; font-size: 12px; }

@media (max-width: 640px) {
  .record-table thead { display: none; }
  .record-table tbody tr { display: block; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
  .record-table tbody td { display: flex; justify-content: space-between; border: 0; padding: 6px 12px; }
  .record-table tbody td::before { content: attr(data-label); font-weight: 600; color: #6b7280; }
}

/* 라이브 강의실 — 헤더에 위치하는 세션 정보(제목/강의자/강의시간/시작~종료/남은시간) 한 줄 강제 */
.watch-section-info {
  display: flex; flex-direction: row; flex-wrap: nowrap; align-items: baseline;
  gap: 12px; margin: 0;
  font-size: 13px; color: #4b5563;
  flex: 1 1 auto; min-width: 0; overflow: hidden;
}
.watch-section-info-title {
  margin: 0; font-size: 16px; font-weight: 700; color: #111827;
  flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.watch-section-info-item { white-space: nowrap; flex: 0 0 auto; }
.watch-section-info-item:empty { display: none; }
.watch-section-info-item + .watch-section-info-item::before {
  content: '·'; margin-right: 12px; color: #9ca3af;
}
.watch-section-info-remain { font-weight: 600; color: #1d4ed8; font-variant-numeric: tabular-nums; }

/* 라이브 강의실 — 송출 종료 / 쉬는 시간 안내 배너 */
.watch-status-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  line-height: 1.4;
}
.watch-status-banner.info { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.watch-status-banner.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; font-weight: 500; }

/* 라이브 플레이어 — 외부 시크 바가 없으므로 오버레이 컨트롤을 풀스크린이 아닐 때도 노출 */
.watch-modal-player.is-live-player .watch-player-controls { display: flex; }
.watch-live-indicator { flex: 1 1 auto; display: inline-flex; align-items: center; }
.watch-live-indicator .live-badge { margin: 0; }
.watch-modal-player.is-live-player .watch-icon-btn-fs { color: #fff; }
.watch-modal-player.is-live-player .watch-icon-btn-fs[data-fs="on"] .watch-fs-icon-enter,
.watch-modal-player.is-live-player .watch-icon-btn-fs[data-fs="off"] .watch-fs-icon-exit { display: none; }
.watch-modal-player.is-live-player .watch-icon-btn-fs .watch-fs-icon-enter,
.watch-modal-player.is-live-player .watch-icon-btn-fs .watch-fs-icon-exit { width: 22px; height: 22px; }
.watch-modal-player.is-live-player .watch-icon-btn-fs {
  background: transparent; border: 0; padding: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px; transition: background .12s ease;
}
.watch-modal-player.is-live-player .watch-icon-btn-fs:hover { background: rgba(255,255,255,0.15); }
.watch-modal-player.is-live-player .watch-icon-btn-fs:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ===== Live streaming (강의실) ===== */
.live-section-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.live-section {
  display: grid;
  grid-template-columns: 160px 1fr 120px 80px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #e5e7eb;
  border-radius: 8px;
  transition: background 0.2s, border-color 0.2s;
}
.live-section.is-live {
  background: #fff7ed;
  border-color: #f97316;
  border-left-color: #ea580c;
  box-shadow: 0 0 0 1px #fed7aa inset;
}
.live-section-time { font-weight: 600; color: #111827; }
.live-section.is-live .live-section-time { color: #c2410c; }
.live-section-date { display: block; font-size: 12px; color: #6b7280; font-weight: 400; }
.live-section-title { color: #111827; }
.live-section-lect { color: #4b5563; font-size: 14px; }
.live-section-status {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  text-align: center;
  font-weight: 500;
}
.live-section.is-live .live-section-status {
  background: #f97316;
  color: #fff;
}
.live-watch-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 24px 0 16px;
}
.live-watch-action .btn-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  line-height: 1;
  font-size: 18px;
  font-weight: 600;
  padding: 16px 36px;
  border-radius: 10px;
}
.live-watch-action .btn-primary[disabled] {
  background: #cbd5e1;
  cursor: not-allowed;
}
.live-watch-hint { color: #6b7280; font-size: 13px; }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: #dc2626;
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-left: 8px;
}
.live-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@media (max-width: 640px) {
  .live-section {
    grid-template-columns: 1fr;
    gap: 6px;
    border-left-width: 3px;
  }
  .live-section-status { justify-self: flex-start; }
}
