/* ===== Design Tokens ===== */
/* Light mode applied before :root to allow overrides */
:root[data-theme="light"] {
  --bg:     #f8f8f8;
  --bg-2:   #efefef;
  --bg-3:   #e2e2e2;
  --border: #d0d0d0;
  --text:   #111111;
  --muted:  #5a5a5a;
  --shadow: 0 8px 32px rgba(0,0,0,.08);
}
:root {
  --bg:          #0a0a0a;
  --bg-2:        #141414;
  --bg-3:        #1e1e1e;
  --border:      #252525;
  --text:        #ebebeb;
  --muted:       #888;
  --accent:      #7c3aed;
  --accent-h:    #6d28d9;
  --accent-10:   rgba(124,58,237,.10);
  --accent-30:   rgba(124,58,237,.30);
  --success:     #10b981;
  --error:       #ef4444;
  --r:           8px;
  --r-lg:        16px;
  --shadow:      0 8px 32px rgba(0,0,0,.5);
  --t:           .18s ease;
  --sans:        -apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;
  --mono:        'SF Mono','Fira Code',Consolas,monospace;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ===== Layout ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== Nav ===== */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
[data-theme="light"] nav { background: rgba(248,248,248,.88); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; max-width: 1100px; margin: 0 auto; padding: 0 24px;
}
.nav-logo { font-weight: 700; font-size: 1.1rem; letter-spacing: -.03em; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: var(--muted); font-size: .875rem; transition: color var(--t); }
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
/* Nav controls (theme + lang) */
.nav-controls { display: flex; align-items: center; gap: 6px; }
.nav-ctrl-btn {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: 3px 10px; border-radius: 100px; font-size: .75rem; font-weight: 600;
  cursor: pointer; transition: all var(--t); letter-spacing: .04em; line-height: 1.6;
  display: flex; align-items: center; gap: 4px;
}
.nav-ctrl-btn:hover { border-color: var(--accent); color: var(--accent); }
/* Instagram section on blog */
.insta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.insta-placeholder {
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 40px 24px; text-align: center; color: var(--muted);
  transition: border-color var(--t);
}
.insta-placeholder:hover { border-color: var(--accent); }
.insta-placeholder svg { margin: 0 auto 12px; }
.insta-placeholder p { font-size: .9rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r);
  font-size: .875rem; font-weight: 500; border: none;
  cursor: pointer; transition: all var(--t); text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { opacity: .85; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  overflow: hidden;
  background: #000;
}

/* 비디오 배경 */
.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .55;
}
/* 그라디언트 오버레이 */
.hero-video-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(10,10,10,.45) 0%,
      rgba(10,10,10,.15) 45%,
      rgba(10,10,10,.65) 100%),
    radial-gradient(ellipse 70% 55% at 50% 50%,
      rgba(124,58,237,.18) 0%,
      transparent 70%);
}

/* 콘텐츠 레이어 */
.hero-content {
  position: relative;
  z-index: 1;
  padding: 120px 24px 140px;
  width: 100%;
}

/* 애니메이션 */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-badge  { animation: heroFadeUp .75s cubic-bezier(.22,.68,0,1.2) both; animation-delay: .15s; }
.hero h1     { animation: heroFadeUp .75s cubic-bezier(.22,.68,0,1.2) both; animation-delay: .28s; }
.hero p      { animation: heroFadeUp .75s cubic-bezier(.22,.68,0,1.2) both; animation-delay: .40s; }
.hero-actions { animation: heroFadeUp .75s cubic-bezier(.22,.68,0,1.2) both; animation-delay: .52s; }

.hero-badge {
  display: inline-block;
  background: rgba(124,58,237,.2);
  color: #c4b5fd;
  border: 1px solid rgba(124,58,237,.45);
  padding: 5px 16px; border-radius: 100px;
  font-size: .75rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; margin-bottom: 24px;
  backdrop-filter: blur(8px);
}
.hero h1 {
  font-size: clamp(2.6rem,6.5vw,4.8rem);
  font-weight: 800; letter-spacing: -.05em;
  line-height: 1.08; margin-bottom: 20px;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0,0,0,.4);
}
.hero h1 .accent { color: var(--accent); }
.hero p {
  font-size: 1.1rem; color: rgba(235,235,235,.82);
  max-width: 520px; margin: 0 auto 40px;
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
  line-height: 1.75;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* outline 버튼: 비디오 위에서 가독성 확보 */
.hero .btn-outline {
  border-color: rgba(255,255,255,.35);
  color: #fff;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,.06);
}
.hero .btn-outline:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(124,58,237,.1);
}

/* 스크롤 인디케이터 */
.hero-scroll {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: rgba(255,255,255,.35);
  animation: heroScrollBounce 2.2s ease-in-out infinite;
}
@keyframes heroScrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: .35; }
  50%       { transform: translateX(-50%) translateY(8px); opacity: .7; }
}

/* ===== Home Sections (관리자 편집 카드) ===== */
.home-section { padding: 72px 0; border-top: 1px solid var(--border); }
.home-section-alt { background: var(--bg-2); }
.home-card, .home-card-no-link {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  color: inherit; text-decoration: none;
}
.home-card-no-link { cursor: default; }
.home-section:nth-child(even) .home-card,
.home-section:nth-child(even) .home-card-no-link { direction: rtl; }
.home-section:nth-child(even) .home-card > *,
.home-section:nth-child(even) .home-card-no-link > * { direction: ltr; }
.home-card-img {
  width: 100%; aspect-ratio: 4/3;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-3);
}
.home-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-card-img-empty { border: 2px dashed var(--border); }
.home-card-body h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800; letter-spacing: -.04em;
  line-height: 1.2; margin-bottom: 16px;
}
.home-card-body p { color: var(--muted); font-size: 1rem; line-height: 1.8; margin-bottom: 20px; }
.home-card-link { font-size: .9rem; color: var(--accent); font-weight: 600; }
a.home-card:hover .home-card-link { text-decoration: underline; }
a.home-card:hover .home-card-img img { transform: scale(1.03); transition: transform .4s ease; }
@media (max-width: 768px) {
  .home-card, .home-card-no-link { grid-template-columns: 1fr; gap: 28px; }
  .home-section:nth-child(even) .home-card,
  .home-section:nth-child(even) .home-card-no-link { direction: ltr; }
}

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section-header { margin-bottom: 48px; display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.section-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 6px; }
.section-title { font-size: clamp(1.6rem,3.5vw,2.2rem); font-weight: 700; letter-spacing: -.04em; }
.section-link { font-size: .85rem; color: var(--muted); border-bottom: 1px solid transparent; transition: all var(--t); white-space: nowrap; }
.section-link:hover { color: var(--text); border-color: var(--text); }

/* ===== Cards ===== */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill,minmax(420px,1fr)); }

.card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  transition: all var(--t); display: flex; flex-direction: column;
}
.card:hover { border-color: var(--accent-30); transform: translateY(-2px); box-shadow: 0 12px 40px var(--accent-10); }
.card-thumb {
  width: 100%; height: 190px; object-fit: cover;
  background: linear-gradient(135deg,var(--bg-3),var(--bg-2));
}
.card-thumb-placeholder {
  width: 100%; height: 190px;
  background: linear-gradient(135deg,var(--bg-3),var(--bg-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--border);
}
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-type { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 6px; }
.card-title { font-size: 1rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; line-height: 1.35; }
.card-excerpt { font-size: .85rem; color: var(--muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-date { font-size: .75rem; color: var(--border); margin-top: 14px; }
a.card:hover .card-title { color: var(--accent); }

/* ===== Page Header ===== */
.page-header { padding: 72px 0 52px; border-bottom: 1px solid var(--border); margin-bottom: 60px; }
.page-header h1 { font-size: clamp(2rem,5vw,3rem); font-weight: 800; letter-spacing: -.05em; margin-bottom: 10px; }
.page-header p { color: var(--muted); font-size: 1rem; }

/* ===== Filter Tabs ===== */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-tab {
  padding: 7px 18px; border-radius: 100px;
  font-size: .8rem; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  transition: all var(--t);
}
.filter-tab:hover { border-color: var(--accent-30); color: var(--text); }
.filter-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 64px; align-items: start; }
.about-photo {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--r-lg); border: 1px solid var(--border);
}
.about-photo-placeholder {
  width: 100%; aspect-ratio: 1;
  background: var(--bg-3); border-radius: var(--r-lg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem; color: var(--border);
}
.about-text h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.04em; margin-bottom: 16px; }
.about-text p { color: var(--muted); margin-bottom: 16px; line-height: 1.75; }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.skill-chip {
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--muted); padding: 4px 13px; border-radius: 100px; font-size: .78rem;
}

/* ===== Post Content ===== */
.post-container { max-width: 740px; margin: 0 auto; padding: 60px 24px 100px; }
.post-meta { color: var(--muted); font-size: .85rem; margin-bottom: 32px; }
.post-cover { width: 100%; border-radius: var(--r-lg); margin-bottom: 40px; border: 1px solid var(--border); }
.post-content h2 { font-size: 1.45rem; font-weight: 700; margin: 2em 0 .7em; letter-spacing: -.03em; }
.post-content h3 { font-size: 1.15rem; font-weight: 600; margin: 1.6em 0 .5em; }
.post-content p { margin-bottom: 1.15em; color: var(--text); line-height: 1.8; }
.post-content a { color: var(--accent); border-bottom: 1px solid var(--accent-30); }
.post-content a:hover { border-color: var(--accent); }
.post-content code {
  background: var(--bg-3); padding: 2px 7px; border-radius: 4px;
  font-family: var(--mono); font-size: .875em;
}
.post-content pre {
  background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--r);
  padding: 16px; overflow-x: auto; margin-bottom: 1.3em;
}
.post-content pre code { background: none; padding: 0; }
.post-content img { border-radius: var(--r); margin: 1.5em 0; }
.post-content ul, .post-content ol { padding-left: 1.5em; margin-bottom: 1.2em; }
.post-content li { margin-bottom: .3em; color: var(--text); }
.post-content blockquote {
  border-left: 3px solid var(--accent); padding-left: 1em;
  color: var(--muted); margin: 1.5em 0; font-style: italic;
}
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

/* ===== Blog list ===== */
.blog-item {
  display: flex; gap: 20px; padding: 28px 0;
  border-bottom: 1px solid var(--border);
  transition: all var(--t);
}
.blog-item:hover .blog-title { color: var(--accent); }
.blog-thumb { width: 120px; height: 80px; object-fit: cover; border-radius: var(--r); flex-shrink: 0; background: var(--bg-3); }
.blog-info { flex: 1; }
.blog-title { font-size: 1rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: 6px; transition: color var(--t); }
.blog-excerpt { font-size: .85rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-date { font-size: .75rem; color: var(--border); margin-top: 8px; }

/* ===== Blog card ===== */
.blog-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  border-color: var(--accent) !important;
}

/* ===== Footer ===== */
footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: .85rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1100px; margin: 0 auto; padding: 0 24px; flex-wrap: wrap; gap: 16px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); transition: color var(--t); }
.footer-links a:hover { color: var(--text); }

/* ===== States ===== */
.loading { display: flex; align-items: center; justify-content: center; padding: 80px 0; color: var(--muted); gap: 12px; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 80px 24px; color: var(--muted); }
.empty-icon { font-size: 3rem; margin-bottom: 16px; }

/* ===== Toast ===== */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  background: var(--bg-3); border: 1px solid var(--border); color: var(--text);
  padding: 12px 18px; border-radius: var(--r); font-size: .85rem;
  box-shadow: var(--shadow); animation: slideIn .25s ease; max-width: 320px;
  pointer-events: auto;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--error); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== Admin ===== */
.admin-body { display: flex; min-height: 100vh; background: var(--bg); }
.sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--bg-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo { padding: 24px 20px; font-weight: 700; font-size: 1rem; border-bottom: 1px solid var(--border); }
.sidebar-logo span { color: var(--accent); }
.sidebar-nav { flex: 1; padding: 12px 8px; }
.sidebar-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: var(--r); background: transparent;
  border: none; color: var(--muted); font-size: .875rem; text-align: left;
  cursor: pointer; transition: all var(--t);
}
.sidebar-btn:hover { background: var(--bg-3); color: var(--text); }
.sidebar-btn.active { background: var(--accent-10); color: var(--accent); }
.sidebar-btn svg { flex-shrink: 0; }
.sidebar-footer { padding: 16px 8px; border-top: 1px solid var(--border); }
.admin-main { flex: 1; padding: 40px 48px; overflow-y: auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.admin-header h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.04em; }

/* Admin login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 40px; width: 100%; max-width: 380px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.04em; margin-bottom: 6px; }
.login-card p { color: var(--muted); font-size: .875rem; margin-bottom: 28px; }

/* Form elements */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--r); padding: 10px 14px; font-size: .9rem; font-family: inherit;
  transition: border-color var(--t);
}
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 300px; font-family: var(--mono); font-size: .85rem; line-height: 1.6; }
.form-select option { background: var(--bg-3); }

/* Admin table */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { padding: 10px 16px; text-align: left; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: .875rem; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-3); }
.status-badge { display: inline-block; padding: 2px 10px; border-radius: 100px; font-size: .72rem; font-weight: 600; }
.status-published { background: rgba(16,185,129,.12); color: var(--success); }
.status-draft { background: var(--bg-3); color: var(--muted); }

/* Media grid */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); gap: 12px; }
.media-item { position: relative; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--bg-3); cursor: pointer; transition: all var(--t); }
.media-item:hover { border-color: var(--accent-30); }
.media-item img { width: 100%; height: 110px; object-fit: cover; }
.media-item .media-name { padding: 6px 8px; font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-item .media-del { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.7); border: none; color: #fff; border-radius: 4px; padding: 2px 6px; font-size: .7rem; cursor: pointer; opacity: 0; transition: opacity var(--t); }
.media-item:hover .media-del { opacity: 1; }

/* Upload drop zone */
.drop-zone {
  border: 2px dashed var(--border); border-radius: var(--r-lg);
  padding: 48px 24px; text-align: center; color: var(--muted);
  transition: all var(--t); cursor: pointer; margin-bottom: 24px;
}
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--accent); color: var(--text); background: var(--accent-10); }

/* About 프로필 이미지 드롭존 */
.about-photo-drop {
  border: 2px dashed var(--border); border-radius: var(--r-lg);
  padding: 28px 24px; text-align: center; color: var(--muted);
  transition: all var(--t); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.about-photo-drop p { font-size: .875rem; }
.about-photo-drop:hover,
.about-photo-drop.drag-over { border-color: var(--accent); color: var(--text); background: var(--accent-10); }
.drop-zone p { font-size: .9rem; margin-top: 8px; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 500; display: flex; align-items: flex-start; justify-content: flex-end; }
.modal { background: var(--bg-2); border-left: 1px solid var(--border); width: min(600px,100vw); height: 100vh; overflow-y: auto; padding: 36px 40px; animation: slideRight .25s ease; }
@keyframes slideRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.modal-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -.03em; }

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 100px; cursor: pointer; transition: background var(--t); }
.toggle-slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform var(--t); }
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Cover image picker */
.cover-picker { display: grid; grid-template-columns: repeat(auto-fill,minmax(100px,1fr)); gap: 8px; max-height: 240px; overflow-y: auto; padding: 4px; }
.cover-option { border: 2px solid transparent; border-radius: var(--r); overflow: hidden; cursor: pointer; transition: border-color var(--t); }
.cover-option img { width: 100%; height: 70px; object-fit: cover; }
.cover-option.selected { border-color: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero-content { padding: 100px 16px 120px; }
  .hero h1 { font-size: 2.4rem; }
  .section { padding: 56px 0; }
  .footer-inner { flex-direction: column; text-align: center; }
  .nav-links { gap: 16px; }
  .sidebar { width: 180px; }
  .admin-main { padding: 24px 20px; }
  .blog-item { flex-direction: column; }
  .blog-thumb { width: 100%; height: 160px; }
  #posts-grid { grid-template-columns: 1fr !important; }
  .modal { width: 100vw; }
}
@media (max-width: 540px) {
  .sidebar { display: none; }
  .admin-main { padding: 20px 16px; }
}

/* ===== 세미나 섹션 (홈) ===== */
.seminar-section {
  padding: 96px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}
.seminar-section-header {
  text-align: center;
  margin-bottom: 56px;
}
.seminar-section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.seminar-section-header p {
  color: var(--muted);
  font-size: 1.05rem;
}
.seminar-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-10);
  border: 1px solid var(--accent-30);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 16px;
}
.seminar-cards {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.seminar-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 340px 1fr;
  transition: box-shadow var(--t);
}
.seminar-card:hover {
  box-shadow: var(--shadow);
}
.seminar-card-img {
  width: 100%;
  /* 4:5 비율 유지, 이미지 잘림 없음 */
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-3);
  flex-shrink: 0;
  position: relative; /* stamp 위치 기준 */
}
.seminar-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg-3);
  transition: transform .4s ease;
}
.seminar-card:hover .seminar-card-img img { transform: scale(1.02); }
.seminar-card-closed .seminar-card-img img {
  filter: grayscale(1) brightness(.85);
  transition: filter .3s ease, transform .4s ease;
}
.seminar-card-img-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--border);
}
.seminar-card-body {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.seminar-card-title {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.35;
}
.seminar-card-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.seminar-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  color: var(--muted);
}
.seminar-meta-item svg { flex-shrink: 0; }
.seminar-price { color: var(--accent); font-weight: 600; }
.seminar-card-desc {
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.7;
  /* 가로형이므로 줄 수 제한 해제 */
  display: block;
}
.seminar-apply-btn { align-self: flex-start; }

/* ===== 이미지 라이트박스 ===== */
#lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  animation: lb-in .18s ease;
}
@keyframes lb-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
#lightbox-img {
  max-width: 100%; max-height: 90vh;
  object-fit: contain;
  border-radius: var(--r);
  box-shadow: 0 24px 80px rgba(0,0,0,.8);
  cursor: default;
  animation: lb-scale .2s ease;
}
@keyframes lb-scale {
  from { transform: scale(.94); }
  to   { transform: scale(1); }
}
#lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: 1.1rem; line-height: 1;
  width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
#lightbox-close:hover { background: rgba(255,255,255,.25); }

/* 이미지 호버 줌 힌트 */
.seminar-card-img-clickable {
  position: relative; cursor: zoom-in;
}
.seminar-img-zoom-hint {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  background: rgba(0,0,0,.0);
  opacity: 0;
  transition: opacity .2s, background .2s;
}
.seminar-card-img-clickable:hover .seminar-img-zoom-hint {
  opacity: 1;
  background: rgba(0,0,0,.35);
}

/* ===== 세미나 신청 모달 ===== */
.seminar-modal { max-width: 640px; }
.seminar-modal-info { margin-bottom: 20px; }
.seminar-modal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  background: var(--bg-3);
  border-radius: var(--r);
  padding: 12px 16px;
  font-size: .875rem;
}
.seminar-modal-meta strong {
  width: 100%;
  font-size: 1rem;
  margin-bottom: 2px;
}
.seminar-modal-meta span { color: var(--muted); }
.seminar-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.seminar-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}
.seminar-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.seminar-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.seminar-check-text { font-size: .9rem; }
.required { color: var(--error); }

/* ===== 접수 마감 도장 ===== */
.seminar-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-24deg);
  z-index: 4;
  pointer-events: none;
  user-select: none;

  /* 도장 테두리 – 이중 프레임 */
  border: 4px solid rgba(198, 28, 28, 0.82);
  outline: 2px solid rgba(198, 28, 28, 0.28);
  outline-offset: 3px;
  border-radius: 4px;

  padding: 10px 22px;
  background: rgba(198, 28, 28, 0.06);

  /* 텍스트 */
  color: rgba(198, 28, 28, 0.88);
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: .22em;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;

  /* 잉크 번짐 느낌 */
  text-shadow:
    0 0 6px rgba(198, 28, 28, .35),
    0 0 1px rgba(198, 28, 28, .6);
  box-shadow:
    inset 0 0 0 1px rgba(198, 28, 28, .15),
    0 0 18px rgba(198, 28, 28, .12);

  /* 라이트 모드: multiply 로 이미지 위에 자연스럽게 */
  mix-blend-mode: multiply;
}

/* 다크 모드: multiply 대신 normal */
[data-theme="dark"] .seminar-stamp {
  mix-blend-mode: normal;
  color: rgba(255, 85, 85, 0.9);
  border-color: rgba(255, 85, 85, 0.82);
  outline-color: rgba(255, 85, 85, 0.25);
  background: rgba(255, 85, 85, 0.08);
  text-shadow:
    0 0 8px rgba(255, 85, 85, .5),
    0 0 1px rgba(255, 85, 85, .7);
  box-shadow:
    inset 0 0 0 1px rgba(255, 85, 85, .15),
    0 0 22px rgba(255, 85, 85, .18);
}

/* ===== 세미나 카드 – 클릭 가능 바디 ===== */
.seminar-card-body {
  cursor: pointer;
}
.seminar-card-body:hover {
  background: var(--bg-2);
}

/* 접수 완료 배지 */
.seminar-sold-out-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border-radius: 100px;
  padding: 5px 14px;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(231,76,60,.4);
}

/* 마감된 카드 - 약간 어둡게 */
.seminar-card-closed {
  opacity: .92;
}
.seminar-card-closed .seminar-card-title {
  color: var(--muted);
}

/* 버튼 그룹 (신청/대기/다음회차) */
.seminar-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  align-items: center;
}
.seminar-detail-hint {
  font-size: .82rem;
  color: var(--accent);
  font-weight: 500;
  margin-left: auto;
  white-space: nowrap;
}

/* ===== 세미나 상세 모달 ===== */
.seminar-detail-modal {
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
}
.seminar-detail-img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  background: var(--bg-3);
  border-radius: var(--r);
  margin-bottom: 24px;
  cursor: zoom-in;
  display: block;
}
.seminar-detail-closed-banner {
  background: linear-gradient(135deg, #e74c3c22, #c0392b11);
  border: 1px solid #e74c3c55;
  border-radius: var(--r);
  color: #e74c3c;
  font-size: .88rem;
  font-weight: 600;
  padding: 10px 16px;
  text-align: center;
  margin-bottom: 8px;
}
.seminar-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-3);
  border-radius: var(--r);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.seminar-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--muted);
}
.seminar-detail-meta-item svg { flex-shrink: 0; color: var(--accent); }
.seminar-detail-desc {
  font-size: .95rem;
  color: var(--text);
  line-height: 1.8;
  white-space: pre-wrap;
  margin-bottom: 8px;
}

/* ===== 관리자 통계 패널 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stats-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}
.stats-card-accent {
  background: linear-gradient(135deg, var(--accent-10), var(--bg-2));
  border-color: var(--accent-30);
}
.stats-card-label {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.stats-card-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}
.stats-card-accent .stats-card-value { color: var(--accent); }
.stats-card-sub {
  font-size: .78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.stats-diff {
  font-weight: 600;
  font-size: .76rem;
  padding: 1px 6px;
  border-radius: 100px;
}
.stats-diff-up   { color: #22c55e; background: rgba(34,197,94,.12); }
.stats-diff-down { color: #ef4444; background: rgba(239,68,68,.12); }
.stats-diff-flat { color: var(--muted); }

.stats-section {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.stats-section-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* 막대 차트 */
.stats-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 130px;
}
.stats-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 4px;
}
.stats-bar-val {
  font-size: .68rem;
  color: var(--muted);
  height: 14px;
  line-height: 14px;
}
.stats-bar {
  width: 100%;
  background: var(--accent-30);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height .4s ease;
}
.stats-bar-today { background: var(--accent); }
.stats-bar-label {
  font-size: .65rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}
.stats-bar-label b { color: var(--accent); font-weight: 700; }

/* 인기 페이지 */
.stats-page-list { display: flex; flex-direction: column; gap: 8px; }
.stats-page-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .875rem;
}
.stats-page-rank {
  width: 20px; height: 20px;
  background: var(--bg-3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: var(--muted);
  flex-shrink: 0;
}
.stats-page-path {
  flex: 1;
  color: var(--text);
  font-family: monospace;
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-page-count {
  color: var(--accent);
  font-weight: 600;
  font-size: .82rem;
  flex-shrink: 0;
}

/* 콘텐츠 현황 */
.stats-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}
.stats-content-card {
  background: var(--bg-3);
  border-radius: var(--r);
  padding: 16px;
  text-align: center;
}
.stats-content-icon { font-size: 1.5rem; margin-bottom: 8px; }
.stats-content-val  { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 4px; }
.stats-content-label { font-size: .75rem; color: var(--muted); }

/* ===== 관리자 등록 탭 ===== */
.reg-tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.reg-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 8px 16px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: color var(--t), border-color var(--t);
  border-radius: var(--r) var(--r) 0 0;
}
.reg-tab-btn:hover { color: var(--text); }
.reg-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===== 관리자 세미나 UI ===== */
.seminar-form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.reg-select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r);
  padding: 4px 8px;
  font-size: .8rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--t);
}
.reg-select:hover { border-color: var(--accent); }
.reg-select:focus { outline: none; border-color: var(--accent); }

.reg-notes-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: .8rem;
  color: var(--accent);
  cursor: pointer;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  text-align: left;
}
.reg-notes-btn:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .seminar-card {
    grid-template-columns: 1fr;
  }
  .seminar-card-img {
    /* 모바일에서는 1:1 비율로 */
    aspect-ratio: 1 / 1;
    width: 100%;
  }
  .seminar-card-body {
    padding: 24px;
  }
}
@media (max-width: 680px) {
  .seminar-form-grid { grid-template-columns: 1fr; }
  .seminar-form-row { flex-direction: column; }
}
