* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  background: #f3f4f7;
  color: #1f2937;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.left-nav {
  width: 92px;
  flex-shrink: 0;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  padding: 16px 10px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  /* 본문(content-area)이 flex 오버플로로 겹칠 때에도 좌측 메뉴 클릭이 먹도록 위에 둠 */
  z-index: 2;
}

/* 로고 ~ 구분선 간격: 기존 8px 대비 1.5배(12px), 구분선 ~ 채팅은 flex gap(8px)+보정으로 전체 약 1.5배 */
.nav-logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  flex-shrink: 0;
}

.nav-logo-divider {
  width: 72%;
  max-width: 64px;
  height: 1px;
  background: #e5e7eb;
  margin: 0 auto;
  flex-shrink: 0;
}

.logo-link {
  display: block;
  margin: 0 auto;
  text-align: center;
}

.logo-img {
  max-width: 168px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* 상단 NCue 로고 (가로형) */
.logo-img-ncue {
  max-width: 168px;
}

.logo-img-aiplatform {
  cursor: default;
  user-select: none;
  -webkit-user-drag: none;
}

.nav-item {
  font-size: 12px;
  color: #374151;
  text-decoration: none;
  text-align: center;
  border-radius: 10px;
  padding: 8px 4px;
  display: block;
  cursor: pointer;
}

.nav-item:hover {
  background: #f3f4f6;
}

.nav-item.active {
  background: #e8f0fe;
  color: #1d4ed8;
}

.nav-item.nav-item-ghost {
  color: #9ca3af;
  font-size: 11px;
}

/* 이메일(OPS) 인증: 하단 관리자(토큰) — 참조 디자인 뮤트 슬레이트 톤 */
.nav-item.nav-item-admin-entry {
  color: #8e9aaf;
  font-size: 12px;
  font-weight: 500;
}

.nav-item.nav-item-admin-entry:hover {
  background: #f3f4f6;
  color: #64748b;
}

/* 이메일(OPS) 인증 사용자: 로그아웃 */
.nav-item.nav-item-ops-logout {
  color: #111827;
  font-weight: 600;
  font-size: 13px;
}

/* 이메일(OPS) 로그인: 관리자 ↔ 로그아웃 사이 구분선(위·아래 여백) */
.nav-separator.nav-separator-between-footer {
  margin-top: 8px;
  margin-bottom: 8px;
}

.nav-footer {
  margin-top: auto;
  padding-top: 8px;
}

.nav-separator {
  height: 1px;
  background: #e5e7eb;
  margin-bottom: 8px;
}

/* 관리자 전용 링크(사용자 현황관리)와 구분선 사이 간격 */
.nav-footer > .nav-item + .nav-separator {
  margin-top: 8px;
}

button.nav-item {
  background: none;
  border: none;
  width: 100%;
  font: inherit;
}

/* 좁은 화면: 좌측 메뉴는 햄버거로 열기 (하단·관리자 구분선 바로 위에 배치) */
.nav-mobile-toggle {
  display: none;
  position: fixed;
  top: auto;
  left: max(12px, env(safe-area-inset-left, 0px));
  /* nav-footer: 관리자(~48px) + 구분선 아래 여백(8px) + 구분선(1px) + 햄버거와의 간격(8px) */
  bottom: calc(48px + 8px + 1px + 8px + env(safe-area-inset-bottom, 0px));
  z-index: 102;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  color: #374151;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.nav-mobile-toggle:hover {
  background: #f9fafb;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.nav-mobile-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}

.content-area {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  height: 68px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h1 {
  margin: 0;
  font-size: 30px;
}

.top-action {
  border: none;
  background: #f59e0b;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
}

.top-action:disabled,
.top-action.ax-sample-readonly {
  background: #d1d5db !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

.top-action-link {
  text-decoration: none;
  border: none;
  background: #f59e0b;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 14px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.top-action-icon {
  margin-right: 2px;
  font-size: 15px;
}

.top-action-link--ghost {
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.top-action-link--ghost:hover {
  background: #f9fafb;
}

.container.container-narrow {
  max-width: 880px;
}

.use-case-compose .use-case-compose__hint {
  font-size: 14px;
  color: #4b5563;
  margin: 0 0 8px;
}

.use-case-compose__form {
  display: grid;
  gap: 20px;
}

.use-case-compose__meta {
  display: grid;
  gap: 30px;
  padding-top: 28px;
  border-top: 1px solid #e5e7eb;
}

.use-case-wysiwyg-hint {
  font-weight: 400;
  color: #4b5563;
  font-size: 14px;
}

.use-case-section--rich h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: #111827;
}

.use-case-editor-host {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.use-case-editor-host .toastui-editor,
.use-case-editor-host .toastui-editor-defaultUI,
.use-case-editor-host .ProseMirror {
  font-family: inherit;
}

.use-case-editor-host .ProseMirror {
  min-height: 6.5rem;
  font-size: 15px;
  line-height: 1.65;
  color: #1f2937;
  padding: 2px 0;
}

.use-case-editor-host--merged .toastui-editor-contents {
  box-sizing: border-box;
}

/* STAR 한 칸 편집기: 본문이 테두리에 붙지 않도록 */
.use-case-editor-host--merged .ProseMirror {
  min-height: 28rem;
  padding: 14px 22px 28px;
  box-sizing: border-box;
}

.use-case-editor-host .uc-example-text {
  color: #9ca3af;
}

.use-case-merge-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.use-case-section--merged {
  display: block;
}

.use-case-section .use-case-body-input {
  width: 100%;
  min-height: 96px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.use-case-title-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 18px;
  font-weight: 600;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

/* 태그: 본문 에어리어(ProseMirror)와 동일 15px, 너비는 본문 편집기 대략 50% */
.use-case-field--tags .use-case-tag-input {
  width: 50%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
  font-family: inherit;
  color: #1f2937;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
}

.use-case-field--tags .use-case-tag-input::placeholder {
  font-size: 15px;
  line-height: 1.65;
  color: #9ca3af;
}

@media (max-width: 520px) {
  .use-case-field--tags .use-case-tag-input {
    width: 100%;
  }
}

.use-case-field .req {
  color: #dc2626;
}
.use-case-field .opt {
  color: #6b7280;
  font-weight: 400;
  font-size: 13px;
}
.use-case-field .label-block {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.use-case-charcount {
  text-align: right;
  font-size: 13px;
  color: #6b7280;
  margin: 8px 0 0;
}

.use-case-dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  position: relative;
  background: #fafafa;
}
.use-case-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.use-case-dropzone__label {
  pointer-events: none;
  color: #6b7280;
  font-size: 14px;
}

.use-case-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.use-case-thumb-tile {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.use-case-thumb-tile.is-removed {
  display: none;
}

.use-case-thumb-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.use-case-thumb-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.use-case-thumb-remove:hover {
  background: rgba(185, 28, 28, 0.92);
}

.use-case-filename {
  margin: 8px 0 0;
  font-size: 13px;
  color: #059669;
}

.use-case-file-multi {
  width: 100%;
  font-size: 14px;
}

.use-case-file-list {
  margin: 8px 0 0;
  padding-left: 20px;
  color: #4b5563;
  font-size: 14px;
}

.use-case-cb {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #4b5563;
  cursor: pointer;
  line-height: 1.4;
}
.use-case-cb input {
  margin-top: 2px;
  flex-shrink: 0;
}
.use-case-existing-attach {
  list-style: none;
  margin: 6px 0 10px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
}
.use-case-existing-attach li + li {
  margin-top: 6px;
}
.use-case-existing-attach__title {
  margin: 8px 0 0 !important;
  font-weight: 600;
  color: #374151;
}

.success-submission-cover-section {
  margin: 20px 0 8px;
}

.success-submission-cover-title {
  font-size: 16px;
  margin: 0 0 12px;
  color: #111827;
}

.success-submission-cover-hint {
  margin: -6px 0 14px;
  font-size: 13px;
  color: #6b7280;
}

.success-submission-cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.success-submission-cover-item {
  margin: 0;
}

.success-submission-cover-grid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

/* AI 활용 사례 상세: 실행 화면은 크게 + 클릭 확대 */
.ai-case-viewer .success-submission-cover-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 14px;
}

.ai-case-viewer .success-submission-cover-header .success-submission-cover-title {
  margin: 0;
}

.ai-case-viewer .success-submission-cover-header .success-submission-cover-hint {
  margin: 6px 0 0;
}

.ai-case-viewer .success-submission-cover-grid {
  gap: 16px;
}

.ai-case-viewer .success-submission-cover-grid--cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.ai-case-viewer .success-submission-cover-grid--cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-case-viewer .success-submission-cover-grid--cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .ai-case-viewer .success-submission-cover-grid--cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ai-case-viewer .success-submission-cover-grid--cols-2,
  .ai-case-viewer .success-submission-cover-grid--cols-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.ai-case-viewer .success-submission-screenshot-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #f9fafb;
  cursor: zoom-in;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ai-case-viewer .success-submission-screenshot-btn:hover {
  border-color: #9ca3af;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.08);
}

.ai-case-viewer .success-submission-screenshot-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.ai-case-viewer .success-submission-cover-grid img {
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.ai-case-viewer .success-submission-screenshot-caption {
  margin: 8px 0 0;
  font-size: 13px;
  color: #6b7280;
  word-break: break-all;
}

.ai-case-viewer .success-submission-cover--single img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #fff;
}

.ai-case-viewer .success-submission-cover--single .success-submission-screenshot-btn {
  border: 0;
  background: transparent;
}

.ai-case-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 56px;
  background: rgba(17, 24, 39, 0.88);
}

.ai-case-lightbox[hidden] {
  display: none !important;
}

.ai-case-lightbox__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  width: 100%;
}

.ai-case-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 72px);
  width: auto;
  height: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.ai-case-lightbox__caption {
  margin: 12px 0 0;
  max-width: 100%;
  color: #f3f4f6;
  font-size: 14px;
  text-align: center;
  word-break: break-all;
}

.ai-case-lightbox__meta {
  margin-top: 4px;
  color: #9ca3af;
  font-size: 12px;
}

.ai-case-lightbox__close,
.ai-case-lightbox__nav {
  position: absolute;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ai-case-lightbox__close:hover,
.ai-case-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.ai-case-lightbox__close {
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  font-size: 24px;
  line-height: 1;
}

.ai-case-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
}

.ai-case-lightbox__nav--prev {
  left: 16px;
}

.ai-case-lightbox__nav--next {
  right: 16px;
}

.ai-case-lightbox__nav[hidden] {
  display: none;
}

.ai-case-lightbox__close:focus-visible,
.ai-case-lightbox__nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .ai-case-lightbox {
    padding: 16px;
  }

  .ai-case-lightbox__nav {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  .ai-case-lightbox__nav--prev {
    left: 8px;
  }

  .ai-case-lightbox__nav--next {
    right: 8px;
  }
}
.use-case-attach-hint {
  margin: 0 0 6px !important;
}
.use-case-hint--thumb-remove {
  margin: 8px 0 0 !important;
}

.use-case-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
}

.use-case-btn-cancel {
  padding: 10px 18px;
  border-radius: 999px;
}

.use-case-btn-save {
  min-width: 120px;
}

.use-case-form-msg {
  margin-top: 8px;
}

.field-hint {
  font-size: 13px;
  color: #6b7280;
  margin: 4px 0 0;
}

.container {
  max-width: 1260px;
  margin: 20px auto 40px;
  padding: 0 22px;
  display: grid;
  gap: 16px;
}

/* AI 탐색: 메인 콘텐츠를 뷰포트 전체 너비로 사용 */
.container.container-ai-full {
  max-width: none;
  width: 100%;
  margin: 20px 0 40px;
  padding: 0 24px;
  box-sizing: border-box;
}

.container-ai-full .search-input {
  max-width: none;
  box-sizing: border-box;
}

.panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px;
  border: 1px solid #e5e7eb;
}

.hero {
  background: linear-gradient(135deg, #161b33 0%, #2f3c7e 100%);
  color: #fff;
}

.hero h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.hero p {
  margin: 0;
  color: #e5e7eb;
}

.panel h2 {
  margin-top: 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.count-chip {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 3px 10px;
  font-size: 13px;
  color: #4b5563;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px;
}

button {
  border: none;
  background: #f59e0b;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  width: fit-content;
}

.lecture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.lecture-card {
  display: grid;
  gap: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lecture-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.lecture-link {
  display: grid;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.lecture-card h3 {
  margin: 0;
}

.lecture-card p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
}

.lecture-card small {
  color: #6b7280;
}

.success-story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.success-story-card {
  display: grid;
  gap: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0;
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.success-story-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
}

.success-story-card--locked {
  cursor: not-allowed;
}

.success-story-card--locked:hover {
  transform: none;
  box-shadow: none;
}

.success-story-card--locked .success-story-link {
  cursor: not-allowed;
}

.success-story-link {
  display: grid;
  gap: 0;
  text-decoration: none;
  color: inherit;
  padding: 0;
}

.success-story-link-body {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
}

.success-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  min-height: 100px;
  color: #fff;
}

/* PDF 첫 장(또는 슬라이드) 썸네일 */
.success-thumb--cover {
  min-height: 120px;
  aspect-ratio: 16 / 9;
  max-height: 200px;
}

.success-thumb-media {
  position: absolute;
  inset: 0;
}

.success-thumb-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 세로로 잘릴 때 중앙이 아니라 하단(사진 본문·도표 쪽)이 보이도록 */
  object-position: center bottom;
  display: block;
}

.success-thumb-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.88) 0%,
    rgba(15, 23, 42, 0.45) 45%,
    rgba(15, 23, 42, 0.2) 100%
  );
  pointer-events: none;
}

.success-thumb-inner {
  position: relative;
  z-index: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  min-height: 100%;
  box-sizing: border-box;
}

/* 슬라이드 없음: 은은한 그라데이션 + 하이라이트 */
.success-thumb--gradient {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(45, 212, 191, 0.45), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(14, 116, 144, 0.5), transparent 50%),
    linear-gradient(135deg, #0c4a6e 0%, #0e7490 42%, #0d9488 78%, #14b8a6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.success-thumb--gradient .success-thumb-inner {
  justify-content: center;
}

.success-thumb-icon {
  font-size: 22px;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.success-thumb-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.success-badge {
  font-size: 12px;
  color: #6b7280;
}

.success-story-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  color: #111827;
}

.success-excerpt {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.success-meta {
  color: #9ca3af;
  font-size: 12px;
}

.success-hero h2 {
  margin-top: 0;
}

.success-filter .filter-actions {
  align-self: end;
}

.success-detail-panel {
  max-width: 820px;
}

.success-detail-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.success-detail-meta {
  margin: 0 0 8px;
  font-size: 14px;
  color: #6b7280;
}

.success-detail-title {
  margin: 0 0 10px;
  font-size: 1.45rem;
  line-height: 1.35;
  color: #111827;
}

.success-detail-lead {
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.5;
}

.success-pdf-link {
  margin: 12px 0 0;
}

.ai-case-viewer .ai-case-ppt-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ai-case-viewer .ai-case-submission-like {
  padding: 4px 12px;
  font-size: 13px;
}

.ai-case-tools-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ai-case-tool-sep {
  color: #d1d5db;
  margin: 0 2px;
}

.ai-case-inline-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.ai-case-inline-link:hover {
  text-decoration: underline;
}

button.ai-case-inline-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  color: #2563eb;
  text-decoration: none;
}

button.ai-case-inline-link:hover {
  text-decoration: underline;
}

.ai-case-tag-row {
  margin-top: 8px;
  margin-bottom: 4px;
}

/* AI 활용 사례 · 일반 제출 상세: WYSIWYG HTML (편집기와 읽기 화면 밀도 맞춤) */
.ai-case-viewer .success-submission-html {
  font-size: 15px;
  line-height: 1.5;
  color: #1f2937;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.ai-case-viewer .success-submission-html > *:first-child {
  margin-top: 0;
}
.ai-case-viewer .success-submission-html > *:last-child {
  margin-bottom: 0;
}

.ai-case-viewer .success-submission-html p {
  margin: 0.35em 0;
  line-height: 1.5;
}

/* ProseMirror/Toast: li > p 구조에서 문단 기본 margin 이중 방지 */
.ai-case-viewer .success-submission-html li > p {
  margin: 0;
  line-height: 1.5;
}
.ai-case-viewer .success-submission-html li p + p {
  margin-top: 0.4em;
}

.ai-case-viewer .success-submission-html ul,
.ai-case-viewer .success-submission-html ol {
  display: block;
  margin: 0.4em 0;
  padding-left: 1.3em;
  list-style-position: outside;
}

.ai-case-viewer .success-submission-html li {
  margin: 0.2em 0;
  line-height: 1.5;
  display: list-item;
}

.ai-case-viewer .success-submission-html ul {
  list-style: disc;
}
.ai-case-viewer .success-submission-html ol {
  list-style: decimal;
}
.ai-case-viewer .success-submission-html li > ul,
.ai-case-viewer .success-submission-html li > ol {
  margin: 0.25em 0;
}

.ai-case-viewer .success-submission-html h1,
.ai-case-viewer .success-submission-html h2,
.ai-case-viewer .success-submission-html h3,
.ai-case-viewer .success-submission-html h4 {
  margin: 0.6em 0 0.35em;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
}
.ai-case-viewer .success-submission-html h1 {
  font-size: 1.2rem;
}
.ai-case-viewer .success-submission-html h2 {
  font-size: 1.1rem;
}
.ai-case-viewer .success-submission-html h3,
.ai-case-viewer .success-submission-html h4 {
  font-size: 1.02rem;
}
.ai-case-viewer .success-submission-html h1:first-child,
.ai-case-viewer .success-submission-html h2:first-child,
.ai-case-viewer .success-submission-html h3:first-child,
.ai-case-viewer .success-submission-html h4:first-child {
  margin-top: 0;
}

.ai-case-viewer .success-submission-html blockquote {
  margin: 0.5em 0;
  padding: 0.25em 0 0.25em 0.75em;
  border-left: 3px solid #d1d5db;
  color: #4b5563;
}

.ai-case-viewer .success-submission-html hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0.75em 0;
}

.ai-case-viewer .success-submission-html strong {
  font-weight: 700;
  color: #111827;
}

.ai-case-viewer .success-submission-html a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.ai-case-viewer .success-submission-html table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0.5em 0;
}
.ai-case-viewer .success-submission-html th,
.ai-case-viewer .success-submission-html td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: left;
}
.ai-case-viewer .success-submission-html th {
  background: #f9fafb;
}

.ai-case-viewer .success-submission-html pre {
  margin: 0.5em 0;
  padding: 10px 12px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  overflow: auto;
}
.ai-case-viewer .success-submission-html :not(pre) > code {
  padding: 0.1em 0.35em;
  background: #f3f4f6;
  border-radius: 4px;
  font-size: 0.9em;
}

/* .slide-card ul { display:grid } 가 본문 리스트에도 적용되던 것을 본문 안에서는 일반 흐름으로 */
.ai-case-viewer .slide-card .success-submission-html ul,
.ai-case-viewer .slide-card .success-submission-html ol {
  gap: 0;
}

.success-detail-body-in-card {
  margin-top: 0;
}

.breadcrumb-detail {
  margin: 0 0 12px;
  font-size: 14px;
}

.breadcrumb-detail a {
  color: #2563eb;
  text-decoration: none;
}

.breadcrumb-detail a:hover {
  text-decoration: underline;
}

.detail-title-short {
  font-size: 1.1rem;
}

.admin-hint {
  font-size: 13px;
  line-height: 1.5;
}

.admin-story-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-story-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.admin-story-list .btn-sm {
  margin-left: auto;
}

.admin-story-list-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
}

.form-message {
  margin-top: 12px;
  font-size: 14px;
  color: #059669;
}

.badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
}

.badge.youtube {
  background: #fee2e2;
  color: #b91c1c;
}

.badge.ppt {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge.news {
  background: #ecfdf5;
  color: #047857;
}

.badge.link {
  background: #ede9fe;
  color: #5b21b6;
}

.badge.video {
  background: #cffafe;
  color: #0e7490;
}

.thumb {
  border-radius: 10px;
  padding: 12px;
  min-height: 88px;
  display: grid;
  gap: 3px;
  overflow: hidden;
  position: relative;
}

.thumb.youtube {
  background: linear-gradient(135deg, #7f1d1d, #ef4444);
  color: #fff;
}

.thumb.ppt {
  background: linear-gradient(135deg, #1d4ed8, #60a5fa);
  color: #fff;
}

.thumb.news {
  background: linear-gradient(135deg, #0f766e, #34d399);
  color: #fff;
}

.thumb.link {
  background: linear-gradient(135deg, #4c1d95, #a78bfa);
  color: #fff;
}

.thumb.video {
  background: linear-gradient(135deg, #0e7490, #22d3ee);
  color: #fff;
}

.thumb.video .thumb-image {
  opacity: 1;
}

.lecture-video-wrap {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  max-width: 960px;
}

.lecture-video-player {
  display: block;
  width: 100%;
  max-height: min(70vh, 720px);
  background: #000;
}

.lecture-news-desc {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 16px;
}

.lecture-news-actions {
  margin: 0 0 12px;
}

.thumb-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.thumb-image-youtube {
  opacity: 1;
}

/* link·news: og:image 미리보기 */
.thumb-image-og {
  opacity: 1;
  object-fit: cover;
}

/* visibility:hidden 은 IntersectionObserver 교차 판정을 막을 수 있음 */
.infinite-scroll-sentinel {
  height: 4px;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
}

.lecture-load-more-wrap {
  text-align: center;
  padding: 12px 0 4px;
}
.lecture-load-more-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.lecture-load-more-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.thumb-fallback {
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.4);
  color: #fff;
  z-index: 1;
}

.thumb-kicker {
  font-size: 11px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.thumb strong {
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.thumb small {
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

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

.tag-chip {
  border-radius: 999px;
  padding: 2px 8px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
}

.filter-panel,
.admin-panel {
  display: grid;
  gap: 10px;
}

/* 학습센터 /admin: 관리자 비활성 시 등록·필터·목록만 비활성(활성화 패널은 제외) */
.admin-body-gated--locked {
  pointer-events: none;
  opacity: 0.68;
  user-select: none;
  transition: opacity 0.15s ease;
}
.admin-body-gated--unlocked {
  pointer-events: auto;
  opacity: 1;
}

.filter-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.filter-grid label {
  display: grid;
  gap: 6px;
}

.filter-row-bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 0;
}

.category-radios {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  align-items: center;
}

.category-radios label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
}

.category-radios input[type="radio"] {
  margin: 0;
}

.category-radios-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}

.category-radios-inline label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
}

.category-radios-inline input[type="radio"] {
  margin: 0;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.link-download {
  font-size: 0.9em;
  font-weight: normal;
  color: #1d4ed8;
  text-decoration: underline;
  margin-left: 8px;
}
.link-download:hover {
  color: #1e40af;
}

.link-muted {
  color: #6b7280;
  text-decoration: none;
}

.admin-mode-header {
  margin-bottom: 12px;
}

.admin-mode-header h2 {
  margin: 0;
}

.admin-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.queue-status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: #374151;
  font-size: 13px;
}

.api-hint {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.dashboard-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.chart-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.kpi-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  display: grid;
  gap: 4px;
}

.kpi-card small {
  color: #6b7280;
}

.kpi-card b {
  font-size: 24px;
}

.mini-panel {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.mini-panel h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.plain-list li {
  display: grid;
  gap: 2px;
  font-size: 13px;
}

.bar-chart {
  min-height: 180px;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
}

.bar-item {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.bar-item small {
  font-size: 10px;
  color: #6b7280;
}

.bar {
  width: 100%;
  min-height: 2px;
  border-radius: 4px;
}

.bar.processed {
  background: #2563eb;
}

.bar.failed {
  background: #dc2626;
}

.inline {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}

.event-table-wrap {
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.event-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  background: #fff;
}

.event-table th,
.event-table td {
  border-bottom: 1px solid #f3f4f6;
  padding: 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.event-table th {
  background: #f9fafb;
  font-weight: 600;
}

.evt-type {
  width: fit-content;
  border-radius: 999px;
  padding: 2px 8px;
  color: #fff;
  font-size: 11px;
}

.evt-type.enqueue {
  background: #6b7280;
}

.evt-type.start {
  background: #2563eb;
}

.evt-type.success {
  background: #059669;
}

.evt-type.failed,
.evt-type.worker-error {
  background: #dc2626;
}

.admin-ok {
  color: #166534;
  margin: 0;
}

.admin-warn {
  color: #92400e;
  margin: 0;
}

.admin-error {
  color: #b91c1c;
  margin: 0 0 8px 0;
}

.delete-form {
  display: flex;
  justify-content: end;
}

.lecture-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 0;
  margin-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
}

.lecture-card-actions .btn-edit {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}

.lecture-card-actions .btn-edit:hover {
  background: #dbeafe;
}

.delete-form-inline {
  display: inline;
}

.delete-form-inline button {
  padding: 6px 12px;
  font-size: 13px;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.muted {
  color: #9ca3af;
  font-size: 12px;
}

.thumb-state-row {
  display: grid;
  gap: 4px;
}

.state-chip {
  width: fit-content;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
}

.state-chip.ready {
  background: #dcfce7;
  color: #166534;
}

.state-chip.processing {
  background: #dbeafe;
  color: #1d4ed8;
}

.state-chip.pending {
  background: #f3f4f6;
  color: #374151;
}

.state-chip.failed {
  background: #fee2e2;
  color: #b91c1c;
}

.error-text {
  color: #b91c1c;
}

.danger {
  background: #dc2626;
}

.ghost {
  background: #4b5563;
}

.viewer-wrap {
  max-width: 1260px;
  margin: 20px auto;
  padding: 0 24px 32px;
}

.back-link {
  text-decoration: none;
  display: inline-block;
  margin-bottom: 10px;
}

.description {
  color: #4b5563;
}

.youtube-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d1d5db;
  background: #000;
}

.youtube-frame iframe {
  width: 100%;
  height: 100%;
}

.ppt-tools {
  margin: 14px 0;
  color: #374151;
}

.ppt-tools-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  justify-content: space-between;
}

.slide-layout-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.slide-layout-toggle-label {
  font-size: 13px;
  color: #6b7280;
  margin-right: 4px;
}

.slide-layout-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.2;
}

.slide-layout-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.slide-layout-btn.is-active {
  background: #1f2937;
  color: #fff;
  border-color: #1f2937;
}

.slide-list {
  display: grid;
  gap: 12px;
}

.slide-list.slide-list--cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.slide-list.slide-list--cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.slide-list.slide-list--cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .slide-list.slide-list--cols-2,
  .slide-list.slide-list--cols-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.slide-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 16px;
}

.slide-card h2 {
  margin: 0;
  font-size: 18px;
}

.slide-list.slide-list--cols-2 .slide-card h2,
.slide-list.slide-list--cols-3 .slide-card h2 {
  font-size: 14px;
}

.slide-list.slide-list--cols-3 .slide-card {
  padding: 12px;
}

.slide-card header p {
  margin: 4px 0 0;
  color: #4b5563;
}

.slide-image-wrap {
  margin: 12px 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
}

.slide-list.slide-list--cols-1 .slide-image-wrap {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.slide-image {
  display: block;
  max-width: 100%;
  height: auto;
}

.slide-card ul {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.empty {
  color: #6b7280;
}

.list-hint {
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 13px;
}

.list-query-actions {
  margin-top: 12px;
}

.form-hint {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
}

.subtitle {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 14px;
}

.search-bar-wrap {
  margin-bottom: 12px;
}

.ai-type-filters {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-type-filter-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.ai-type-filter-option input[type="radio"] {
  margin: 0;
  accent-color: #1d4ed8;
}

.ai-type-filter-option:has(input[type="radio"]:checked) {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.search-input {
  width: 100%;
  max-width: 400px;
  padding: 10px 12px 10px 36px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.filter-tag {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.filter-tag:hover {
  background: #f3f4f6;
}

.ai-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.ai-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
}

/* 검색 필터: [hidden]이 a.ai-card-link { display: block } 등에 밀리지 않도록 */
.ai-card[hidden] {
  display: none !important;
}

.ai-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ai-card-icon {
  font-size: 24px;
}

.status-chip {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
}

.status-chip.public {
  background: #dcfce7;
  color: #166534;
}

.status-chip.private {
  background: #fef3c7;
  color: #92400e;
}

.ai-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.ai-card p {
  margin: 0 0 8px;
  font-size: 14px;
  color: #4b5563;
}

a.ai-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.ai-card-link:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

a.ai-card-link:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

/* AI 탐색: DEV·비관리자 — 프롬프트 외 비활성 */
.ai-card.ai-card-disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
  user-select: none;
}

.fscan-embed-frame {
  width: 100%;
  min-height: 860px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
}

.ai-explore-action-disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
  user-select: none;
}

body.ai-explore-dev-guest .search-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* AI 프롬프트 라이브러리 (히어로 + 카드 + 미리보기) */
.prompts-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
  text-decoration: none;
  margin-bottom: 16px;
}

.prompts-back:hover {
  color: #1f2937;
}

.prompts-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #1e40af 100%);
  color: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
}

.prompts-hero h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.prompts-hero .prompts-lead {
  margin: 0 0 12px;
  color: #e2e8f0;
  font-size: 15px;
  line-height: 1.5;
  max-width: 720px;
}

.prompts-hero .prompts-stats {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.prompts-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.15fr);
  gap: 20px;
  align-items: start;
}

.prompts-grid-title {
  margin: 0 0 12px;
  font-size: 17px;
  color: #111827;
}

.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.prompt-template-card {
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.prompt-template-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.prompt-template-card.is-selected {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #3b82f6;
}

.prompt-template-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #111827;
}

.prompt-template-card p {
  margin: 0 0 8px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.45;
}

.prompt-template-card .prompt-mini-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
}

.prompts-preview-panel {
  position: sticky;
  top: 88px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  background: #fafafa;
  min-height: 320px;
}

.prompts-preview-panel h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.prompts-preview-empty {
  margin: 0;
  color: #9ca3af;
  font-size: 14px;
}

.prompts-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.prompts-copy-btn {
  border: none;
  background: #f59e0b;
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.prompts-copy-btn:hover {
  background: #ea580c;
}

.prompts-copy-btn:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}

.prompts-body-textarea {
  width: 100%;
  min-height: 280px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  resize: vertical;
  box-sizing: border-box;
  background: #fff;
}

.prompts-body-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.prompts-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: #6b7280;
}

@media (max-width: 960px) {
  .prompts-layout {
    grid-template-columns: 1fr;
  }

  .prompts-preview-panel {
    position: static;
  }
}

/* —— 프롬프트 라이브러리 v2 (탭·좋아요·팀 공유) */
.prompt-lib-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 8px;
}
.prompt-lib-tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.prompt-lib-tab:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}
.prompt-lib-tab.is-active {
  background: #1f2937;
  color: #fff;
  border-color: #1f2937;
}
.prompt-lib-login-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: #6b7280;
}
.prompt-lib-db-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 13px;
}
.prompts-stats--info {
  color: #6b7280;
}
.prompt-lib-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.prompt-lib-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.prompt-lib-select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  background: #fff;
}
.prompt-lib-search {
  flex: 1;
  min-width: 180px;
  max-width: 360px;
}
.prompt-lib-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}
.prompt-lib-main.prompts-layout {
  align-items: start;
}
.prompt-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}
.prompt-card-src {
  padding: 2px 8px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #4b5563;
  font-weight: 600;
}
.prompt-template-card .prompt-card-author {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prompt-card-likes {
  margin-left: auto;
  color: #e11d48;
  font-weight: 600;
}
.prompt-lib-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.prompt-lib-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #fecdd3;
  background: #fff1f2;
  color: #9f1239;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.prompt-lib-like:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.prompt-lib-like.is-liked {
  background: #fb7185;
  border-color: #fb7185;
  color: #fff;
}
.prompt-lib-meta {
  margin: 0 0 8px;
  font-size: 13px;
  color: #6b7280;
}
.prompt-lib-textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.prompt-lib-mine-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.prompt-lib-mine-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}
.prompt-lib-mine-item .mine-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: #111827;
}
.prompt-lib-mine-item .mine-date {
  font-size: 13px;
  color: #9ca3af;
}
.prompt-lib-mine-item .mine-del {
  font-size: 13px;
}

/* 프롬프트 공개 폼(탭2) */
.prompt-lib-panel--submit {
  border: none;
  background: linear-gradient(135deg, #faf5ff 0%, #f8fafc 45%, #eff6ff 100%);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 12px 40px rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 22px 22px 28px;
}
.prompt-lib-submit-hero {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}
.prompt-lib-submit-hero-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #7c3aed, #4f46e5);
  color: #fff;
  font-size: 20px;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
.prompt-lib-panel--submit h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.prompt-lib-submit-hero p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #475569;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.prompt-lib-policy {
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 20px;
}
/* 공유하기 탭: 정책/히어로와 동일한 가로로 폼·카드 정렬(이전 800px 제한 해제) */
.prompt-lib-form {
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}
.prompt-lib-fieldset {
  margin: 0 0 20px;
  padding: 16px 18px 18px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.prompt-lib-h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #1e293b;
  font-weight: 700;
}
.prompt-lib-hintline {
  margin: -4px 0 10px;
  font-size: 13px;
  color: #64748b;
}
.prompt-lib-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.prompt-lib-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.4;
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.prompt-lib-input:focus {
  outline: none;
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.prompt-lib-input-row {
  margin-bottom: 12px;
}
.prompt-lib-input-row--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
@media (max-width: 640px) {
  .prompt-lib-input-row--2col {
    grid-template-columns: 1fr;
  }
}
.prompt-lib-textarea--body {
  min-height: 280px;
  font-family: ui-monospace, SFMono-Regular, "Segoe UI", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
  background: #f8fafc;
}
.prompt-lib-textarea--body:focus {
  background: #fff;
}

/* 공유하기: 프롬프트 본문 — 원문 / 마크다운 미리보기 */
.prompt-lib-body-editor-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
}
.prompt-lib-body-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.prompt-lib-body-mode-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.prompt-lib-body-mode-btn:hover {
  border-color: #94a3b8;
  color: #1e293b;
}
.prompt-lib-body-mode-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-color: #4f46e5;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}
.prompt-lib-md-preview {
  min-height: 280px;
  max-height: 520px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  overflow: auto;
  box-sizing: border-box;
  color: #1e293b;
}
.prompt-lib-md-preview[hidden] {
  display: none !important;
}
.prompt-lib-md-body {
  font-size: 14px;
  line-height: 1.55;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.prompt-lib-md-body > *:first-child {
  margin-top: 0;
}
.prompt-lib-md-body > *:last-child {
  margin-bottom: 0;
}
.prompt-lib-md-body h1,
.prompt-lib-md-body h2,
.prompt-lib-md-body h3,
.prompt-lib-md-body h4 {
  margin: 12px 0 8px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
}
.prompt-lib-md-body h1 {
  font-size: 1.2rem;
}
.prompt-lib-md-body h2 {
  font-size: 1.1rem;
}
.prompt-lib-md-body h3,
.prompt-lib-md-body h4 {
  font-size: 1.02rem;
}
.prompt-lib-md-body p {
  margin: 8px 0;
}
.prompt-lib-md-body hr {
  border: none;
  border-top: 1px solid #d1d5db;
  margin: 14px 0;
}
.prompt-lib-md-body ul,
.prompt-lib-md-body ol {
  margin: 8px 0;
  padding-left: 1.35em;
}
.prompt-lib-md-body li {
  margin: 4px 0;
}
.prompt-lib-md-body ul {
  list-style: disc;
}
.prompt-lib-md-body ol {
  list-style: decimal;
}
.prompt-lib-md-body blockquote {
  margin: 8px 0;
  padding: 6px 0 6px 12px;
  border-left: 3px solid #d1d5db;
  color: #4b5563;
}
.prompt-lib-md-body strong {
  font-weight: 700;
  color: #111827;
}
.prompt-lib-md-body a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}
.prompt-lib-md-body a:hover {
  color: #1d4ed8;
}
.prompt-lib-md-body pre {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #1f2937;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.45;
  overflow-x: auto;
}
.prompt-lib-md-body pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}
.prompt-lib-md-body :not(pre) > code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #e5e7eb;
  font-size: 0.9em;
}
.prompt-lib-md-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 10px 0;
}
.prompt-lib-md-body th,
.prompt-lib-md-body td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: left;
}
.prompt-lib-md-body th {
  background: #f9fafb;
  font-weight: 600;
}
.prompt-lib-md-empty,
.prompt-lib-md-fallback {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}
.prompt-lib-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 720px) {
  .prompt-lib-upload-grid {
    grid-template-columns: 1fr;
  }
}
.prompt-lib-drop {
  position: relative;
  padding: 16px 14px 14px;
  border-radius: 12px;
  border: 2px dashed #c4b5fd;
  background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
  min-height: 150px;
}
.prompt-lib-drop--result {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}
.prompt-lib-drop-eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #6d28d9;
  margin-bottom: 4px;
}
.prompt-lib-drop--result .prompt-lib-drop-eyebrow {
  color: #1d4ed8;
}
.prompt-lib-drop strong {
  display: block;
  font-size: 15px;
  color: #0f172a;
  margin-bottom: 4px;
}
.prompt-lib-drop p {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}
.prompt-lib-file-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.prompt-lib-file-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #a78bfa;
  color: #5b21b6;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.prompt-lib-file-btn:hover {
  background: #ede9fe;
}
.prompt-lib-drop--result .prompt-lib-file-btn {
  border-color: #60a5fa;
  color: #1d4ed8;
}
.prompt-lib-drop--result .prompt-lib-file-btn:hover {
  background: #dbeafe;
}
.prompt-lib-file-list {
  margin: 8px 0 0;
  font-size: 12px;
  color: #64748b;
  word-break: break-all;
  min-height: 1.2em;
}
.prompt-lib-submit-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.prompt-lib-submit-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #ea580c, #f97316);
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.35);
  transition: transform 0.1s, box-shadow 0.15s;
}
.prompt-lib-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(234, 88, 12, 0.45);
}
.prompt-lib-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* 미리보기: 첨부 */
.prompt-lib-preview-files {
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prompt-lib-preview-file-block {
  padding: 10px 12px;
  background: #f1f5f9;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.prompt-lib-preview-file-block h4 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.prompt-lib-file-link-list {
  margin: 0;
  padding: 0 0 0 1.1em;
  list-style: disc;
  font-size: 13px;
  color: #1e293b;
}
.prompt-lib-file-link-list li {
  margin: 4px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}
.prompt-lib-file-link-list a {
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
  word-break: break-all;
}
.prompt-lib-file-link-list a:hover {
  text-decoration: underline;
}
.prompt-lib-file-size {
  font-size: 12px;
  color: #94a3b8;
}

/* 워크플로 → 프롬프트 탭 */
.prompt-lib-panel--workflow {
  border: none;
  background: linear-gradient(160deg, #f0fdfa 0%, #f8fafc 40%, #f5f3ff 100%);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 12px 36px rgba(15, 23, 42, 0.07);
  border-radius: 16px;
  padding: 22px 22px 28px;
}
.prompt-lib-wf-hero {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}
.prompt-lib-wf-hero-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #0d9488, #6366f1);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  margin-bottom: 10px;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}
.prompt-lib-panel--workflow h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.prompt-lib-wf-hero p {
  margin: 0 auto;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  font-size: 15px;
  line-height: 1.55;
  color: #475569;
}
.prompt-lib-wf-api-note {
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 12px 14px 12px 16px;
  margin: 0 0 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}
.prompt-lib-wf-api-note strong {
  display: block;
  margin-bottom: 6px;
  color: #312e81;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.prompt-lib-wf-api-note ul {
  margin: 0;
  padding: 0 0 0 1.1em;
}
.prompt-lib-wf-api-note li {
  margin: 6px 0;
}
.prompt-lib-wf-api-note li em {
  color: #0f766e;
  font-style: normal;
  font-weight: 600;
}
.prompt-lib-wf-api-note code {
  font-size: 12px;
  background: #e0e7ff;
  padding: 1px 5px;
  border-radius: 4px;
  color: #3730a3;
}
.prompt-lib-wf-warn {
  color: #b45309;
  font-weight: 600;
}
.prompt-lib-wf-k {
  display: inline-block;
  font-weight: 700;
  color: #0f172a;
}
/* 워크플로 탭: 상단 설명(노트)과 동일한 가로 */
.prompt-lib-wf-body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}
.prompt-lib-wf-fieldset {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}
.prompt-lib-wf-fieldset--actions {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.prompt-lib-wf-h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}
.prompt-lib-wf-lead {
  margin: -2px 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #64748b;
}
.prompt-lib-wf-row {
  margin-bottom: 12px;
}
.prompt-lib-wf-row:last-of-type {
  margin-bottom: 0;
}
.prompt-lib-wf-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.prompt-lib-wf-label .req {
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
}
.prompt-lib-wf-label .opt {
  font-weight: 500;
  color: #94a3b8;
  font-size: 12px;
}
.prompt-lib-wf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
}
.prompt-lib-wf-input,
.prompt-lib-wf-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.45;
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  font-family: inherit;
}
.prompt-lib-wf-textarea {
  min-height: 100px;
  resize: vertical;
  font-size: 14px;
}
.prompt-lib-wf-textarea--result {
  min-height: 260px;
  font-family: ui-monospace, SFMono-Regular, "Segoe UI", Menlo, Consolas, monospace;
  line-height: 1.55;
  background: #f1f5f9;
}
.prompt-lib-wf-input:focus,
.prompt-lib-wf-textarea:focus {
  outline: none;
  border-color: #0d9488;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}
.prompt-lib-wf-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  align-items: start;
}
@media (max-width: 560px) {
  .prompt-lib-wf-actions {
    grid-template-columns: 1fr;
  }
}
.prompt-lib-wf-action {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prompt-lib-wf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.1s, box-shadow 0.15s, opacity 0.15s;
}
.prompt-lib-wf-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.prompt-lib-wf-btn--merge {
  background: #fff;
  color: #0f172a;
  border: 2px solid #94a3b8;
  box-shadow: 0 2px 0 #e2e8f0;
}
.prompt-lib-wf-btn--merge:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #64748b;
  transform: translateY(-1px);
}
.prompt-lib-wf-btn--ai {
  background: linear-gradient(135deg, #0d9488, #4f46e5);
  color: #fff;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
  border: none;
}
.prompt-lib-wf-btn--ai:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(79, 70, 229, 0.45);
}
.prompt-lib-wf-action-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.prompt-lib-wf-tip {
  cursor: help;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
  user-select: none;
}

.chat-area {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.chat-api-warning {
  margin: 0 24px 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 13px;
  line-height: 1.45;
}

.chat-api-warning code {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.6);
  padding: 1px 4px;
  border-radius: 4px;
}

.chat-msg-streaming .chat-msg-content {
  min-height: 46px;
}

.chat-progress-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
  font-size: 13px;
}

.chat-progress-text {
  letter-spacing: 0.2px;
  animation: chatProgressBlink 1.1s ease-in-out infinite;
}

.chat-progress-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.chat-progress-dots span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #d97706;
  opacity: 0.35;
  animation: chatProgressDot 1.05s ease-in-out infinite;
}

.chat-progress-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-progress-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.chat-progress-track {
  position: relative;
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: #fde68a;
  overflow: hidden;
}

.chat-progress-fill {
  position: absolute;
  inset: 0;
  width: 42%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
  animation: chatProgressSlide 1s ease-in-out infinite;
}

@keyframes chatProgressDot {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

@keyframes chatProgressBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes chatProgressSlide {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(260%);
  }
}

.chat-send-btn.is-busy {
  opacity: 1;
  cursor: wait;
  animation: chatSendBusyPulse 0.9s ease-in-out infinite;
}

@keyframes chatSendBusyPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.18);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.4);
  }
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px 24px;
}

.chat-native-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.chat-welcome {
  padding: 40px 0;
  text-align: center;
}

.chat-welcome h2 {
  margin: 0 0 12px;
  font-size: 24px;
  color: #1f2937;
}

.chat-welcome p {
  margin: 0;
  color: #6b7280;
  font-size: 15px;
}

.chat-msg {
  margin-bottom: 16px;
  max-width: 85%;
}

.chat-msg-user {
  align-self: flex-end;
  width: fit-content;
  max-width: 85%;
}

.chat-msg-assistant {
  align-self: flex-start;
}

.chat-msg-user .chat-msg-content {
  background: #e5e7eb;
  color: #1f2937;
  padding: 12px 16px;
  border-radius: 16px 16px 4px 16px;
  text-align: right;
  border: 1px solid #d1d5db;
}

.chat-msg-assistant .chat-msg-content {
  background: #f3f4f6;
  color: #1f2937;
  padding: 12px 16px;
  border-radius: 16px 16px 16px 4px;
}

/** 어시스턴트 메시지: marked + DOMPurify 렌더 결과 */
.chat-msg-assistant .chat-md-body {
  font-size: 14px;
  line-height: 1.55;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.chat-msg-assistant .chat-md-body > *:first-child {
  margin-top: 0;
}

.chat-msg-assistant .chat-md-body > *:last-child {
  margin-bottom: 0;
}

.chat-msg-assistant .chat-md-body h1,
.chat-msg-assistant .chat-md-body h2,
.chat-msg-assistant .chat-md-body h3,
.chat-msg-assistant .chat-md-body h4 {
  margin: 12px 0 8px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
}

.chat-msg-assistant .chat-md-body h1 {
  font-size: 1.2rem;
}

.chat-msg-assistant .chat-md-body h2 {
  font-size: 1.1rem;
}

.chat-msg-assistant .chat-md-body h3,
.chat-msg-assistant .chat-md-body h4 {
  font-size: 1.02rem;
}

.chat-msg-assistant .chat-md-body p {
  margin: 8px 0;
}

.chat-msg-assistant .chat-md-body hr {
  border: none;
  border-top: 1px solid #d1d5db;
  margin: 14px 0;
}

.chat-msg-assistant .chat-md-body ul,
.chat-msg-assistant .chat-md-body ol {
  margin: 8px 0;
  padding-left: 1.35em;
}

.chat-msg-assistant .chat-md-body li {
  margin: 4px 0;
}

.chat-msg-assistant .chat-md-body ul {
  list-style: disc;
}

.chat-msg-assistant .chat-md-body ol {
  list-style: decimal;
}

.chat-msg-assistant .chat-md-body blockquote {
  margin: 8px 0;
  padding: 6px 0 6px 12px;
  border-left: 3px solid #d1d5db;
  color: #4b5563;
}

.chat-msg-assistant .chat-md-body strong {
  font-weight: 700;
  color: #111827;
}

.chat-msg-assistant .chat-md-body a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.chat-msg-assistant .chat-md-body a:hover {
  color: #1d4ed8;
}

.chat-msg-assistant .chat-md-body pre {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #1f2937;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.45;
  overflow-x: auto;
}

.chat-msg-assistant .chat-md-body pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.chat-msg-assistant .chat-md-body :not(pre) > code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #e5e7eb;
  font-size: 0.9em;
}

.chat-msg-assistant .chat-md-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 10px 0;
}

.chat-msg-assistant .chat-md-body th,
.chat-msg-assistant .chat-md-body td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: left;
}

.chat-msg-assistant .chat-md-body th {
  background: #f9fafb;
  font-weight: 600;
}

.chat-status-line {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.chat-sources {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  line-height: 1.45;
}

.chat-sources-title {
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.chat-sources-list {
  margin: 0;
  padding-left: 1.1em;
  color: #4b5563;
}

.chat-sources-list a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-sources-list a:hover {
  color: #1d4ed8;
}

.chat-source-excerpt {
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
}

.chat-input-wrap {
  padding: 16px 0;
  border-top: 1px solid #e5e7eb;
}

.chat-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-model-select {
  flex-shrink: 0;
  width: 160px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
}

.chat-model-select:focus {
  outline: none;
  border-color: #f59e0b;
}

.chat-form textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  resize: none;
  font: inherit;
}

.chat-form textarea:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f59e0b;
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.chat-send-btn:hover:not(:disabled) {
  background: #d97706;
}

.chat-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-disclaimer {
  margin: 12px 0 0;
  font-size: 12px;
  color: #9ca3af;
}

.chat-placeholder {
  padding: 24px;
  text-align: center;
}

.chat-placeholder .muted {
  color: #9ca3af;
  font-size: 13px;
  margin-top: 8px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.btn-ghost {
  background: #fff !important;
  color: #374151 !important;
  border: 1px solid #d1d5db !important;
}

.upload-zone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
}

.upload-zone:hover {
  border-color: #f59e0b;
  background: #fffbeb;
}

.breadcrumb {
  margin: 0 0 16px;
  font-size: 14px;
  color: #6b7280;
}

.breadcrumb a {
  color: #1d4ed8;
  text-decoration: none;
}

.panel h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

@media (max-width: 900px) {
  .nav-mobile-toggle {
    display: flex;
  }

  .left-nav {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 101;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
  }

  .left-nav.nav-drawer-open {
    transform: translateX(0);
  }

  body.nav-mobile-open {
    overflow: hidden;
    touch-action: none;
  }

  .topbar {
    height: auto;
    padding: 14px 16px;
  }
  .topbar h1 {
    font-size: 24px;
  }
  .top-action {
    padding: 8px 12px;
  }
  .top-action-link {
    padding: 8px 12px;
  }
  .container,
  .viewer-wrap {
    padding: 0 12px;
  }

  .container.container-ai-full {
    padding: 0 12px;
  }
}

/* Admin token modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}
.modal-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.modal-content h3 {
  margin: 0 0 8px;
  font-size: 20px;
}
.modal-desc {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 14px;
}
.admin-token-form input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
}
.admin-token-form input:focus {
  outline: none;
  border-color: #f97316;
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.modal-actions button {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.modal-actions button[type="submit"] {
  background: #f97316;
  color: #fff;
  border: none;
}
.modal-actions button[type="submit"]:hover {
  background: #ea580c;
}

.table-wrap {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}
.data-table th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
}
.data-table tbody tr:hover {
  background: #f9fafb;
}
.cell-truncate {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.form-grid h3 {
  grid-column: 1 / -1;
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  font-size: 15px;
}
.form-grid h3:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.label-text {
  display: inline;
}
.required {
  color: #dc2626;
  font-weight: 600;
  vertical-align: super;
  font-size: 0.85em;
  margin-left: 1px;
}

/* 회의록 AI — content-area 너비까지 쓰고, 오른쪽 열이 뷰포트에 맞춰 넓어짐 */
.meeting-minutes-main.container {
  max-width: none;
  width: 100%;
  margin: 20px 0 40px;
  padding: 0 24px;
  box-sizing: border-box;
}
.mm-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.mm-workspace {
  min-width: 0;
}
@media (max-width: 900px) {
  .mm-layout {
    grid-template-columns: 1fr;
  }
}
.mm-sidebar {
  position: sticky;
  top: 12px;
}
.mm-sidebar-title {
  margin: 0 0 8px;
  font-size: 15px;
}
.mm-refresh {
  width: 100%;
  margin-bottom: 10px;
}
.mm-meeting-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 50vh;
  overflow-y: auto;
}
.mm-meeting-item {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid #e5e7eb;
}
.mm-meeting-item-btn {
  flex: 1;
  text-align: left;
  padding: 8px 4px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: #1f2937;
}
.mm-meeting-item-btn:hover {
  color: #0f766e;
}
.mm-meeting-del {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.mm-meeting-del:hover {
  color: #dc2626;
}
.mm-list-empty {
  font-size: 13px;
  color: #6b7280;
}
.mm-prompt-panel h2 {
  margin-top: 0;
}
.mm-prompt-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
}
.mm-prompt-panel-head h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1.125rem;
}
.mm-prompt-toggle {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.mm-prompt-toggle:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}
.mm-prompt-toggle:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}
.mm-prompt-toggle-icon {
  display: inline-block;
  font-size: 11px;
  transition: transform 0.2s ease;
}
.mm-prompt-panel.mm-prompt-collapsed .mm-prompt-toggle-icon {
  transform: rotate(-90deg);
}
.mm-prompt-body .subtitle {
  margin-top: 0;
}
.mm-prompt-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mm-checkbox-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 14px 16px;
  background: #fafafa;
  border: 1px solid #e8eaed;
  border-radius: 10px;
}
.mm-checkbox-item {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  line-height: 1.35;
  user-select: none;
}
.mm-checkbox-item input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: #0f766e;
}
.mm-checkbox-item span {
  flex: 0 1 auto;
}
.mm-custom-block {
  margin-top: 18px;
}
.mm-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.mm-textarea,
.mm-input,
.mm-select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
}
.mm-textarea {
  min-height: 5.5rem;
  resize: vertical;
}
/* 추가 지시: 기본 높이의 약 2/3 (세로 1/3 축소) */
.mm-custom-instr-textarea {
  min-height: calc(5.5rem * 2 / 3);
}
.mm-select {
  cursor: pointer;
  appearance: auto;
}
.mm-file-input {
  padding: 8px 0;
  font-size: 14px;
}
.mm-prompt-actions {
  margin-top: 16px;
  padding-top: 4px;
}
.mm-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e5e7eb;
}
.mm-tab {
  padding: 10px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 8px 8px 0 0;
  transition: color 0.15s ease, background 0.15s ease;
}
.mm-tab:hover {
  color: #374151;
  background: #f9fafb;
}
.mm-tab.is-active {
  color: #0f766e;
  font-weight: 600;
  border-bottom-color: #0f766e;
}
/* [hidden]은 UA 기본 display:none인데 .mm-field-stack 등이 덮어써 탭이 동시에 보이는 문제 방지 */
.mm-tab-panel[hidden] {
  display: none !important;
}
.mm-field-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 2px;
}
.mm-section-heading {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  letter-spacing: -0.02em;
}
.mm-audio-phase {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mm-audio-phase + .mm-audio-phase {
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid #e8eaed;
}
.mm-transcribe-model-only {
  max-width: 100%;
}
.mm-field {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}
.mm-field-narrow {
  max-width: 320px;
}
.mm-title-date-field {
  margin: 0;
}
.mm-title-date-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}
.mm-title-date-labels .mm-field-label:last-child {
  text-align: right;
  min-width: 7rem;
}
.mm-title-date-box {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.mm-title-date-box .mm-title-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 0;
  border: none !important;
  border-radius: 0;
  border-right: 1px solid #e5e7eb !important;
}
.mm-title-date-box .mm-title-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.25);
}
.mm-date-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #fafafa;
}
.mm-date-native {
  border: none;
  background: transparent;
  font-size: 14px;
  color: #111827;
  min-width: 9.5rem;
  max-width: 11rem;
  padding: 6px 4px;
  font-family: inherit;
}
.mm-date-native::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.85;
}
.mm-date-native:focus {
  outline: none;
}
.mm-date-trigger {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.mm-date-trigger:hover {
  background: #1d4ed8;
}
.mm-date-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (max-width: 520px) {
  .mm-title-date-box {
    flex-wrap: wrap;
  }
  .mm-title-date-box .mm-title-input {
    width: 100%;
    flex: 1 1 100%;
    border-right: none !important;
    border-bottom: 1px solid #e5e7eb !important;
  }
  .mm-date-wrap {
    width: 100%;
    justify-content: flex-end;
  }
}
.mm-model-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  align-items: start;
}
@media (max-width: 640px) {
  .mm-model-row {
    grid-template-columns: 1fr;
  }
}
.mm-audio-hint {
  margin: -4px 0 0;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #1e40af;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}
.mm-audio-summary-hint {
  margin: -6px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #64748b;
}
.mm-field-help {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
  font-weight: 400;
}
.mm-form-actions {
  margin-top: 4px;
}
.mm-audio-panel .mm-field-help {
  max-width: 42rem;
}
.mm-result-panel {
  margin-top: 8px;
}
.mm-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.mm-result-title {
  margin: 0;
  font-size: 1.1rem;
}
.mm-result-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}
.mm-result-split {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
}
.mm-result-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.mm-result-field-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.mm-result-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 280px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, "Segoe UI Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}
.mm-result-textarea-half {
  min-height: 220px;
}
/** 전사 기록: 회의록 렌더 영역과 동일한 산세리프·여백 (회의록 textarea는 마크다운 편집용 모노스페이스 유지) */
.mm-result-textarea.mm-transcript-textarea {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-height: 260px;
  max-height: min(70vh, 640px);
}
.mm-minutes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.mm-source-text-header .mm-field-label {
  margin-bottom: 0;
}
.mm-minutes-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.mm-minutes-edit,
.mm-minutes-cancel {
  font-size: 13px;
  font-weight: 600;
}
/* 복사: 클립보드 동작이 드러나도록 청록 강조(저장 버튼과 구분) */
.mm-minutes-copy {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  color: #0f766e;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #5eead4;
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.12);
}
.mm-minutes-copy:hover {
  color: #0d9488;
  background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 100%);
  border-color: #2dd4bf;
  box-shadow: 0 2px 4px rgba(15, 118, 110, 0.15);
}
.mm-minutes-copy:active {
  transform: translateY(1px);
  box-shadow: 0 1px 1px rgba(15, 118, 110, 0.12);
}
.mm-minutes-copy:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.mm-minutes-apply {
  font-size: 13px;
  padding: 6px 14px;
}
.mm-minutes-editor-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.mm-minutes-rendered {
  box-sizing: border-box;
  width: 100%;
  min-height: 260px;
  max-height: min(70vh, 640px);
  overflow: auto;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.mm-minutes-rendered.mm-minutes-rendered-empty {
  color: #94a3b8;
  font-style: italic;
  background: #f8fafc;
}
.mm-minutes-rendered > *:first-child {
  margin-top: 0;
}
.mm-minutes-rendered > *:last-child {
  margin-bottom: 0;
}
.mm-minutes-rendered h1,
.mm-minutes-rendered h2,
.mm-minutes-rendered h3,
.mm-minutes-rendered h4 {
  margin: 14px 0 10px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}
.mm-minutes-rendered h1 {
  font-size: 1.25rem;
}
.mm-minutes-rendered h2 {
  font-size: 1.18rem;
  margin-top: 18px;
}
.mm-minutes-rendered h3,
.mm-minutes-rendered h4 {
  font-size: 1.04rem;
}
.mm-minutes-rendered p {
  margin: 8px 0;
}
.mm-minutes-rendered hr {
  border: none;
  border-top: 1px solid #cbd5e1;
  margin: 16px 0;
}
.mm-minutes-rendered ul,
.mm-minutes-rendered ol {
  margin: 8px 0;
  padding-left: 1.35em;
}
.mm-minutes-rendered li {
  margin: 4px 0;
}
.mm-minutes-rendered ul {
  list-style: disc;
}
.mm-minutes-rendered ol {
  list-style: decimal;
}
.mm-minutes-rendered blockquote {
  margin: 8px 0;
  padding: 6px 0 6px 12px;
  border-left: 3px solid #cbd5e1;
  color: #475569;
}
.mm-minutes-rendered strong {
  font-weight: 700;
  color: #0f172a;
}
.mm-minutes-rendered a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}
.mm-minutes-rendered pre {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.45;
  overflow-x: auto;
}
.mm-minutes-rendered :not(pre) > code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  font-size: 0.92em;
}
/* 마크다운 표(회의 진행 흐름 등): 셀·행 구분선 */
.mm-minutes-rendered table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
  border: 1px solid #d8dee6;
}
.mm-minutes-rendered th,
.mm-minutes-rendered td {
  border: 1px solid #d8dee6;
  padding: 10px 12px;
  vertical-align: top;
  text-align: left;
}
.mm-minutes-rendered th {
  background: #f1f5f9;
  font-weight: 600;
  color: #0f172a;
}

.mm-minutes-source[hidden] {
  display: none !important;
}
.mm-result-textarea:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}
.mm-gen-progress {
  margin: 12px 0 8px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f0fdfa 0%, #f8fafc 100%);
  border: 1px solid #99f6e4;
  border-radius: 10px;
}
.mm-gen-progress-track-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.mm-gen-progress-track {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  overflow: hidden;
}
.mm-gen-progress-pct {
  flex-shrink: 0;
  min-width: 3.2em;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: #0f766e;
  font-variant-numeric: tabular-nums;
}
.mm-gen-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 38%;
  border-radius: 3px;
  background: linear-gradient(90deg, #0f766e, #14b8a6, #0f766e);
  animation: mm-gen-progress-slide 1.35s ease-in-out infinite;
  transition: width 0.3s ease;
}
.mm-gen-progress-bar--determined {
  animation: none;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
@keyframes mm-gen-progress-slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(280%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .mm-gen-progress-bar {
    animation: none;
    width: 100%;
    max-width: none;
    opacity: 0.85;
  }
  .mm-gen-progress-bar--determined {
    transition: none;
  }
}
.mm-gen-progress-msg {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #0f766e;
  font-weight: 600;
}
.mm-gen-audio-pipeline {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #99f6e4;
}
.mm-gen-pipeline-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 13px;
  color: #64748b;
}
.mm-gen-pipeline-step-num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.mm-gen-pipeline-join {
  color: #94a3b8;
  font-weight: 500;
  user-select: none;
}
.mm-gen-audio-pipeline .mm-gen-pipeline-step {
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #f1f5f9;
  color: #94a3b8;
  font-weight: 600;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}
.mm-gen-audio-pipeline .mm-gen-pipeline-step.is-pending {
  opacity: 0.55;
  border-style: dashed;
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #9ca3af;
  font-weight: 500;
}
.mm-gen-audio-pipeline .mm-gen-pipeline-step.is-active {
  opacity: 1;
  transform: translateY(-1px);
  border-style: solid;
  border-width: 3px;
  padding: 5px 13px;
  border-color: #0f766e;
  background: linear-gradient(165deg, #5eead4 0%, #2dd4bf 45%, #14b8a6 100%);
  color: #042f2e;
  font-weight: 800;
  box-shadow:
    0 0 0 1px rgba(15, 118, 110, 0.25),
    0 4px 12px rgba(15, 118, 110, 0.22);
  animation: mm-step-active-pulse 2s ease-in-out infinite;
}
.mm-gen-audio-pipeline .mm-gen-pipeline-step.is-active .mm-gen-pipeline-step-num {
  font-weight: 900;
}
.mm-gen-audio-pipeline .mm-gen-pipeline-step.is-done {
  opacity: 1;
  transform: none;
  border-style: solid;
  border-width: 3px;
  padding: 5px 13px;
  border-color: #059669;
  background: linear-gradient(165deg, #a7f3d0 0%, #6ee7b7 50%, #34d399 100%);
  color: #064e3b;
  font-weight: 700;
  box-shadow: 0 1px 6px rgba(5, 150, 105, 0.2);
}
.mm-gen-audio-pipeline .mm-gen-pipeline-step.is-done .mm-gen-pipeline-step-num {
  font-weight: 900;
}

@keyframes mm-step-active-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(15, 118, 110, 0.25),
      0 4px 12px rgba(15, 118, 110, 0.22);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(45, 212, 191, 0.2),
      0 6px 16px rgba(15, 118, 110, 0.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-gen-audio-pipeline .mm-gen-pipeline-step.is-active {
    animation: none;
    transform: none;
  }
}

.mm-gen-pipeline-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
  font-weight: 500;
}
.mm-result-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.55;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  max-height: 60vh;
  overflow: auto;
}

/* 업무 체크리스트 AI */
.task-checklist-page .tcl-lead {
  margin: 0 0 16px;
  max-width: 52rem;
  line-height: 1.55;
}
.tcl-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 20px;
}
.tcl-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tcl-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}
.tcl-sort-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}
.tcl-sort-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-right: 4px;
}
.task-checklist-page .tcl-sort-btn {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.task-checklist-page .tcl-sort-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.task-checklist-page .tcl-sort-btn.tcl-sort-btn-active {
  color: #0f766e;
  border-color: #0f766e;
  background: #ecfdf5;
  font-weight: 600;
}
.tcl-section-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
}
.tcl-add-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}
@media (max-width: 720px) {
  .tcl-add-grid {
    grid-template-columns: 1fr;
  }
}
.tcl-field-wide {
  grid-column: 1 / -1;
}
.tcl-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tcl-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 0;
}
.tcl-item-done .tcl-item-title {
  text-decoration: line-through;
  color: #64748b;
}
.tcl-item-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.tcl-checkbox {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #0f766e;
}
.tcl-item-body {
  flex: 1;
  min-width: 0;
}
.tcl-item-meeting {
  font-size: 12px;
  font-weight: 500;
  color: #0f766e;
  margin-bottom: 4px;
  line-height: 1.35;
}
.tcl-item-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
}
.tcl-item-meta {
  margin-top: 6px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.tcl-tooltip-wrap {
  position: relative;
  display: block;
  outline: none;
  border-radius: 4px;
}
.tcl-tooltip-wrap:hover .tcl-popup,
.tcl-tooltip-wrap:focus .tcl-popup {
  display: block;
}
.tcl-popup {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  min-width: 240px;
  max-width: min(400px, 92vw);
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  z-index: 20;
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
}
.tcl-popup-block {
  margin-bottom: 10px;
}
.tcl-popup-block:last-child {
  margin-bottom: 0;
}
.tcl-popup-label {
  font-size: 11px;
  font-weight: 700;
  color: #0f766e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.tcl-popup-value {
  white-space: pre-wrap;
  word-break: break-word;
}
.tcl-item-actions {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.task-checklist-page .tcl-btn-outline {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #2563eb;
  color: #2563eb;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.3;
}
.task-checklist-page .tcl-btn-outline:hover {
  background: #eff6ff;
}
.task-checklist-page .tcl-btn-outline-danger {
  border-color: #dc2626;
  color: #dc2626;
}
.task-checklist-page .tcl-btn-outline-danger:hover {
  background: #fef2f2;
}
.tcl-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.tcl-modal[hidden] {
  display: none !important;
}
.tcl-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}
.tcl-modal-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 20px 22px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}
.tcl-modal-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.tcl-complete-preview {
  margin: -8px 0 14px;
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
  word-break: break-word;
}
.tcl-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.tcl-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.tcl-empty {
  margin: 0;
  padding: 16px;
  color: #64748b;
  font-size: 14px;
}
