@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
  --primary: #1f3864;
  --accent: #c00000;
  --bg: #f8fafc;
  --text: #1f3864;
  --muted: #64748b;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(31, 56, 100, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(31, 56, 100, 0.95);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
}

.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-brand {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  display: flex;
  gap: 4px;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.site-nav a {
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}

.site-nav a:hover { background: rgba(255,255,255,0.1); }
.site-nav .nav-admin { background: rgba(255,255,255,0.15); font-weight: 600; }

.site-main { min-height: 60vh; }

.site-footer {
  text-align: center;
  padding: 32px 20px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid #e2e8f0;
  margin-top: 48px;
}

.site-footer-sub { margin-top: 4px; font-size: 0.8rem; }

/* Hero */
.hero {
  position: relative;
  height: 52vh;
  min-height: 320px;
  overflow: hidden;
  background: var(--primary);
}

@media (min-width: 768px) { .hero { height: 58vh; } }

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s;
  pointer-events: none;
}

.hero-slide-active { opacity: 1; pointer-events: auto; }

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(31,56,100,0.9) 0%, rgba(31,56,100,0.4) 50%, transparent 100%);
}

.hero-fallback { background: var(--primary); }

.hero-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 24px 20px 40px;
  max-width: 1280px;
  margin: 0 auto;
  color: #fff;
}

@media (min-width: 768px) { .hero-caption { padding: 32px 32px 56px; } }

.hero-sub { font-size: 0.875rem; font-weight: 600; opacity: 0.85; margin: 0; }
.hero-title { margin: 8px 0 0; font-size: 1.75rem; font-weight: 700; line-height: 1.2; max-width: 720px; }
@media (min-width: 768px) { .hero-title { font-size: 2.5rem; } }

.hero-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.3);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.hero-btn:hover { background: rgba(0,0,0,0.5); }
.hero-prev { left: 12px; }
.hero-next { right: 12px; }

.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
}

.hero-dot-active { width: 32px; background: #fff; }

/* Sections */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 20px;
}

.section-narrow { max-width: 768px; }
.section-narrow-wide { max-width: 1024px; margin: 0 auto; }
.section-photos { background: #fff; border-top: 1px solid #e2e8f0; max-width: none; }

.section-head { text-align: center; margin-bottom: 40px; }
.section-kicker { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0; }
.section-title { margin: 8px 0 0; font-size: 1.75rem; font-weight: 700; }
.section-title-left { font-size: 1.25rem; font-weight: 700; margin: 0 0 24px; }
.section-desc { margin: 12px auto 0; max-width: 480px; color: var(--muted); font-size: 0.95rem; }

.page-title { font-size: 1.75rem; font-weight: 700; margin: 0; }
.page-desc { margin: 8px 0 0; color: var(--muted); }

.text-muted { color: var(--muted); }

/* Day grid */
.day-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) { .day-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .day-grid { grid-template-columns: repeat(4, 1fr); } }

.day-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 140px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.day-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(31,56,100,0.12); }
.day-card-main { outline: 2px solid rgba(192,0,0,0.35); }

.day-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.day-num { font-size: 1.5rem; font-weight: 700; }
.day-dow { margin-left: 8px; font-size: 0.875rem; font-weight: 600; opacity: 0.7; }
.day-title { margin: 12px 0 0; font-size: 1rem; font-weight: 700; line-height: 1.35; }
.day-summary { margin: 8px 0 0; font-size: 0.85rem; opacity: 0.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.day-photos { margin-top: auto; padding-top: 12px; font-size: 0.75rem; opacity: 0.6; }

/* Day detail */
.day-picker {
  position: sticky;
  top: 52px;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(31, 56, 100, 0.06);
}
.day-picker-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.day-picker-home {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
.day-picker-home:hover { opacity: 0.92; }
.day-picker-home.is-active-home {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5), 0 0 0 3px var(--primary);
}
.day-picker-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 1100px;
}
.day-picker-link {
  position: relative;
  flex-shrink: 0;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 88px;
  max-width: 130px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.06);
  background: var(--day-accent, #f1f5f9);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.day-picker-link:hover {
  border-color: rgba(31, 56, 100, 0.25);
  transform: translateY(-1px);
}
.day-picker-link.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
  font-weight: 700;
}
.day-picker-link.is-main:not(.is-active) {
  border-color: rgba(192, 0, 0, 0.25);
}
.day-picker-md { font-size: 0.95rem; font-weight: 700; line-height: 1.2; }
.day-picker-dow { font-size: 0.72rem; font-weight: 600; opacity: 0.75; }
.day-picker-title {
  font-size: 0.68rem;
  line-height: 1.25;
  opacity: 0.85;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.day-picker-star {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.65rem;
  color: var(--accent);
}

@media (max-width: 767px) {
  .day-picker-track {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 2px 4px 4px;
    max-width: none;
  }
}

.day-hero { padding: 40px 20px; text-align: center; }
.day-hero-inner { max-width: 768px; margin: 0 auto; }
.day-hero-meta { font-size: 0.875rem; font-weight: 600; opacity: 0.7; margin: 0; }
.day-hero-main { margin-left: 8px; color: var(--accent); }
.day-hero-title { margin: 8px 0 0; font-size: 2rem; font-weight: 700; }
.day-hero-summary {
  margin: 12px auto 0;
  max-width: 640px;
  font-size: 1.05rem;
  opacity: 0.8;
  line-height: 1.5;
}

.timeline { border-left: 2px solid #e2e8f0; margin-left: 8px; padding-left: 24px; }
.timeline-compact .timeline-item { position: relative; padding-bottom: 16px; }
.timeline-compact .timeline-item:last-child { padding-bottom: 0; }
.timeline-compact .timeline-item::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-time-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.timeline-compact .timeline-time {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}
.timeline-compact .timeline-body { margin-top: 2px; }
.timeline-compact .timeline-act {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.timeline-compact .timeline-meta {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timeline-compact .timeline-desc {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.timeline-compact .timeline-tag {
  display: inline-block;
  margin: 0;
  font-size: 0.65rem;
  font-weight: 600;
  background: #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
}

.timeline-item { position: relative; padding-bottom: 32px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-time { font-size: 0.875rem; font-weight: 700; color: var(--accent); }
.timeline-loc { margin: 4px 0 0; font-size: 0.85rem; color: var(--muted); }
.timeline-act { margin: 4px 0 0; font-size: 1.1rem; font-weight: 700; }
.timeline-desc { margin: 8px 0 0; font-size: 0.95rem; color: var(--muted); }
.timeline-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.75rem;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Team page */
.team-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.team-page-hero {
  text-align: center;
  padding: 40px 0 48px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 40px;
}

.team-page-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.team-page-title {
  margin: 10px 0 0;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.team-page-desc {
  margin: 12px auto 0;
  max-width: 520px;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

.team-section { margin-bottom: 48px; }

.team-section-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.team-section-desc {
  margin: 0 0 24px;
  font-size: 0.9rem;
  color: var(--muted);
}

.team-leader-grid {
  display: grid;
  gap: 20px;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
}

.team-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e8edf3;
  box-shadow: 0 8px 30px rgba(31, 56, 100, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.team-card-featured {
  flex-direction: row;
  align-items: stretch;
}

@media (max-width: 639px) {
  .team-card-featured { flex-direction: column; }
}

.team-portrait-wrap {
  padding: 20px 20px 0;
  display: flex;
  justify-content: center;
}

.team-card-featured .team-portrait-wrap {
  padding: 24px;
  flex-shrink: 0;
  align-items: center;
  background: linear-gradient(160deg, #f0f4fa 0%, #fff 100%);
}

.team-portrait {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary);
  border: 4px solid #fff;
  box-shadow: 0 4px 20px rgba(31, 56, 100, 0.12);
}

.team-card-featured .team-portrait {
  width: 140px;
  height: 140px;
}

.team-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-portrait-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
}

.team-card-body {
  padding: 16px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.team-card-featured .team-card-body {
  padding: 28px 28px 28px 0;
  justify-content: center;
}

@media (max-width: 639px) {
  .team-card-featured .team-card-body { padding: 0 20px 24px; }
}

.team-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  margin-bottom: 8px;
}

.team-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.team-card-featured .team-name { font-size: 1.35rem; }

.team-role {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(192, 0, 0, 0.08);
  color: var(--accent);
}

.team-ministry {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #334155;
  font-weight: 500;
}

.team-activity-tags {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-activity-tags li {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--primary);
  font-weight: 600;
}

.team-gallery { margin-top: auto; padding-top: 12px; border-top: 1px solid #f1f5f9; }

.team-gallery-label {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.team-gallery-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-gallery-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: transform 0.15s, box-shadow 0.15s;
}

.team-gallery-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(31, 56, 100, 0.12);
}

.team-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Legacy member grid (unused on team page) */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.member-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.member-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-initial { color: #fff; font-size: 1.5rem; font-weight: 700; }
.member-name { margin: 0; font-size: 1rem; font-weight: 700; }
.member-role { margin: 4px 0 0; font-size: 0.8rem; color: var(--accent); font-weight: 600; }
.member-bio { margin: 8px 0 0; font-size: 0.8rem; color: var(--muted); }

/* Photos */
.page-title-center { text-align: center; }
.page-desc-center { text-align: center; margin-top: -8px; }

.photos-all { max-width: 1100px; margin: 0 auto; }
.photos-day-group { margin-top: 36px; }
.photos-day-group:first-of-type { margin-top: 24px; }
.photos-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}
.photos-day-link {
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.photos-day-link:hover .photos-day-title { color: var(--accent); }
.photos-day-date {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.photos-day-title,
.photos-day-title-only {
  display: block;
  margin: 2px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.photos-day-title-only { margin: 0; padding-left: 12px; border-left: 4px solid #cbd5e1; }
.photos-day-count {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.photos-day-group .photo-grid { margin-top: 0; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
}

.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.photo-item:hover img { transform: scale(1.05); }
.photo-grid-day {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.photo-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.photo-card .photo-item { aspect-ratio: 4/3; }
.photo-caption {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text);
  font-weight: 500;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Videos / Shorts */
.section-videos { background: #fff; border-top: 1px solid #e2e8f0; max-width: none; }
.video-shorts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
}
.video-shorts-grid--group { margin-bottom: 16px; }
.video-card {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 320px;
}
.video-card--portrait { max-width: 280px; }
.video-card--landscape { max-width: min(640px, 100%); }
.video-frame {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow);
}
.video-card--portrait .video-frame { aspect-ratio: 9 / 16; }
.video-card--landscape .video-frame { aspect-ratio: 16 / 9; }
.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000;
}
.video-caption {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
  text-align: center;
}
.video-aspect-label {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
}

.photo-date {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 8px;
  font-size: 0.65rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox img { max-height: 90vh; max-width: 100%; object-fit: contain; border-radius: 8px; }
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
  max-width: 90%;
}

/* Forms */
.login-section { display: flex; justify-content: center; }
.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.login-title { margin: 0; font-size: 1.5rem; }
.login-desc { margin: 8px 0 24px; color: var(--muted); font-size: 0.9rem; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-hint { margin-top: 20px; font-size: 0.85rem; text-align: center; }

.form-label { display: flex; flex-direction: column; gap: 6px; font-size: 0.875rem; font-weight: 600; }
.form-label input, .form-label select {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover { opacity: 0.9; }
.btn-full { width: 100%; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.empty-box {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  background: #fff;
}

.empty-title { font-weight: 700; margin: 0; }
.empty-desc { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; }

/* Admin */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.admin-stat {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.admin-stat-num { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); }
.admin-stat span:last-child { font-size: 0.85rem; color: var(--muted); }

.admin-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) { .admin-links { grid-template-columns: repeat(2, 1fr); } }

.admin-link-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}

.admin-link-card:hover { transform: translateY(-2px); }
.admin-link-card span { font-size: 0.85rem; color: var(--muted); }
.admin-link-muted { opacity: 0.8; }

.breadcrumb { margin: 0 0 16px; font-size: 0.875rem; }
.breadcrumb a { color: var(--accent); }

.upload-form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }

/* Admin extended */
.admin-section { max-width: 960px; }
.admin-scroll-target {
  scroll-margin-top: 88px;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto 24px;
  max-width: 960px;
  padding: 0 20px;
}
.admin-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  background: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.admin-nav a.active { background: var(--primary); color: #fff; }
.admin-nav-muted { opacity: 0.75; }

.admin-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.admin-panel-title { margin: 0 0 16px; font-size: 1.1rem; font-weight: 700; }
.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (min-width: 640px) { .admin-form-grid { grid-template-columns: 1fr 1fr; } }
.admin-form-full { grid-column: 1 / -1; }
.form-label textarea { padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; min-height: 60px; resize: vertical; }
.form-check { flex-direction: row; align-items: center; gap: 8px; }
.form-check input { width: auto; }

.admin-table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.admin-table th { background: #f1f5f9; font-weight: 600; }
.admin-table-actions { white-space: nowrap; }

.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-danger { background: #b91c1c; color: #fff; border: none; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600; }
.btn-link { color: var(--accent); font-weight: 600; font-size: 0.875rem; }
.btn-link-muted { color: var(--muted); font-size: 0.875rem; }

.admin-card-list { display: flex; flex-direction: column; gap: 16px; }
.admin-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
}
@media (max-width: 640px) { .admin-card { grid-template-columns: 1fr; } }
.admin-card-thumb { border-radius: 12px; overflow: hidden; background: #e2e8f0; aspect-ratio: 16/10; }
.admin-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-card-thumb-round { width: 80px; height: 80px; border-radius: 50%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: var(--primary); }
.admin-card-thumb-round img { width: 100%; height: 100%; object-fit: cover; }
.admin-member-edit { align-items: start; position: relative; }
.admin-sort-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}
.admin-item-order {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}
.admin-inline-delete { margin-top: 8px; }
.admin-btn-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.admin-member-pick { border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px; margin: 12px 0; }
.admin-member-pick legend { font-weight: 600; font-size: 0.85rem; padding: 0 6px; }
.admin-member-pick-compact { margin-top: 8px; }
.admin-check-toolbar {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
}
.admin-check-master { font-weight: 600; color: var(--primary); }
.admin-check-grid { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.admin-check { font-size: 0.85rem; font-weight: 500; display: flex; align-items: center; gap: 6px; }

.admin-schedule-item { position: relative; padding-bottom: 40px; }
.admin-stats-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .admin-stats-4 { grid-template-columns: repeat(4, 1fr); } }

.admin-photo-list { display: flex; flex-direction: column; gap: 16px; }
.admin-photo-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 16px;
  background: #fff;
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  align-items: start;
}
@media (max-width: 640px) { .admin-photo-row { grid-template-columns: 1fr; } }
.admin-photo-thumb { display: block; border-radius: 8px; overflow: hidden; }
.admin-photo-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.admin-panel-hint {
  margin: -4px 0 12px;
  font-size: 0.82rem;
  color: var(--muted);
}
.admin-video-preview {
  position: relative;
  width: 120px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
  flex-shrink: 0;
}
.admin-video-preview img,
.admin-video-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-video-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
}
.admin-video-row { align-items: flex-start; }

.timeline-members { margin: 8px 0 0; font-size: 0.85rem; color: var(--primary); font-weight: 600; }
