/* ============================================================
   DAiLIST 사이트 공통 스타일 (site_example_dailist 기준 이식)
   - 디자인 토큰, 레이아웃, 헤더/푸터, 버튼/카드/폼/관리자 레이아웃
   ============================================================ */

/* ---------- 디자인 토큰 (색상, 반경) ---------- */
:root {
  --background: hsl(220, 20%, 98%);
  --foreground: hsl(222, 47%, 11%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(222, 47%, 11%);
  --primary: hsl(225, 71%, 15%);
  --primary-foreground: hsl(210, 40%, 98%);
  --secondary: hsl(220, 14%, 96%);
  --secondary-foreground: hsl(222, 47%, 11%);
  --muted: hsl(220, 14%, 96%);
  --muted-foreground: hsl(220, 9%, 46%);
  --accent: hsl(172, 66%, 50%);
  --accent-foreground: hsl(0, 0%, 100%);
  --destructive: hsl(0, 84%, 60%);
  --destructive-foreground: hsl(210, 40%, 98%);
  --success: hsl(160, 60%, 45%);
  --success-foreground: hsl(0, 0%, 100%);
  --warning: hsl(38, 92%, 50%);
  --warning-foreground: hsl(0, 0%, 100%);
  --border: hsl(220, 13%, 91%);
  --input: hsl(220, 13%, 91%);
  --ring: hsl(172, 66%, 50%);
  --radius: 0.75rem;
  /* 관리자 사이드바 전용 */
  --sidebar-bg: hsl(225, 71%, 10%);
  --sidebar-fg: hsl(210, 40%, 95%);
  --sidebar-primary: hsl(172, 66%, 50%);
  --sidebar-accent: hsl(225, 50%, 18%);
  --sidebar-border: hsl(225, 50%, 20%);
}

/* ---------- 리셋 및 기본 타이포 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--background); color: var(--foreground); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ---------- 레이아웃: 컨테이너, flex, grid ---------- */
.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
@media (max-width: 768px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
}
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.shrink-0 { flex-shrink: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 텍스트: 정렬, 크기, 굵기 ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-6xl { font-size: 3.75rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'Courier New', monospace; }
.leading-tight { line-height: 1.25; }
.tracking-tight { letter-spacing: -0.025em; }

/* ---------- 색상 유틸 ---------- */
.text-primary { color: var(--primary); }
.text-primary-fg { color: var(--primary-foreground); }
.text-accent { color: var(--accent); }
.text-muted-fg { color: var(--muted-foreground); }
.text-foreground { color: var(--foreground); }
.text-destructive { color: var(--destructive); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-sidebar-primary { color: var(--sidebar-primary); }
.text-sidebar-fg { color: var(--sidebar-fg); }
.bg-primary { background: var(--primary); }
.bg-background { background: var(--background); }
.bg-muted { background: var(--muted); }
.bg-card { background: var(--card); }
.bg-accent { background: var(--accent); }
.bg-destructive { background: var(--destructive); }
.bg-success { background: var(--success); }
.bg-warning { background: var(--warning); }
.bg-secondary { background: var(--secondary); }

/* ---------- 사이트 헤더 (상단 네비/로고) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 249, 252, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 4rem; padding: 0 1rem;
  max-width: 1400px; margin: 0 auto;
}
.site-header .logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.025em; }
.site-header nav { display: flex; align-items: center; gap: 1.5rem; font-size: 0.875rem; font-weight: 500; }
.site-header nav a { color: var(--muted-foreground); transition: color 0.2s; }
.site-header nav a:hover { color: var(--foreground); }
.site-header .actions { display: flex; align-items: center; gap: 0.5rem; }

/* ---------- 공개 사이트 상단 네비 (레시핏식: 좌 메뉴 / 가운데 로고 / 우 계정) ---------- */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 249, 252, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.app-nav.scrolled {
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
}
.app-nav .app-nav-container { position: relative; }
.app-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  padding: 0.25rem 0;
}
.app-nav .nav-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  min-width: 0;
}
.app-nav .nav-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
.app-nav .nav-center-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  white-space: nowrap;
  z-index: 1;
}
.app-nav .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem;
}
.app-nav .nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: background 0.2s, color 0.2s;
}
.app-nav .nav-link:hover {
  background: rgba(45, 212, 191, 0.1);
  color: var(--foreground);
}
.app-nav .nav-link.active {
  background: var(--primary);
  color: var(--primary-foreground);
}
.app-nav .user-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.dailist-only-desktop {
  display: none;
}
@media (min-width: 769px) {
  .dailist-only-desktop {
    display: inline-flex;
  }
}
.app-nav .nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
}
.app-nav .nav-hamburger:hover {
  background: var(--muted);
  color: var(--foreground);
}
.app-nav .nav-hamburger-bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.app-nav.nav-mobile-open .nav-hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.app-nav.nav-mobile-open .nav-hamburger-bar:nth-child(2) {
  opacity: 0;
}
.app-nav.nav-mobile-open .nav-hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.app-nav .nav-mobile-menu {
  display: none;
  flex-direction: column;
  padding: 0.35rem 0 0.75rem;
  border-top: 1px solid var(--border);
  background: rgba(248, 249, 252, 0.98);
}
.app-nav .nav-mobile-menu[aria-hidden="false"] {
  display: flex;
}
.app-nav .nav-mobile-user {
  padding: 0.5rem 0.25rem 0.65rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
.app-nav .nav-mobile-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: calc(var(--radius) - 2px);
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}
.app-nav .nav-mobile-link:hover {
  background: rgba(45, 212, 191, 0.12);
  color: var(--foreground);
}
.app-nav .nav-mobile-link.active {
  background: var(--primary);
  color: var(--primary-foreground);
}
.app-nav .nav-mobile-link-admin {
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
}
@media (min-width: 769px) {
  .app-nav .nav-mobile-menu {
    display: none !important;
    border-top: none;
    padding: 0;
  }
}
@media (max-width: 768px) {
  .app-nav .nav-links {
    display: none;
  }
  .app-nav .nav-hamburger {
    display: flex;
  }
  .app-nav .user-info .btn-sm {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }
}

/* ---------- 사이트 푸터 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--muted);
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem; font-weight: 500;
  border: none; transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-secondary:hover { opacity: 0.8; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--foreground); }
.btn-outline:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--muted); }
.btn-destructive { background: var(--destructive); color: var(--destructive-foreground); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.625rem 2rem; font-size: 0.9375rem; }
.btn-icon { width: 2.5rem; height: 2.5rem; padding: 0; }
.btn-icon.sm { width: 2.25rem; height: 2.25rem; }

/* 관리자 레시피 재료/영양 버튼 색상 */
.btn-admin-ingredient-map { background: rgba(187, 247, 208, 0.5); border: 1px solid #86efac; color: #15803d; }
.btn-admin-ingredient-map:hover { background: #bbf7d0; color: #166534; }
.btn-admin-unit-map { background: rgba(134, 239, 172, 0.4); border: 1px solid #22c55e; color: #15803d; }
.btn-admin-unit-map:hover { background: #86efac; color: #166534; }
.btn-admin-nutrition-calc { background: rgba(22, 163, 74, 0.15); border: 1px solid #16a34a; color: #166534; }
.btn-admin-nutrition-calc:hover { background: rgba(22, 163, 74, 0.25); color: #14532d; }
.btn-admin-nutrition-result { background: var(--primary); color: var(--primary-foreground); border: 1px solid var(--primary); }
.btn-admin-nutrition-result:hover { opacity: 0.9; }
.btn-admin-existing-nutrition { background: rgba(30, 58, 138, 0.12); border: 1px solid hsl(225, 55%, 35%); color: hsl(225, 71%, 25%); }
.btn-admin-existing-nutrition:hover { background: rgba(30, 58, 138, 0.2); color: var(--primary); }

/* ---------- 카드 ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card-header { padding: 1.5rem; padding-bottom: 0; }
.card-content { padding: 1.5rem; }
.card-title { font-size: 1.5rem; font-weight: 600; line-height: 1.2; }

/* ---------- 배지 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.125rem 0.625rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 500;
}
.badge-default { background: var(--primary); color: var(--primary-foreground); }
.badge-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.badge-destructive { background: var(--destructive); color: var(--destructive-foreground); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--foreground); }

/* ---------- 폼: input, label ---------- */
.input, .textarea, .select-trigger {
  width: 100%; padding: 0.5rem 0.75rem;
  border: 1px solid var(--input); border-radius: calc(var(--radius) - 2px);
  background: transparent; font-size: 0.875rem;
  transition: border-color 0.2s;
}
.input:focus, .textarea:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.15); }
.label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }

/* ---------- 테이블 ---------- */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th { text-align: left; padding: 0.75rem; color: var(--muted-foreground); font-weight: 500; border-bottom: 1px solid var(--border); }
td { padding: 0.75rem; border-bottom: 1px solid var(--border); }
tr:hover { background: rgba(0,0,0,0.02); }

/* ---------- 히어로 / 페이지 히어로 ---------- */
.hero {
  background: var(--primary); color: var(--primary-foreground);
  background-image: linear-gradient(135deg, var(--primary), var(--primary), rgba(45,212,191,0.2));
  padding: 6rem 0;
}
.hero h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 1rem; }
.hero p { color: rgba(241,245,249,0.7); font-size: 1.125rem; }

.page-hero {
  background: var(--primary); color: var(--primary-foreground); padding: 5rem 0;
}
.page-hero h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 1rem; }
.page-hero p { color: rgba(241,245,249,0.7); font-size: 1.125rem; }

/* ---------- 섹션 간격 ---------- */
.section { padding: 5rem 0; }
.section-muted { background: rgba(241,243,245,0.5); }

/* ---------- 업로드 영역 ---------- */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 3rem; text-align: center; color: var(--muted-foreground);
  transition: border-color 0.2s; cursor: pointer;
}
.upload-zone:hover { border-color: var(--accent); }
.upload-zone--drag {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.06);
}
.upload-zone--has-file {
  border-style: solid;
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.06);
}

.upload-progress-track {
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--border);
  overflow: hidden;
}
.upload-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--accent);
  width: 0%;
  transition: width 0.15s ease-out;
}
.upload-progress-fill--pulse {
  animation: upload-progress-pulse 1.2s ease-in-out infinite;
}
@keyframes upload-progress-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* ---------- 반응형 그리드 ---------- */
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .md\:flex-row { flex-direction: row; }
  .hero h1 { font-size: 3.75rem; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:col-span-2 { grid-column: span 2; }
}

/* ---------- 관리자: 마크다운→HTML 래퍼 (utils.admin_markdown_safe 출력) ---------- */
.ai-task-md-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}
.ai-task-md-wrap pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.ai-full-log-pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.ai-task-md-wrap table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  word-break: break-word;
}
.ai-task-md-wrap img,
.ai-task-md-wrap video {
  max-width: 100%;
  height: auto;
}
.ai-task-md-wrap ol,
.ai-task-md-wrap ul {
  max-width: 100%;
  padding-left: 1.25rem;
}
/* flex/그리드 안에서 마크다운 컬럼이 가로로 밀려나지 않게 */
.ai-deliver-modal-body {
  min-width: 0;
}

/* ---------- 관리자 레이아웃: 사이드바 + 메인 ---------- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px; min-width: 260px;
  background: var(--sidebar-bg); color: var(--sidebar-fg);
  border-right: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column; flex-shrink: 0;
  transition: width 0.2s ease, min-width 0.2s ease;
  overflow: hidden;
}
/* 닫힌 상태: 좁은 폭으로 화살표 버튼만 노출 */
.admin-sidebar:not(.open) {
  width: 52px; min-width: 52px;
}
.admin-sidebar:not(.open) .sidebar-logo-text,
.admin-sidebar:not(.open) .admin-tag,
.admin-sidebar:not(.open) .sidebar-nav,
.admin-sidebar:not(.open) .sidebar-footer {
  display: none !important;
}
.admin-sidebar:not(.open) .sidebar-logo {
  justify-content: center;
  padding: 0.5rem;
}
.admin-sidebar .sidebar-logo {
  padding: 1rem; border-bottom: 1px solid var(--sidebar-border);
  display: flex; align-items: center; gap: 0.5rem;
  flex-shrink: 0;
}
.admin-sidebar .sidebar-logo .sidebar-logo-text { font-weight: 700; font-size: 1.125rem; }
.admin-sidebar .sidebar-logo .admin-tag { font-size: 0.75rem; opacity: 0.6; }
.admin-sidebar .sidebar-logo .sidebar-toggle-btn {
  margin-left: auto;
  width: 32px; height: 32px;
  padding: 0; border: none; border-radius: 6px;
  background: transparent; color: var(--sidebar-fg);
  cursor: pointer; font-size: 0.875rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.admin-sidebar .sidebar-logo .sidebar-toggle-btn:hover {
  background: var(--sidebar-accent); color: var(--sidebar-primary);
}
.admin-sidebar:not(.open) .sidebar-logo .sidebar-toggle-btn {
  margin-left: 0;
}
.admin-sidebar .sidebar-nav { flex: 1; overflow-y: auto; padding: 0.5rem 0; }
.admin-sidebar .sidebar-group { padding: 0.5rem 0; }
.admin-sidebar .sidebar-group-label {
  padding: 0.25rem 1rem; font-size: 0.6875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: rgba(210, 220, 240, 0.5);
}
.admin-sidebar .sidebar-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; font-size: 0.875rem;
  color: var(--sidebar-fg); transition: background 0.15s;
  border-radius: 0; text-decoration: none;
}
.admin-sidebar .sidebar-item:hover { background: var(--sidebar-accent); }
.admin-sidebar .sidebar-item.active { background: var(--sidebar-accent); color: var(--sidebar-primary); font-weight: 500; }
.admin-sidebar .sidebar-footer {
  padding: 1rem; border-top: 1px solid var(--sidebar-border);
  font-size: 0.875rem;
}
.admin-sidebar .sidebar-footer .email { color: rgba(210,220,240,0.7); margin-bottom: 0.5rem; font-size: 0.8125rem; }
.admin-sidebar .sidebar-footer .footer-btns { display: flex; gap: 0.5rem; }
.admin-sidebar .sidebar-footer .footer-btns a {
  font-size: 0.8125rem; color: rgba(210,220,240,0.7); padding: 0.25rem 0.5rem;
  border-radius: calc(var(--radius) - 4px); transition: all 0.15s;
}
.admin-sidebar .sidebar-footer .footer-btns a:hover { background: var(--sidebar-accent); color: var(--sidebar-fg); }

.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-header {
  height: 3.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 1rem; gap: 1rem;
  background: var(--background); font-size: 0.875rem; color: var(--muted-foreground);
}
.admin-content { flex: 1; padding: 1.5rem; overflow: auto; background: rgba(241,243,245,0.3); min-width: 0; }

/* ---------- 관리자 콘솔(body.admin-console): 목록 테이블 컬럼 최소폭·한글 줄바꿈 ---------- */
/* 레이아웃이 좁을 때 th/td가 글자 단위로만 세로 분해되는 현상 방지 + 데이터 셀은 최대 약 2줄 */
.admin-console .table-wrapper > table {
  table-layout: auto;
}
.admin-console table th {
  white-space: nowrap;
  word-break: keep-all;
  vertical-align: bottom;
}
.admin-console table td {
  word-break: keep-all;
  vertical-align: top;
  line-height: 1.45;
  max-height: calc(1.45em * 2 + 0.25rem);
  overflow: hidden;
}
.admin-console table td:has(button),
.admin-console table td:has(.btn),
.admin-console table td:has(input:not([type="hidden"])),
.admin-console table td:has(select),
.admin-console table td:has(textarea),
.admin-console table td:has([contenteditable="true"]) {
  max-height: none;
  overflow: visible;
}
.admin-console table td.admin-td-unclamp {
  max-height: none;
  overflow: visible;
}
/* 마크다운/HTML 삽입 영역 내 표는 기존 문서용 규칙 유지 */
.admin-console .ai-task-md-wrap table th,
.admin-console .ai-task-md-wrap table td,
.admin-console .ai-deliver-md table th,
.admin-console .ai-deliver-md table td,
.admin-console .ai-result-md table th,
.admin-console .ai-result-md table td {
  white-space: normal;
  max-height: none;
  overflow: visible;
}

/* ---------- 아이콘/점 표시 ---------- */
.icon { display: inline-flex; align-items: center; justify-content: center; width: 1em; height: 1em; font-style: normal; }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; flex-shrink: 0; }
.dot-error { background: var(--destructive); }
.dot-warning { background: var(--warning); }
.dot-info { background: var(--accent); }

/* ---------- 여백/패딩/보더 유틸 ---------- */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.pt-6 { padding-top: 1.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.pt-4 { padding-top: 1rem; }
.pt-5 { padding-top: 1.25rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-8 { padding-bottom: 2rem; }
.min-h-5 { min-height: 1.25rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.rounded { border-radius: calc(var(--radius) - 4px); }
.rounded-lg { border-radius: var(--radius); }
.rounded-xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.overflow-hidden { overflow: hidden; }
.cursor-pointer { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.hidden { display: none; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.relative { position: relative; }
.absolute { position: absolute; }
.aspect-video { aspect-ratio: 16/9; }

/* ---------- 탭 (관리자 푸시/이메일 등) ---------- */
.tabs-list { display: inline-flex; background: var(--muted); border-radius: calc(var(--radius) - 2px); padding: 0.25rem; gap: 0.125rem; }
.tab-trigger { padding: 0.375rem 0.75rem; font-size: 0.875rem; font-weight: 500; border-radius: calc(var(--radius) - 4px); border: none; background: transparent; color: var(--muted-foreground); cursor: pointer; }
.tab-trigger.active { background: var(--card); color: var(--foreground); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

/* ---------- 프로그레스 바 (eatScore 등) ---------- */
.progress-bar { height: 0.5rem; border-radius: 9999px; background: var(--muted); overflow: hidden; }
.progress-bar .fill { height: 100%; border-radius: 9999px; }

.textarea { resize: vertical; min-height: 4rem; }

/* ---------- 모달 (이메일 발송/그룹 관리 등) ---------- */
.modal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}
body.modal-open { overflow: hidden; }
.modal {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-height: 90vh;
  overflow: auto;
}
/* 레시피·매핑 등: #id.modal + .modal-backdrop + .modal-content — 뷰포트 중앙, 바깥은 어둡게 */
.modal[id] {
  position: fixed;
  inset: 0;
  z-index: 100;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-bottom, 0px));
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  max-height: none;
  overflow: visible;
}
.modal[id] .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  z-index: 0;
}
.modal[id] .modal-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(36rem, 100%);
  box-sizing: border-box;
}
.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

/* 공지 배너 등록/수정: 헤더·본문 여백 (px-4 등 유틸만으로는 좁을 때 대비) */
#banner-modal .modal {
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  overflow: hidden;
  width: min(100%, 56rem);
}
#banner-modal .modal-header {
  padding: 1.125rem 1.75rem;
  flex-shrink: 0;
}
#banner-modal .modal-body-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1.25rem 1.75rem 2rem;
  -webkit-overflow-scrolling: touch;
}
/* .btn의 display가 [hidden]보다 우선할 수 있어 복사 버튼이 남는 경우 방지 */
#banner-modal-copy[hidden] {
  display: none !important;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}
.modal-close:hover { color: var(--foreground); }

/* 템플릿 편집 모달: 넓고 높게 */
#tpl-modal .modal { width: 92vw; max-width: 64rem; max-height: 88vh; display: flex; flex-direction: column; }
#tpl-modal .modal .modal-body-scroll { flex: 1; overflow: auto; min-height: 320px; }
#tpl-modal .tpl-editor-wrap { min-height: 280px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
#tpl-modal .tpl-html-wrap { min-height: 280px; }
#tpl-modal .tpl-html-wrap textarea { min-height: 280px; font-family: 'Courier New', monospace; }
#tpl-modal .tpl-preview-wrap { min-height: 280px; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--background); overflow: auto; }
#tpl-modal .tpl-body-tabs { display: flex; gap: 0.25rem; margin-bottom: 0.5rem; }
#tpl-modal .tpl-body-tabs button { padding: 0.35rem 0.75rem; font-size: 0.875rem; border: 1px solid var(--border); background: var(--secondary); border-radius: 0.375rem; cursor: pointer; }
#tpl-modal .tpl-body-tabs button.active { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
#tpl-modal .ql-editor { min-height: 240px; }

/* 이메일 작성 본문 편집기 */
.compose-editor-wrap { min-height: 280px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.compose-html-wrap { min-height: 280px; }
.compose-html-wrap textarea { min-height: 280px; font-family: 'Courier New', monospace; }
.compose-preview-wrap { min-height: 280px; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--background); overflow: auto; }
.compose-body-tabs { display: flex; gap: 0.25rem; margin-bottom: 0.5rem; }
.compose-body-tabs button { padding: 0.35rem 0.75rem; font-size: 0.875rem; border: 1px solid var(--border); background: var(--secondary); border-radius: 0.375rem; cursor: pointer; }
.compose-body-tabs button.active { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
#compose-quill-editor .ql-editor { min-height: 240px; }

/* 회원 미리보기 모달: 크게 + 본문 여백 */
.preview-modal-size { width: min(90vw, 56rem); max-width: 56rem; min-width: 0; max-height: 88vh; display: flex; flex-direction: column; }
#preview-modal .preview-modal-body { padding: 1rem 1.5rem 0.75rem; }
#preview-modal .preview-modal-table { padding: 0 1.5rem 1rem; }

/* ---------- 공지 배너 팝업 (notice_banner.js) ---------- */
.notice-banner-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  overscroll-behavior: none;
  touch-action: none;
}
.notice-banner-popup-show {
  opacity: 1;
  pointer-events: auto;
  touch-action: auto;
}
.notice-banner-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  overscroll-behavior: none;
  touch-action: none;
}
/* 공지 팝업: 최대 500px · 본문은 스크롤 · 푸터는 항상 노출 */
.notice-banner-popup-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: min(100vw, 500px);
  max-width: min(500px, 100vw);
  max-height: min(92vh, 100dvh);
  background: var(--card);
  border-radius: 1.25rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: transform 0.3s ease;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
/* 이미지 배너: JS가 픽셀 너비 지정 (상한 500px와 동일하게) */
.notice-banner-popup-modal.notice-banner-popup-modal--sized-to-image {
  width: auto;
  max-width: min(500px, 100vw);
}
.notice-banner-popup-show .notice-banner-popup-modal {
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 540px) {
  /* 오버레이·모달을 같은 칸에 두고 place-items로 정중앙 (flex만 쓰면 상단 붙는 환경 대응) */
  .notice-banner-popup {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    place-items: center;
    place-content: center;
    padding: 20px;
    box-sizing: border-box;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
  }
  .notice-banner-popup-overlay {
    grid-column: 1;
    grid-row: 1;
  }
  .notice-banner-popup-modal {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 40px);
    max-height: calc(100vh - 40px);
    height: auto;
    min-height: 0;
    border-radius: 1.25rem;
    margin: 0;
    z-index: 1;
    justify-self: center;
    align-self: center;
  }
  .notice-banner-popup-show .notice-banner-popup-modal {
    transform: none !important;
  }
}
/* 이미지 위 닫기: 밝은 원 + primary 톤 X (가독성) */
.notice-banner-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.125rem;
  height: 2.125rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease, transform 0.15s ease;
}
.notice-banner-close:hover {
  background: #fff;
  transform: scale(1.05);
}
.notice-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--card);
}
/* 모달 안: 슬라이더는 남는 높이 + 콘텐츠 최소 높이(1 1 0만 쓰면 모달 height:auto일 때 본문 0px 수축) */
.notice-banner-popup-modal .notice-banner.notice-banner-slider {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
}
@media (max-width: 540px) {
  /* MO: 모달이 height:auto일 때 슬라이더가 불필요하게 늘어나지 않도록 max-height 제한 완화 */
  .notice-banner-popup-modal .notice-banner.notice-banner-slider {
    max-height: none;
  }
}
/* 이미지 열 + 본문(+도트)까지 한 영역에서 세로 스크롤 · 배경으로 스크롤 전파 차단 */
.notice-banner-popup-modal .notice-banner-split {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
}
.notice-banner-popup-modal .notice-banner-media-col:not(.notice-banner-media-col--text-only) {
  flex-shrink: 0;
}
.notice-banner-popup-modal .notice-banner-text-col {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
  min-height: 0;
}
.notice-banner-popup-modal .notice-banner-text-col .notice-banner-track-text {
  flex: 0 0 auto;
  overflow: visible;
  min-height: 0;
}
.notice-banner-popup-modal .notice-banner-media-col--text-only {
  flex: 0 0 auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.notice-banner-popup-modal .notice-banner-media-col--text-only .notice-banner-track-text {
  flex: 0 0 auto;
  overflow: visible;
  min-height: 0;
}
.notice-banner-popup-modal .notice-banner-dots-slot--text {
  flex-shrink: 0;
}
.notice-banner-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: inherit;
  text-align: center;
}
.notice-banner-item:hover {
  opacity: 0.9;
}
.notice-banner-img-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}
.notice-banner-img {
  max-width: 100%;
  max-height: 300px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
}
.notice-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}
.notice-banner-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}
/* 공지 팝업: 제목은 항상 가운데 */
.notice-banner-popup-modal .notice-banner-title {
  text-align: center;
}
.notice-banner-desc {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}
.notice-banner-desc--rich {
  text-align: left;
  width: 100%;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}
/* Quill: 클래스 기반(구 데이터) + 인라인 style 은 브라우저 기본 적용 */
.notice-banner-desc--rich .ql-align-left {
  text-align: left;
}
.notice-banner-desc--rich .ql-align-center {
  text-align: center;
}
.notice-banner-desc--rich .ql-align-right {
  text-align: right;
}
.notice-banner-desc--rich .ql-align-justify {
  text-align: justify;
}
.notice-banner-desc--rich p:not([class*='ql-align']) {
  text-align: left;
}
.notice-banner-desc--rich p {
  margin: 0.35em 0;
}
.notice-banner-desc--rich p:first-child {
  margin-top: 0;
}
.notice-banner-desc--rich p:last-child {
  margin-bottom: 0;
}
.notice-banner-desc--rich a {
  color: var(--primary);
  text-decoration: underline;
}
.notice-banner-desc--rich ul,
.notice-banner-desc--rich ol {
  margin: 0.35em 0;
  padding-left: 1.25rem;
  display: inline-block;
  text-align: left;
}
.notice-banner-desc--rich .ql-align-center ul,
.notice-banner-desc--rich .ql-align-center ol,
.notice-banner-desc--rich .ql-align-right ul,
.notice-banner-desc--rich .ql-align-right ol {
  display: inline-block;
}
/* 강조형(alert): 초록 강조 (슬라이더는 아래 .notice-banner-slider--alert로 도트까지 감쌈) */
.notice-banner-type-alert {
  background: hsla(142, 55%, 40%, 0.14);
  border: 2px solid hsl(142, 55%, 36%);
}
.notice-banner-slider.notice-banner-slider--alert {
  background: hsla(142, 55%, 40%, 0.14);
  border: 2px solid hsl(142, 55%, 36%);
  border-radius: calc(1.25rem - 2px);
  box-sizing: border-box;
}
.notice-banner-slider.notice-banner-slider--alert .notice-banner-type-alert {
  background: transparent !important;
  border: none !important;
}
/* 강조형: 제목/본문 열의 카드(흰) 배경 제거 → 연한 초록은 슬라이더·split과 한 덩어리로 */
.notice-banner-slider.notice-banner-slider--alert .notice-banner-text-col,
.notice-banner-slider.notice-banner-slider--alert .notice-banner-media-col--text-only {
  background: transparent;
}
/* 강조형: 이미지+본문+도트까지 한 덩어리 연초록 (푸터 제외). .notice-banner-slide 의 흰 배경이 덮어쓰던 문제 해결 */
.notice-banner-slider.notice-banner-slider--alert .notice-banner-split {
  background: hsla(142, 55%, 40%, 0.14);
}
.notice-banner-slider.notice-banner-slider--alert .notice-banner-media-col:not(.notice-banner-media-col--text-only) {
  background: hsla(142, 55%, 40%, 0.14);
}
.notice-banner-slider.notice-banner-slider--alert .notice-banner-track-text .notice-banner-slide {
  background: transparent;
}
.notice-banner-slider.notice-banner-slider--alert .notice-banner-dots-slot--text {
  background: transparent;
}
.notice-banner-slider.notice-banner-slider--alert .notice-banner-dot.active {
  background: hsl(142, 55%, 36%);
}
.notice-banner-single.notice-banner-single--alert {
  background: hsla(142, 55%, 40%, 0.14);
  border: 2px solid hsl(142, 55%, 36%);
  border-radius: calc(1.25rem - 2px);
  box-sizing: border-box;
}
.notice-banner-single.notice-banner-single--alert .notice-banner-type-alert {
  background: transparent !important;
  border: none !important;
}
.notice-banner-single.notice-banner-single--alert .notice-banner-text-col,
.notice-banner-single.notice-banner-single--alert .notice-banner-media-col--text-only {
  background: transparent;
}
.notice-banner-single.notice-banner-single--alert .notice-banner-split {
  background: hsla(142, 55%, 40%, 0.14);
}
.notice-banner-single.notice-banner-single--alert .notice-banner-media-col:not(.notice-banner-media-col--text-only) {
  background: hsla(142, 55%, 40%, 0.14);
}
.notice-banner-single.notice-banner-single--alert .notice-banner-track-text .notice-banner-slide {
  background: transparent;
}
.notice-banner-single.notice-banner-single--alert .notice-banner-dots-slot--text {
  background: transparent;
}
.notice-banner-type-text .notice-banner-text {
  flex: 1;
}

/* 팝업: 이미지 열 + 텍스트 열 분리 */
.notice-banner-split {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.notice-banner-text-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  background: var(--card);
}
.notice-banner-text-col--solo {
  border-top-left-radius: 1.25rem;
  border-top-right-radius: 1.25rem;
  padding-top: 0.35rem;
}
.notice-banner-slider--text-only .notice-banner-split,
.notice-banner-slider--no-top-media .notice-banner-split {
  border-radius: 1.25rem 1.25rem 0 0;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}
.notice-banner-media-col--text-only .notice-banner-track-text .notice-banner-slide {
  padding-top: 1.5rem;
}
.notice-banner-media-col {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0a0a0a;
  border-top-left-radius: 1.25rem;
  border-top-right-radius: 1.25rem;
  flex-shrink: 0;
}
/* 혼합 캐러셀: 현재 슬라이드에 이미지 없을 때 검은 칸 제거 */
.notice-banner-media-col--hidden {
  display: none !important;
}
.notice-banner-text-col--flush-top {
  border-top-left-radius: 1.25rem;
  border-top-right-radius: 1.25rem;
}
/* 텍스트형 전용: 상단 이미지 칸과 동일 위치·모서리에서 텍스트 시작 */
.notice-banner-media-col--text-only {
  background: var(--card);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.notice-banner-dots-slot--text {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.65rem 0.5rem 0.85rem;
  box-sizing: border-box;
  background: var(--card);
}
.notice-banner-dots-slot--text:empty {
  display: none;
  padding: 0;
  min-height: 0;
}
.notice-banner-track-media,
.notice-banner-track-text {
  display: flex;
  width: 100%;
  transition: transform 0.3s ease;
}
.notice-banner-track-media {
  align-items: flex-start;
}
.notice-banner-track-media .notice-banner-slide,
.notice-banner-track-text .notice-banner-slide {
  flex: 0 0 100%;
  min-width: 0;
  box-sizing: border-box;
}
.notice-banner-media-hit {
  display: block;
  text-decoration: none;
  color: inherit;
}
.notice-banner-text-hit {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
}
.notice-banner-img-placeholder {
  min-height: 10rem;
  background: var(--muted);
}
/* 이미지 없는 슬라이드: 미디어 열 높이 0 (텍스트형·이미지 미설정) */
.notice-banner-media-empty {
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  line-height: 0;
  font-size: 0;
}
.notice-banner-track-media .notice-banner-slide.notice-banner-slide--no-media {
  min-height: 0;
}
/* 본문: 제목 가운데, 본문 기본 좌측(Quill 정렬로 덮어쓰기) */
.notice-banner-track-text .notice-banner-slide {
  padding: 1.25rem 1.25rem 0.85rem;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}
.notice-banner-text-col--solo .notice-banner-track-text .notice-banner-slide {
  padding-top: 1.5rem;
}
.notice-banner-track-text .notice-banner-text-hit {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  flex: 1;
  min-height: 0;
}
.notice-banner-track-text .notice-banner-text {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}
.notice-banner-track-text .notice-banner-title {
  display: block;
  text-align: center;
  width: 100%;
  margin: 0;
  padding: 0 0.25rem;
  box-sizing: border-box;
}
.notice-banner-track-text .notice-banner-desc--rich {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 1rem;
  box-sizing: border-box;
}
.notice-banner-popup-modal .notice-banner-media-col .notice-banner-img-wrapper {
  width: 100%;
  margin: 0;
  display: block;
  line-height: 0;
  overflow: hidden;
  border-top-left-radius: 1.25rem;
  border-top-right-radius: 1.25rem;
}
.notice-banner-popup-modal .notice-banner-track-media .notice-banner-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(68vh, 560px);
  display: block;
  border-radius: 1.25rem 1.25rem 0 0;
  object-fit: contain;
  object-position: center top;
  vertical-align: top;
}
/* 드래그/스와이프는 JS(pointer) + body 스크롤 잠금. pan-y 는 세로 제스처가 배경으로 새는 경우가 있어 제거 */
.notice-banner-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.notice-banner-slider .notice-banner-desc--rich,
.notice-banner-slider .notice-banner-desc--rich * {
  -webkit-user-select: text;
  user-select: text;
}
/* 좌우 이동(PC·MO 공통). 슬라이더 세로 중앙 · 숨김 시 완전 제거(잔상 방지) */
.notice-banner-arrows--overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.2rem;
  pointer-events: none;
  z-index: 10;
  box-sizing: border-box;
}
.notice-banner-arrows--overlay .notice-banner-arrow {
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.notice-banner-arrows--hidden {
  display: none !important;
}
.notice-banner-arrow {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.notice-banner-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}
.notice-banner-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
}
/* 이미지 하단 오버레이 점 */
.notice-banner-dots.notice-banner-dots--on-image {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.1rem 0.5rem 0.55rem;
  margin: 0;
  gap: 0.45rem;
  z-index: 5;
  pointer-events: auto;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
/* 텍스트형·본문 하단 점 (라이트 배경) */
.notice-banner-dots.notice-banner-dots--below-text {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  margin: 0;
  background: transparent;
}
.notice-banner-dots--below-text .notice-banner-dot {
  background: var(--border);
}
.notice-banner-dots--below-text .notice-banner-dot.active {
  background: var(--primary);
}
.notice-banner-slider.notice-banner-slider--alert .notice-banner-dots--below-text .notice-banner-dot.active {
  background: hsl(142, 55%, 36%);
}
.notice-banner-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}
.notice-banner-dot.active {
  background: var(--primary);
}
.notice-banner-dots--on-image .notice-banner-dot {
  background: rgba(255, 255, 255, 0.45);
}
.notice-banner-dots--on-image .notice-banner-dot.active {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.notice-banner-slider.notice-banner-slider--alert .notice-banner-dots--on-image .notice-banner-dot.active {
  background: hsl(142, 55%, 92%);
}
.notice-banner-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem max(1rem, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--card);
  gap: 0.75rem;
  flex-shrink: 0;
}
.notice-banner-hide-today {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--foreground);
  user-select: none;
}
.notice-banner-hide-today input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}
.notice-banner-close-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--secondary);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.notice-banner-close-btn:hover {
  background: var(--muted);
  border-color: var(--primary);
}

/* ---------- AI 관리 콘솔 (navigator-style 유틸) ---------- */
.max-w-6xl {
  max-width: 72rem;
}
.max-w-5xl {
  max-width: 64rem;
}
/* 파인튜닝 상단 — ai-team-navigator FineTuning.tsx 레이아웃 정렬 */
.ai-ft-nav-mock {
  width: 100%;
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
}
.ai-ft-nav-mock .ai-page-header {
  margin-bottom: 0;
}
.ai-stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-stat-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
}
.ai-stat-icon--success {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}
.ai-stat-icon--working {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
}
.ai-stat-icon--data {
  background: rgba(30, 58, 138, 0.1);
  color: var(--primary);
}
.ai-stat-icon--neutral {
  background: var(--secondary);
  color: var(--muted-foreground);
}
.ai-ft-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--muted) 50%, transparent);
}
@supports not (background: color-mix(in srgb, black 50%, white)) {
  .ai-ft-flow {
    background: rgba(0, 0, 0, 0.03);
  }
}
.ai-ft-flow__step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.ai-ft-flow__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(30, 58, 138, 0.1);
  color: var(--primary);
}
.ai-ft-flow__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
}
.ai-ft-flow__arrow {
  color: var(--muted-foreground);
  flex-shrink: 0;
  font-size: 1.125rem;
  line-height: 1;
  padding: 0 0.25rem;
}
.ai-ft-table-shell {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.ai-ft-table-shell table thead tr {
  background: rgba(0, 0, 0, 0.04);
}
.dark .ai-ft-table-shell table thead tr,
[data-theme="dark"] .ai-ft-table-shell table thead tr {
  background: rgba(255, 255, 255, 0.06);
}
.ai-ft-table-shell table tbody tr {
  transition: background 0.15s ease;
}
.ai-ft-table-shell table tbody tr:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* LoRA 어댑터 카드 그리드 — /admin/ai-roles `.ainav-grid`와 동일(최소 카드 폭 17.5rem, 열 수는 뷰포트에 따라 가변) */
.ai-ft-lora-cards-grid {
  display: grid;
  width: 100%;
  max-width: none;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
}
.ai-ft-lora-cards-grid > .ai-ft-lora-cards-grid__msg {
  grid-column: 1 / -1;
}

/* 파인튜닝 직접 요청: 데이터셋 선택 행 — 셀렉트 높이에 맞춘 남색( primary ) 추가 버튼 */
.ft-pick-dataset-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  flex-shrink: 0;
  padding: 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  border-radius: 0.375rem;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--primary-foreground);
  cursor: pointer;
}
.ft-pick-dataset-add:hover {
  opacity: 0.92;
}

/* /admin/agent-team/tasks 「작업삭제」와 동일 — 리스트 항목 제거 등 공용 */
.at-task-delete-btn {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1.25;
  padding: 0.3rem 0.55rem;
  border-radius: 0.375rem;
  cursor: pointer;
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 500;
}
.at-task-delete-btn:hover:not(:disabled) {
  background: #fee2e2;
}
.at-task-delete-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.ai-page-header {
  margin-bottom: 1.5rem;
}
.ai-page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--foreground);
}
.ai-page-header p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}
.ai-stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .ai-stat-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .ai-stat-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .ai-stat-grid--5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  .ai-stat-grid--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.ai-stat-card .card-content {
  padding: 1.25rem 1.5rem;
}
.ai-stat-card .ai-stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.25rem;
}
.ai-stat-card .ai-stat-label {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
.ai-link-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .ai-link-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
.ai-link-card {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  color: var(--foreground);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ai-link-card:hover {
  border-color: var(--primary);
  box-shadow: 0 1px 8px rgba(45, 212, 191, 0.12);
}
.ai-link-card .ai-link-title {
  font-weight: 600;
  font-size: 0.9375rem;
}
.ai-link-card .ai-link-desc {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}
.ai-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.ai-status-badge--running {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}
.ai-status-badge--done {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}
.ai-status-badge--await {
  background: rgba(234, 179, 8, 0.15);
  color: #a16207;
}
.ai-status-badge--pending {
  background: rgba(168, 85, 247, 0.12);
  color: #7e22ce;
}
.ai-status-badge--idle {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

/* AI 대시보드·역할 카드 공통 진행 막대 */
.ai-progress-track {
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--border);
  overflow: hidden;
}
.ai-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--accent);
  transition: width 0.2s ease;
}
.ai-dot-pulse {
  background: #60a5fa;
  animation: ai-dot-pulse-soft 2s ease-in-out infinite;
}
@keyframes ai-dot-pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.ai-dashed-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-primary-fg {
  color: var(--primary-foreground);
}

/* 결과물 보기 — 상세 다이얼로그 레이아웃은 admin_ai_results_hub.html 인라인 스타일에서 정의 */
.ai-result-detail-body {
  min-height: 2rem;
}
.ai-result-md {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--foreground);
  word-break: break-word;
}
.ai-result-md p {
  margin: 0.5em 0;
}
.ai-result-md h1,
.ai-result-md h2,
.ai-result-md h3,
.ai-result-md h4 {
  margin: 0.85em 0 0.35em;
  font-weight: 600;
  line-height: 1.3;
}
.ai-result-md h1 {
  font-size: 1.25rem;
}
.ai-result-md h2 {
  font-size: 1.1rem;
}
.ai-result-md h3 {
  font-size: 1rem;
}
.ai-result-md ul,
.ai-result-md ol {
  margin: 0.5em 0;
  padding-left: 1.35em;
}
.ai-result-md blockquote {
  margin: 0.5em 0;
  padding-left: 0.75em;
  border-left: 3px solid var(--border);
  color: var(--muted-foreground);
}
.ai-result-md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  background: var(--secondary);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}
.ai-result-md pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  background: var(--secondary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 0.65em 0;
}
.ai-result-md pre code {
  background: none;
  padding: 0;
}
.ai-result-md a {
  color: var(--primary);
  text-decoration: underline;
}
.ai-result-md hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1em 0;
}
.ai-result-md table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875rem;
  margin: 0.65em 0;
}
.ai-result-md th,
.ai-result-md td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
  text-align: left;
}

/* ---------- 관리자: 리스트 «더보기» 공통 ---------- */
.admin-load-more-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}
.admin-load-more-btn {
  width: 250px;
  max-width: 100%;
  box-sizing: border-box;
}
.admin-load-more-end {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: center;
  margin: 0;
}
