/* ==========================================================================
   사진대지 생성기 - Responsive Custom Layout Builder Design System 2.0
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --accent: #4f46e5;
  --accent-light: #eef2ff;

  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-secondary: #f1f5f9;
  --bg-input: #ffffff;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #94a3b8;

  --border-subtle: #e2e8f0;
  --border-focus: #3b82f6;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 14px 34px rgba(15, 23, 42, 0.1);
  --shadow-sheet: 0 20px 45px -10px rgba(15, 23, 42, 0.15), 0 0 1px 1px rgba(15, 23, 42, 0.05);

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard", "Noto Sans KR", sans-serif;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark-theme {
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: #1e293b;
  --primary-border: #1e3a8a;
  --accent: #6366f1;
  --accent-light: #1e1b4b;

  --bg-page: #090d16;
  --bg-surface: #111827;
  --bg-surface-secondary: #1f2937;
  --bg-input: #1f2937;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;

  --border-subtle: #1f2937;
  --border-focus: #60a5fa;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.5);
  --shadow-sheet: 0 22px 50px -10px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.07);
}

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

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#app {
  width: 100%;
  overflow-x: hidden;
}

/* Linear & Stripe Style: Tabular numeric alignment for B2B accuracy */
input[type="number"],
input[type="date"],
.inp-amount,
.receipt-total-value,
.receipt-a4-meta-table .meta-val,
.preview-badge,
.time-savings-text strong,
.doc-spec-table td,
.approval-step-input {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.main-nav {
  position: relative;
  width: 100%;
  z-index: 900;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow 0.2s ease, background-color 0.3s ease;
}

.dark-theme .main-nav {
  background: rgba(17, 24, 39, 0.94);
}

/* PC 버전 전용: 엑셀 틀고정처럼 마우스 휠 스크롤 시 상단 완벽 고정 */
@media (min-width: 1025px) {
  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  }

  body {
    padding-top: 60px;
  }

  .dark-theme .main-nav {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  }
}

.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-surface-secondary);
  padding: 0.25rem 0.35rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.38rem 0.9rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link.active {
  background: var(--bg-surface);
  color: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.control-btn {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* ==========================================================================
   다국어 10개국 드롭다운 메뉴 스타일링
   ========================================================================== */
.lang-dropdown-container {
  position: relative;
  display: inline-block;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.65rem;
  cursor: pointer;
  user-select: none;
}

.lang-btn .lang-icon {
  font-size: 1rem;
  line-height: 1;
}

.lang-btn .lang-current-label {
  font-size: 0.8rem;
  font-weight: 700;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-btn .lang-arrow {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}

.lang-dropdown-container.open .lang-btn .lang-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 175px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.35rem;
  z-index: 1000;
  animation: langMenuFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
}

@keyframes langMenuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lang-dropdown-container.open .lang-dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.lang-menu-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.lang-menu-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
}

.lang-item-flag {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.lang-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-item-check {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 900;
}

.dark-theme .lang-dropdown-menu {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* 모바일 전용 네비게이션 보정 (화면 폭 640px 이하) */
@media (max-width: 640px) {
  .nav-container {
    padding: 0.45rem 0.65rem;
    gap: 0.35rem;
  }
  .brand-link {
    font-size: 0.95rem;
    gap: 0.3rem;
  }
  .brand-icon {
    font-size: 1.15rem;
  }
  .brand-text {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    font-size: 0.92rem;
  }
  .nav-menu {
    padding: 0.2rem 0.25rem;
    gap: 0.15rem;
  }
  .nav-link {
    font-size: 0.78rem;
    padding: 0.3rem 0.55rem;
  }
  .control-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.45rem;
    min-height: 28px;
  }
}

@media (max-width: 380px) {
  .nav-container {
    padding: 0.4rem 0.45rem;
    gap: 0.2rem;
  }
  .brand-text {
    font-size: 0.82rem;
  }
  .nav-link {
    font-size: 0.72rem;
    padding: 0.25rem 0.4rem;
  }
  .control-btn {
    font-size: 0.7rem;
    padding: 0.2rem 0.35rem;
  }
}

/* ==========================================================================
   Workspace Layout (Responsive 2-Column Split)
   ========================================================================== */
.workspace-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  width: 100%;
}

@media (max-width: 640px) {
  .workspace-container {
    padding: 1rem 0.65rem 3rem;
  }
}

.text-center {
  text-align: center;
}

.header-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  width: 100%;
}

@media (max-width: 640px) {
  .header-section {
    margin-bottom: 1.25rem;
  }
}

.header-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.38rem 1rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 auto 0.75rem auto;
  text-align: center;
}

.main-title {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 auto 0.65rem auto;
  text-align: center;
  color: var(--text-main);
}

@media (max-width: 640px) {
  .main-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }
}

.subtitle {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  line-height: 1.5;
  word-break: keep-all;
}

@media (min-width: 860px) {
  .subtitle {
    white-space: nowrap;
  }
}

@media (max-width: 859px) {
  .subtitle {
    max-width: 680px;
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .subtitle {
    font-size: 0.86rem;
    line-height: 1.45;
    padding: 0 0.5rem;
    white-space: normal;
  }
}

/* ==========================================================================
   Feature Highlights Bar (Mobile & Unlimited Pages & Security & Formats)
   ========================================================================== */
.feature-highlights-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.75rem;
  width: 100%;
}

@media (max-width: 1280px) {
  .feature-highlights-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 860px) {
  .feature-highlights-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }
}

@media (max-width: 540px) {
  .feature-highlights-bar {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.feature-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-chip:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-chip.highlight-ai {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
  border: 1.5px solid rgba(139, 92, 246, 0.45);
  position: relative;
  overflow: hidden;
}

.feature-chip.highlight-ai:hover {
  border-color: #8b5cf6;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
  transform: translateY(-2px);
}

.feature-chip-title-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.chip-ai-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.feature-chip-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.feature-chip-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.15rem;
}

.feature-chip-text strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feature-chip-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Mobile Tab Bar (1024px 이하 화면에서 설정 vs 미리보기 전환)
   ========================================================================== */
.mobile-tab-bar {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-tab-bar {
    display: flex;
    background: var(--bg-surface-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 4px;
    margin-bottom: 1.25rem;
    gap: 4px;
    width: 100%;
  }
  .mobile-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: none;
    border: none;
    padding: 0.6rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
  }
  .mobile-tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
  }
  /* 탭 선택에 따른 노출 제어 */
  .builder-layout[data-mobile-active="settings"] .control-column {
    display: flex;
  }
  .builder-layout[data-mobile-active="settings"] .preview-column {
    display: none;
  }
  .builder-layout[data-mobile-active="preview"] .control-column {
    display: none;
  }
  .builder-layout[data-mobile-active="preview"] .preview-column {
    display: block;
  }
}

@media (max-width: 480px) {
  .mobile-tab-btn {
    padding: 0.52rem 0.25rem;
    font-size: 0.8rem;
    gap: 0.2rem;
  }
}

.builder-layout {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 1.75rem;
  align-items: flex-start;
  width: 100%;
}

@media (max-width: 1200px) {
  .builder-layout {
    grid-template-columns: 420px 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 1024px) {
  .builder-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
}

/* ==========================================================================
   Preview Column & Sticky Viewport (공사 사진대지 & 영수증 지출결의서 공통)
   ========================================================================== */
.preview-column {
  min-width: 0;
  width: 100%;
}

@media (min-width: 1025px) {
  .preview-column {
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 84px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    border-radius: var(--radius-md);
  }
}

.preview-sticky-card {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.preview-panel-header,
.preview-header-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.15rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Control Column & Accordion Cards
   ========================================================================== */
.control-column {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-width: 0;
  width: 100%;
}

.accordion-global-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.25rem;
  margin-bottom: -0.35rem;
}

.control-summary-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.btn-toggle-all {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-toggle-all:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  min-width: 0;
  width: 100%;
}

@media (max-width: 640px) {
  .panel-card {
    border-radius: var(--radius-md);
  }
}

.panel-card:hover {
  box-shadow: var(--shadow-md);
}

/* Accordion Specific Styles */
.panel-card.panel-accordion {
  padding: 0;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.panel-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.35rem;
  cursor: pointer;
  user-select: none;
  background: var(--bg-surface);
  transition: background-color 0.15s ease;
}

@media (max-width: 640px) {
  .panel-accordion-header {
    padding: 0.85rem 0.95rem;
  }
}

.panel-accordion-header:hover {
  background: var(--bg-surface-secondary);
}

.accordion-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

@media (max-width: 640px) {
  .accordion-header-left {
    gap: 0.45rem;
  }
}

.accordion-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .accordion-badge {
    max-width: 110px;
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
  }
}

.panel-card.expanded .accordion-badge {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

.accordion-arrow {
  font-size: 0.72rem;
  color: var(--text-sub);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.panel-card.expanded .accordion-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.accordion-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.panel-accordion-body {
  padding: 0 1.35rem 1.35rem;
  display: none;
}

@media (max-width: 640px) {
  .panel-accordion-body {
    padding: 0 1rem 1.15rem;
  }
}

.panel-card.expanded .panel-accordion-body {
  display: block;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.15rem;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.panel-header.justify-between {
  justify-content: space-between;
}

@media (max-width: 480px) {
  .panel-header.justify-between {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .panel-title {
    font-size: 1rem;
  }
  .btn-pill-secondary, .btn-pill-primary {
    padding: 0.3rem 0.55rem;
    font-size: 0.75rem;
  }
}

.panel-icon {
  font-size: 1.25rem;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: keep-all;
  white-space: normal;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .panel-title {
    font-size: 0.95rem;
    word-break: keep-all;
  }
}

.panel-help {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  line-height: 1.4;
}

/* Preset Buttons */
.preset-group {
  margin-bottom: 1.25rem;
}

.preset-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.5rem;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
}

@media (max-width: 480px) {
  .preset-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
  }
}

.btn-preset {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.42rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

@media (max-width: 480px) {
  .btn-preset {
    padding: 0.42rem 0.2rem;
    font-size: 0.76rem;
    text-align: center;
    white-space: nowrap;
    border-radius: var(--radius-sm);
  }
}

.btn-preset:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

.btn-preset.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* Grid Stepper Inputs */
.grid-inputs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  width: 100%;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  width: 100%;
}

.input-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.stepper-wrapper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

.stepper-wrapper input {
  width: 100%;
  min-width: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  background: none;
  color: var(--text-main);
  outline: none;
}

.btn-step {
  background: var(--bg-surface-secondary);
  border: none;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-step:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.custom-input {
  width: 100%;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  background-color: var(--bg-input);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
}

.custom-input:focus {
  border-color: var(--border-focus);
}

.mt-3 { margin-top: 0.85rem; }

/* ==========================================================================
   Field Builder List & Toolbar
   ========================================================================== */
.fields-top-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.fields-action-buttons {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .fields-top-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }
  .fields-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    width: 100%;
  }
  .fields-action-buttons button {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.45rem 0.5rem;
  }
}

.btn-pill-primary {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-pill-primary:hover {
  background: var(--primary);
  color: #ffffff;
}

.btn-pill-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-pill-secondary:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

.fields-builder-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

/* ====================================================================
   행(Row) 단위 다중 2열 필드 빌더 스타일
   ==================================================================== */
.field-row-group {
  background: var(--bg-surface-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
  transition: var(--transition);
  width: 100%;
  box-sizing: border-box;
}

.field-row-group:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.field-row-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px dashed var(--border-subtle);
}

.row-num-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.row-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-2col {
  font-size: 0.68rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-add-row-col {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-row-col:hover {
  background: var(--primary);
  color: #ffffff;
}

.btn-remove-row {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-remove-row:hover {
  color: #ef4444;
  background: #fee2e2;
}

.field-row-cols-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  width: 100%;
}

.field-row-cols-wrap.is-split {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 580px) {
  .field-row-cols-wrap.is-split {
    grid-template-columns: 1fr;
  }
}

.field-col-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.field-col-card.is-second-col {
  border-color: var(--primary-border);
}

.field-col-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.col-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--bg-surface-secondary);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  flex-shrink: 0;
}

.field-label-input {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
}

.btn-remove-col {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 3px;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-remove-col:hover {
  color: #ef4444;
  background: #fee2e2;
}

.field-col-body {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.field-type-select {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

.auto-detect-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================================================
   Upload Zone & Chips
   ========================================================================== */
.upload-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.25rem;
  text-align: center;
  background: var(--bg-surface-secondary);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1rem;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-input-hidden { display: none; }

.upload-icon-wrapper {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.75rem;
  background: var(--bg-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.upload-icon { width: 22px; height: 22px; }

.upload-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  word-break: keep-all;
  line-height: 1.4;
}

.upload-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.upload-btn-row {
  margin-top: 0.9rem;
}

.btn-browse-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.35rem;
  background: var(--bg-surface, #ffffff);
  border: 1.5px solid var(--primary, #2563eb);
  color: var(--primary, #2563eb);
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.btn-browse-file:hover {
  background: var(--primary, #2563eb);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.btn-browse-file:active {
  transform: translateY(0);
}

.uploaded-chip-list {
  margin-bottom: 1.25rem;
}

.chip-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.count-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
}

.btn-clear-all {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.chip-scroll-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.2rem;
}

.photo-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.82rem;
}

.chip-idx {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.chip-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-btn-edit {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.chip-btn-del {
  background: none;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.1rem 0.3rem;
}

.download-action-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
  margin-top: 1rem;
}

.btn-generate-main {
  width: 100%;
  min-width: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  border: none;
  padding: 0.95rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: var(--transition);
  white-space: normal;
  text-align: center;
  word-break: keep-all;
  line-height: 1.35;
}

.btn-generate-pdf {
  width: 100%;
  min-width: 0;
  background: linear-gradient(135deg, #059669, #0d9488);
  color: #ffffff;
  border: none;
  padding: 0.95rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  transition: var(--transition);
  white-space: normal;
  text-align: center;
  word-break: keep-all;
  line-height: 1.35;
}

.btn-generate-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-generate-pdf:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-generate-hwpx {
  width: 100%;
  min-width: 0;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border: none;
  padding: 0.95rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transition: var(--transition);
  white-space: normal;
  text-align: center;
  word-break: keep-all;
  line-height: 1.35;
}

.btn-generate-hwpx:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

.btn-generate-hwpx:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 480px) {
  .btn-generate-main,
  .btn-generate-pdf,
  .btn-generate-hwpx {
    font-size: 0.92rem;
    padding: 0.85rem 0.9rem;
  }
}

.btn-generate-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-generate-main:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   Preview Column & A4 Sheet Simulator
   ========================================================================== */
.preview-column {
  position: relative;
  min-width: 0;
  width: 100%;
}

.preview-sticky-card {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  width: 100%;
}

.preview-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  width: 100%;
}

@media (max-width: 640px) {
  .preview-header-bar {
    padding: 0.6rem 0.85rem;
  }
}

.preview-info-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-dot {
  width: 9px;
  height: 9px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.preview-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.preview-meta-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.badge-page {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Margin Controls & Segment Buttons
   ========================================================================== */
.btn-segment-group {
  display: flex;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
  width: 100%;
  min-width: 0;
}

.btn-segment {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  padding: 0.45rem 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 480px) {
  .btn-segment {
    padding: 0.4rem 0.2rem;
    font-size: 0.76rem;
  }
}

.btn-segment:hover {
  color: var(--text-main);
}

.btn-segment.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.margin-grid-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.65rem;
  margin-top: 0.5rem;
  width: 100%;
}

.margin-input-box {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  width: 100%;
}

.margin-input-box label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.margin-step-wrapper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

.margin-step-wrapper input {
  width: 100%;
  min-width: 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  background: none;
  color: var(--text-main);
  outline: none;
}

.margin-unit {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-sub);
  padding-right: 0.5rem;
  flex-shrink: 0;
}

.btn-margin-step {
  background: var(--bg-surface-secondary);
  border: none;
  width: 30px;
  height: 32px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-margin-step:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ==========================================================================
   Preview Column & Sticky Live A4 Paper Simulator
   ========================================================================== */
.preview-column {
  position: sticky;
  top: 1.25rem;
  max-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
  min-width: 0;
  z-index: 10;
}

@media (max-width: 1024px) {
  .preview-column {
    position: static;
    max-height: none;
  }
}

.preview-sticky-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2.5rem);
  overflow: hidden;
  transition: var(--transition);
}

@media (max-width: 1024px) {
  .preview-sticky-card {
    max-height: none;
    overflow: visible;
  }
}

.preview-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.preview-info-box {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: live-dot-pulse 1.8s infinite;
}

@keyframes live-dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.preview-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.preview-meta-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.badge-page {
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.76rem;
}

/* Virtual A4 Sheet Container & Margin Shading Overlay */
.a4-sheet-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: var(--bg-surface-secondary);
  padding: 1.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  width: 100%;
}

@media (max-width: 1024px) {
  .a4-sheet-container {
    padding: 0.85rem;
    overflow-y: visible;
    max-height: none;
    border-radius: var(--radius-md);
  }
}

.a4-sheet {
  background: #ffffff;
  color: #111827;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1.414; /* A4 용지 정밀 비율 (1:√2) */
  border-radius: 4px;
  box-shadow: var(--shadow-sheet);
  border: 1px solid #d1d5db;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

/* Margin Shading Guide Overlay */
.a4-margin-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 5;
}

.margin-guide-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(37, 99, 235, 0.08);
  border-bottom: 1.5px dashed rgba(37, 99, 235, 0.4);
}

.margin-guide-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(37, 99, 235, 0.08);
  border-top: 1.5px dashed rgba(37, 99, 235, 0.4);
}

.margin-guide-left {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: rgba(37, 99, 235, 0.08);
  border-right: 1.5px dashed rgba(37, 99, 235, 0.4);
}

.margin-guide-right {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  background: rgba(37, 99, 235, 0.08);
  border-left: 1.5px dashed rgba(37, 99, 235, 0.4);
}

.margin-guide-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  background: rgba(37, 99, 235, 0.15);
  color: var(--primary);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  z-index: 6;
}

/* Inner Printable Content */
.a4-sheet-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

.a4-sheet-header {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding-bottom: 0.35rem;
  border-bottom: none;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.a4-sheet-header.align-left {
  justify-content: flex-start;
  text-align: left;
}

.a4-sheet-header.align-center {
  justify-content: center;
  text-align: center;
}

.a4-sheet-header.align-right {
  justify-content: flex-end;
  text-align: right;
}

.a4-sheet-grid {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  gap: 0.55rem;
  align-content: stretch;
  overflow: hidden;
}

.a4-cut-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #9ca3af;
  border-radius: 0;
  overflow: hidden;
  background: #ffffff;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}

.a4-image-box {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  background: #ffffff;
  padding: 4px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #9ca3af;
}

.a4-image-box.empty {
  background: #f3f4f6;
  padding: 0;
}

.a4-image-box img {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: cover;
  object-position: center center;
  display: block;
  border: 1px solid #d1d5db;
  box-sizing: border-box;
}

.a4-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 600;
}

.a4-num-badge {
  background: #e5e7eb;
  color: #4b5563;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.a4-caption-table {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

.a4-caption-row {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  border-bottom: 1px solid #d1d5db;
  font-size: 0.72rem;
  line-height: 1.3;
}

.a4-caption-row:last-child {
  border-bottom: none;
}

.a4-caption-row.two-cols {
  display: flex;
  flex-direction: row;
  width: 100%;
  box-sizing: border-box;
}

.a4-col-pair {
  display: flex;
  width: 50%;
  min-width: 0;
  box-sizing: border-box;
}

.a4-col-pair:first-child {
  border-right: 1px solid #d1d5db;
}

.dark-theme .a4-col-pair:first-child {
  border-right-color: #334155;
}

.a4-col-pair .a4-caption-label {
  width: 35%;
  min-width: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  font-size: 0.68rem;
  letter-spacing: -0.3px;
  padding: 0.2rem 0.2rem;
}

.a4-col-pair .a4-caption-value {
  width: 65%;
  min-width: 0;
  flex: 1;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
  padding: 0.2rem 0.25rem;
  font-size: 0.68rem;
}

.has-col-layout .a4-caption-row:not(.two-cols) .a4-caption-label {
  width: 17.5%;
  min-width: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  font-size: 0.68rem;
  letter-spacing: -0.3px;
  padding: 0.2rem 0.2rem;
}

.has-col-layout .a4-caption-row:not(.two-cols) .a4-caption-value {
  width: 82.5%;
  min-width: 0;
  flex: 1;
  box-sizing: border-box;
}

.a4-caption-label {
  width: 28%;
  min-width: 0;
  flex-shrink: 0;
  background: #f3f4f6;
  color: #374151;
  font-weight: 700;
  text-align: center;
  padding: 0.25rem 0.3rem;
  border-right: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  letter-spacing: -0.3px;
}

.a4-caption-value {
  width: 72%;
  min-width: 0;
  flex: 1;
  padding: 0.25rem 0.4rem;
  color: #111827;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.a4-sheet-footer {
  font-size: 0.75rem;
  color: #6b7280;
  padding-top: 0.35rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.a4-sheet-footer.align-left {
  justify-content: flex-start;
  text-align: left;
}

.a4-sheet-footer.align-center {
  justify-content: center;
  text-align: center;
}

.a4-sheet-footer.align-right {
  justify-content: flex-end;
  text-align: right;
}

.a4-sheet-footer.align-none {
  display: none;
}

/* ==========================================================================
   Modals & User Guide
   ========================================================================== */
.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.preview-modal.active { display: flex; }

.preview-content {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
  position: relative;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.preview-image-container {
  width: 100%;
  height: 200px;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.preview-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  background: var(--bg-surface-secondary);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.preview-metadata {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.metadata-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.metadata-field label {
  font-size: 0.82rem;
  font-weight: 700;
}

.metadata-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
}

.metadata-save-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.75rem;
  transition: var(--transition);
}

.metadata-save-btn:hover { background: var(--primary-hover); }

/* ==========================================================================
   Premium User Guide (/about) Visual Design System
   ========================================================================== */
.about-hero {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3rem;
}

.about-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 0.85rem;
  color: var(--text-main);
}

.about-hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 4-Step Visual Process Grid */
.guide-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-bottom: 3.5rem;
}

@media (max-width: 840px) {
  .guide-visual-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.guide-step-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.guide-step-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.guide-step-card.highlight {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.12);
}

.step-card-header {
  margin-bottom: 1.25rem;
}

.step-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.step-pill {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.step-icon-large {
  font-size: 1.75rem;
  line-height: 1;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.step-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Mini UI Mockup Graphics inside Step Cards */
.card-mockup-wrap {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
}

/* Mockup 1: Drop & Photo Chip */
.mockup-dropzone {
  border: 1.5px dashed var(--primary-border);
  background: var(--bg-surface);
  border-radius: 8px;
  padding: 0.85rem;
  text-align: center;
  margin-bottom: 0.5rem;
}
.mockup-drop-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}
.mockup-chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-main);
}
.mockup-date-badge {
  background: #10b981;
  color: #fff;
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 3px;
}

/* Mockup 2: Grid & Caption Fields */
.mockup-grid-chips {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.mockup-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}
.mockup-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.mockup-row-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.mockup-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
}
.mockup-row-label {
  font-weight: 700;
  color: var(--primary);
}

/* Mockup 3: Mini A4 Margin Simulator */
.mockup-a4-mini {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 0.6rem;
  position: relative;
  overflow: hidden;
  height: 90px;
  display: flex;
  flex-direction: column;
}
.mockup-a4-shading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 6px solid rgba(37, 99, 235, 0.15);
  pointer-events: none;
}
.mockup-a4-header {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.3rem;
}
.mockup-a4-cells {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
}
.mockup-a4-cell {
  background: #f3f4f6;
  border: 1px solid #9ca3af;
  border-radius: 2px;
}

/* Mockup 4: Excel Download Ready */
.mockup-download-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid #10b981;
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
}
.mockup-excel-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
}
.mockup-check-badge {
  background: #10b981;
  color: #ffffff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Tips Section (3-Column Feature Cards) */
.tips-section-wrap {
  margin-bottom: 3.5rem;
}

.tips-section-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 840px) {
  .tips-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.tip-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.tip-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.tip-icon-box {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.tip-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.tip-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* CTA Banner */
.about-cta-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #4f46e5 100%);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2rem;
  text-align: center;
  color: #ffffff;
  box-shadow: var(--shadow-lg);
}

.cta-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.cta-subtitle {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 1.75rem;
}

.btn-cta-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #ffffff;
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.95rem 2rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.btn-cta-start:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Loading & Toast */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}
.loading-overlay.active { display: flex; }
.loading-spinner-container {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  text-align: center;
}
.loading-spinner-large {
  width: 42px;
  height: 42px;
  border: 3.5px solid var(--border-subtle);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.95rem; font-weight: 700; }

.notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  z-index: 10002;
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition);
}
.notification.show { transform: translateY(0); opacity: 1; }
.notification.success { border-color: #10b981; }
.notification.error { border-color: #ef4444; }
.notification-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; }

.app-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-sub);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-footer-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: var(--transition);
}

.btn-footer-link:hover {
  color: var(--primary);
}

.footer-sep {
  color: var(--border-subtle);
  font-size: 0.8rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ==========================================================================
   Google AdSense Slot Containers (Zero CLS Optimization)
   ========================================================================== */
.adsense-slot-wrap {
  width: 100%;
  max-width: 960px;
  margin: 1.5rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ad-tag-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.adsense-slot {
  width: 100%;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-secondary);
  border: 1px dashed var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: var(--transition);
}

/* 상단 리더보드 광고 (Desktop: 728x90, Mobile: Responsive) */
.ad-slot-leaderboard {
  min-height: 90px;
  max-width: 728px;
}

@media (max-width: 768px) {
  .ad-slot-leaderboard {
    min-height: 60px;
    max-width: 100%;
  }
}

/* 하단 배너 광고 */
.ad-slot-bottom {
  min-height: 100px;
  max-width: 728px;
}

.ad-placeholder-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.75rem;
}

.ad-icon-badge {
  background: var(--border-subtle);
  color: var(--text-main);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

/* ==========================================================================
   A4 Document Sheet Architecture (1 : 1.414 Precise Aspect Ratio)
   ========================================================================== */
.about-a4-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.04);
}

.about-a4-sheet {
  background: #ffffff;
  color: #111827;
  width: 100%;
  max-width: 720px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.08);
  padding: 2.2rem 2.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .about-a4-sheet {
    aspect-ratio: auto;
    min-height: auto;
    padding: 1.25rem;
  }
}

/* A4 Document Header */
.doc-header-box {
  border-bottom: 2px solid #111827;
  padding-bottom: 0.85rem;
  margin-bottom: 1.2rem;
  transition: border-color 0.2s ease;
}

.doc-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  color: #4b5563;
  font-weight: 700;
}

.doc-badge-pill {
  background: #1e3a8a;
  color: #ffffff;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.doc-main-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
  line-height: 1.25;
}

.doc-main-subtitle {
  font-size: 0.82rem;
  color: #4b5563;
  line-height: 1.4;
}

/* Section Title */
.doc-section-heading {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* 1. Specification Table */
.doc-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.2rem;
  font-size: 0.74rem;
}

.doc-spec-table th,
.doc-spec-table td {
  border: 1px solid #d1d5db;
  padding: 0.35rem 0.6rem;
  line-height: 1.35;
}

.doc-spec-table th {
  background: #f3f4f6;
  color: #1f2937;
  font-weight: 700;
  width: 25%;
  text-align: center;
}

.doc-spec-table td {
  color: #374151;
}

/* 2. 4-Step Flowchart in A4 Sheet */
.doc-flowchart-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

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

.doc-flow-step {
  border: 1.5px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 4px;
  padding: 0.65rem 0.5rem;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.doc-flow-step.highlight {
  border-color: #2563eb;
  background: #eff6ff;
}

.doc-step-num {
  font-size: 0.65rem;
  font-weight: 800;
  color: #2563eb;
  margin-bottom: 0.2rem;
}

.doc-step-icon {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.doc-step-name {
  font-size: 0.74rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.doc-step-desc {
  font-size: 0.65rem;
  color: #6b7280;
  line-height: 1.3;
}

/* 3. Field Rules Box */
.doc-rules-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0;
}

.doc-rules-list {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.72rem;
  color: #334155;
  line-height: 1.5;
}

.doc-rules-list li {
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   Dark Theme (다크모드 눈부심 방지 - 차콜/슬레이트 그레이 팔레트)
   ========================================================================== */
.dark-theme .about-a4-container {
  background: #0f172a;
  border-color: #1e293b;
}

.dark-theme .about-a4-sheet {
  background: #1e293b !important;
  color: #f1f5f9 !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
}

.dark-theme .doc-header-box {
  border-bottom-color: #334155;
}

.dark-theme .doc-top-meta {
  color: #64748b;
}

.dark-theme .doc-badge-pill {
  background: #2563eb;
  color: #ffffff;
}

.dark-theme .doc-main-title {
  color: #f8fafc;
}

.dark-theme .doc-main-subtitle {
  color: #94a3b8;
}

.dark-theme .doc-section-heading {
  color: #60a5fa;
  border-left-color: #3b82f6;
}

.dark-theme .doc-spec-table th {
  background: #0f172a;
  color: #cbd5e1;
  border-color: #334155;
}

.dark-theme .doc-spec-table td {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}

.dark-theme .doc-flow-step {
  background: #0f172a;
  border-color: #334155;
}

.dark-theme .doc-flow-step.highlight {
  background: rgba(37, 99, 235, 0.15);
  border-color: #3b82f6;
}

.dark-theme .doc-step-num {
  color: #60a5fa;
}

.dark-theme .doc-step-name {
  color: #f8fafc;
}

.dark-theme .doc-step-desc {
  color: #94a3b8;
}

.dark-theme .doc-rules-box {
  background: #0f172a;
  border-color: #334155;
}

.dark-theme .doc-rules-list {
  color: #cbd5e1;
}

/* 메인페이지 실시간 A4 프리뷰 시트 다크모드 눈부심 방지 (화면 프리뷰에만 한정 적용) */
.dark-theme .a4-sheet-container {
  background: #0f172a;
  border-color: #1e293b;
}

.dark-theme .a4-sheet-container .a4-sheet {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #334155;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.dark-theme .a4-sheet-container .a4-sheet-header {
  color: #f8fafc;
}

.dark-theme .a4-sheet-container .a4-cut-card {
  background: #0f172a;
  border-color: #334155;
}

.dark-theme .a4-sheet-container .a4-image-box {
  background: #1e293b;
  border-bottom-color: #334155;
}

.dark-theme .a4-sheet-container .a4-placeholder {
  color: #64748b;
}

.dark-theme .a4-sheet-container .a4-num-badge {
  background: #334155;
  color: #f1f5f9;
}

.dark-theme .a4-sheet-container .a4-caption-row {
  border-bottom-color: #334155;
}

.dark-theme .a4-sheet-container .a4-col-pair:first-child {
  border-right-color: #334155;
}

.dark-theme .a4-sheet-container .a4-caption-label {
  background: #0f172a;
  color: #94a3b8;
  border-right-color: #334155;
}

.dark-theme .a4-sheet-container .a4-caption-value {
  color: #f1f5f9;
}

.dark-theme .a4-sheet-container .a4-sheet-footer {
  color: #94a3b8;
}

/* ==========================================================================
   PDF 출력용 오프스크린 컨테이너: 다크모드 상속 절대 방지 및 A4 표준 규격 고정
   ========================================================================== */
#pdf-export-container,
#pdf-export-container * {
  color-scheme: light !important;
  box-sizing: border-box !important;
}

.dark-theme #pdf-export-container,
#pdf-export-container {
  background: #ffffff !important;
  color: #111827 !important;
}

.dark-theme #pdf-export-container .a4-sheet,
#pdf-export-container .a4-sheet {
  background: #ffffff !important;
  color: #111827 !important;
  box-shadow: none !important;
  border: none !important;
}

.dark-theme #pdf-export-container .a4-sheet-header,
#pdf-export-container .a4-sheet-header {
  color: #000000 !important;
}

.dark-theme #pdf-export-container .a4-cut-card,
#pdf-export-container .a4-cut-card {
  background: #ffffff !important;
  border: 1px solid #9ca3af !important;
  border-radius: 0 !important;
}

.dark-theme #pdf-export-container .a4-image-box,
#pdf-export-container .a4-image-box {
  background: #ffffff !important;
  border-bottom: 1px solid #9ca3af !important;
  padding: 4px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.dark-theme #pdf-export-container .a4-image-box img,
#pdf-export-container .a4-image-box img {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
  display: block !important;
}

.dark-theme #pdf-export-container .a4-caption-table,
#pdf-export-container .a4-caption-table {
  background: #ffffff !important;
  border-top: none !important;
}

.dark-theme #pdf-export-container .a4-caption-row,
#pdf-export-container .a4-caption-row {
  background: #ffffff !important;
  border-bottom: 1px solid #d1d5db !important;
}

.dark-theme #pdf-export-container .a4-col-pair:first-child,
#pdf-export-container .a4-col-pair:first-child {
  border-right: 1px solid #d1d5db !important;
}

.dark-theme #pdf-export-container .a4-caption-label,
#pdf-export-container .a4-caption-label {
  background: #f4f5f7 !important;
  color: #1f2937 !important;
  font-weight: 700 !important;
  border-right: 1px solid #d1d5db !important;
}

.dark-theme #pdf-export-container .a4-caption-value,
#pdf-export-container .a4-caption-value {
  background: #ffffff !important;
  color: #111827 !important;
  font-weight: 500 !important;
}

.dark-theme #pdf-export-container .a4-sheet-footer,
#pdf-export-container .a4-sheet-footer {
  color: #4b5563 !important;
}

/* ==========================================================================
   FAQ Section (Rich Text for AdSense Quality Rating)
   ========================================================================== */
.about-faq-wrap {
  max-width: 840px;
  margin: 0 auto 3.5rem;
}

.faq-title {
  text-align: center;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.faq-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.faq-q {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.faq-a {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Privacy Policy & Terms Modal
   ========================================================================== */
.policy-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.policy-modal-card {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.policy-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.policy-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.policy-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.policy-modal-body {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.policy-modal-body h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

.policy-modal-body p,
.policy-modal-body ul {
  margin-bottom: 0.75rem;
}

/* ====================================================================
   [NEW] 스폰서 및 제휴 광고주 모집 안내 배너
   ==================================================================== */
.sponsor-notice-wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto 1.5rem auto;
  position: relative;
}

.sponsor-badge-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-left: 0.5rem;
}

.sponsor-banner-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.sponsor-banner-card:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
  box-shadow: var(--shadow-md);
}

.sponsor-banner-content {
  flex: 1 1 auto;
}

.sponsor-banner-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sponsor-banner-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.btn-sponsor-inquiry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.btn-sponsor-inquiry:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.35);
}

@media (max-width: 640px) {
  .sponsor-banner-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    text-align: center;
  }
  .sponsor-banner-title {
    justify-content: center;
  }
  .btn-sponsor-inquiry {
    width: 100%;
  }
}

/* ====================================================================
   [NEW] 5대 업종별 템플릿(프리셋) 선택 그리드
   ==================================================================== */
.industry-template-card {
  margin-bottom: 1.25rem;
}

.template-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.btn-template-preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-main);
  text-align: center;
}

.btn-template-preset .tmpl-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.btn-template-preset .tmpl-name {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.btn-template-preset:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-template-preset.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.btn-template-preset.active .tmpl-name {
  color: #ffffff;
}

/* ====================================================================
   [NEW] 비전 AI 일괄 내용 작성 및 진행률 컴포넌트
   ==================================================================== */
.ai-batch-action-wrap {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  padding: 0.85rem;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.05) 0%, rgba(37, 99, 235, 0.05) 100%);
  border: 1.5px solid rgba(147, 51, 234, 0.3);
  border-radius: var(--radius-md);
}

.ai-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #9333ea;
  background: rgba(147, 51, 234, 0.12);
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.btn-ai-key-config {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-ai-key-config:hover {
  color: var(--primary);
  background: var(--bg-hover);
}

.btn-ai-batch {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-ai-batch:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
}

.btn-ai-batch:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ai-progress-wrap {
  margin-top: 0.75rem;
}

.ai-progress-bar {
  width: 100%;
  height: 7px;
  background: var(--border-subtle);
  border-radius: 9999px;
  overflow: hidden;
}

.ai-progress-fill {
  height: 100%;
  background: var(--primary);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-progress-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.35rem;
  text-align: center;
}

/* 개별 사진 칩 AI 버튼 */
.chip-btn-ai {
  background: rgba(147, 51, 234, 0.1);
  color: #9333ea;
  border: 1px solid rgba(147, 51, 234, 0.3);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  margin-right: 2px;
  transition: all 0.15s ease;
}

.chip-btn-ai:hover {
  background: #9333ea;
  color: #ffffff;
}

/* 모달 내 단일 AI 버튼 */
.modal-ai-action-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.btn-modal-ai {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-modal-ai:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.modal-ai-status {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ====================================================================
   [BRANDING] 누적 시간 절약 카운터 배너
   ==================================================================== */
.time-savings-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  max-width: 720px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(79, 70, 229, 0.12) 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.4rem;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
  animation: bannerPulse 3s ease-in-out infinite;
}

@keyframes bannerPulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08); }
  50% { box-shadow: 0 4px 18px rgba(37, 99, 235, 0.18); border-color: rgba(59, 130, 246, 0.45); }
}

.time-savings-content {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-primary);
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.time-savings-icon {
  font-size: 1.2rem;
  display: inline-block;
  animation: rotateIcon 4s linear infinite;
}

@keyframes rotateIcon {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  75% { transform: rotate(-15deg); }
  100% { transform: rotate(0deg); }
}

.time-savings-text strong {
  color: var(--primary);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.time-savings-detail {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-left: 0.35rem;
  background: rgba(255, 255, 255, 0.6);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .time-savings-detail {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

/* ====================================================================
   [NAVBAR] 즐겨찾기 및 공유하기 상단 고정 버튼 & 팝오버
   ==================================================================== */
.bookmark-btn, .share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.bookmark-btn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
  transform: translateY(-1px);
}

[data-theme="dark"] .bookmark-btn:hover {
  background: #78350f;
  border-color: #f59e0b;
  color: #fde68a;
}

.share-btn:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  transform: translateY(-1px);
}

[data-theme="dark"] .share-btn:hover {
  background: #1e3a8a;
  border-color: #3b82f6;
  color: #bfdbfe;
}

.share-dropdown-container {
  position: relative;
  display: inline-block;
}

.share-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  min-width: 175px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  animation: dropdownFadeIn 0.2s ease;
}

.share-dropdown-menu.active {
  display: flex;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.share-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.share-menu-item:hover {
  background: var(--bg-hover, rgba(0, 0, 0, 0.05));
  color: var(--primary);
}

[data-theme="dark"] .share-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.share-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 0.85rem;
}

.kakao-badge { background: #fee500; color: #181600; }
.band-badge { background: #06c755; color: #ffffff; }
.x-badge { background: #000000; color: #ffffff; }
.fb-badge { background: #1877f2; color: #ffffff; }
.copy-badge { background: #64748b; color: #ffffff; }

/* ====================================================================
   [MODAL] 다운로드 완료 직후 칼퇴 축하 & 동료 공유 모달
   ==================================================================== */
.celebrate-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  animation: fadeInModal 0.25s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.celebrate-modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
  max-width: 480px;
  width: 100%;
  padding: 2.25rem 2rem 1.75rem 2rem;
  text-align: center;
  position: relative;
  animation: scaleUpModal 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUpModal {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.celebrate-icon-glow {
  font-size: 3.25rem;
  margin-bottom: 0.75rem;
  display: inline-block;
  animation: subtlePulse 2s ease-in-out infinite alternate;
}

@keyframes subtlePulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(234, 179, 8, 0.3)); }
  100% { transform: scale(1.04); filter: drop-shadow(0 0 14px rgba(234, 179, 8, 0.5)); }
}

.celebrate-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}

.celebrate-modal-desc {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.celebrate-modal-desc strong {
  color: var(--primary);
}

.celebrate-share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.btn-celebrate-share {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-celebrate-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.c-share-icon {
  font-size: 1.3rem;
}

.btn-celebrate-share.btn-kakao:hover { background: #fee500; color: #181600; border-color: #e5cf00; }
.btn-celebrate-share.btn-band:hover { background: #06c755; color: #ffffff; border-color: #05a847; }
.btn-celebrate-share.btn-x:hover { background: #000000; color: #ffffff; border-color: #000000; }
.btn-celebrate-share.btn-fb:hover { background: #1877f2; color: #ffffff; border-color: #1464cc; }
.btn-celebrate-share.btn-copy:hover { background: #475569; color: #ffffff; border-color: #334155; }

.celebrate-modal-actions {
  display: flex;
  justify-content: center;
}

.btn-celebrate-close {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.65rem 2.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-celebrate-close:hover {
  opacity: 0.92;
  transform: scale(1.02);
}

/* ====================================================================
   [TOAST] 브랜드 전용 피드백 알림 (클립보드, 즐겨찾기 안내)
   ==================================================================== */
.brand-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.brand-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  .bookmark-btn .control-text, .share-btn .control-text {
    display: none;
  }
  .bookmark-btn, .share-btn {
    padding: 0.45rem;
  }
  .time-savings-banner {
    border-radius: var(--radius-md);
    padding: 0.6rem 0.8rem;
  }
  .celebrate-share-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ====================================================================
   [REWARD AD] 무료 AI 10장 충전 전면 광고 오버레이 모달
   ==================================================================== */
.ad-reward-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: fadeInModal 0.25s ease;
}

.ad-reward-modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  max-width: 580px;
  width: 100%;
  overflow: hidden;
  animation: scaleUpModal 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.ad-reward-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-surface-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.ad-reward-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 0.3rem;
}

.ad-reward-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.ad-reward-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.ad-reward-desc strong {
  color: var(--primary);
}

.btn-ad-close-top {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-ad-close-top:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
  transform: scale(1.03);
}

.ad-reward-body {
  padding: 1.5rem;
  text-align: center;
}

.ad-reward-sponsor-box {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--bg-page);
  border: 1px dashed var(--border-subtle);
  padding: 1.5rem 1rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-reward-sponsor-tag {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-sub);
  background: var(--bg-surface);
  padding: 1px 6px;
  border-radius: 4px;
}

.ad-reward-fallback {
  text-align: center;
  padding: 0.5rem 1rem;
}

.ad-reward-glow-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  animation: subtlePulse 2s ease-in-out infinite alternate;
}

.ad-reward-fallback h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.ad-reward-fallback p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 400px;
  margin: 0 auto;
}

.ad-reward-footer {
  padding: 0 1.5rem 1.5rem 1.5rem;
  text-align: center;
}

.btn-ad-reward-claim {
  width: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.95rem 1.5rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
}

.btn-ad-reward-claim:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}

/* AI 크레딧 표시 뱃지 */
.ai-credits-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.ai-credits-badge.unlimited {
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.25);
}

.btn-charge-credits {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  border: none;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
}

.btn-charge-credits:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
}

.btn-dev-key {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  padding: 0.32rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dev-key:hover {
  color: #0f172a;
  background: #e2e8f0;
  border-color: #64748b;
}

.btn-ai-batch-compact {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.btn-ai-batch-compact:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.btn-ai-batch-compact:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ====================================================================
   사진별 인라인 퀵 에디터 카드 리스트 (체류시간 증대 & 편의성 극대화)
   ==================================================================== */
.photo-editor-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 480px;
  overflow-y: auto;
  padding: 0.25rem 0.25rem 0.5rem 0.25rem;
  margin-top: 0.65rem;
}

.photo-editor-card {
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.photo-editor-card:hover {
  border-color: var(--primary, #3b82f6);
  box-shadow: 0 3px 8px rgba(59, 130, 246, 0.08);
}

.photo-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.photo-card-info {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  min-width: 0;
  flex: 1;
}

.photo-card-badge {
  background: var(--bg-hover, #f1f5f9);
  color: var(--text-muted, #64748b);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.photo-card-thumb {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid var(--border-subtle, #e2e8f0);
  flex-shrink: 0;
}

.photo-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main, #1e293b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.photo-card-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.card-btn-ai {
  background: rgba(147, 51, 234, 0.1);
  color: #9333ea;
  border: 1px solid rgba(147, 51, 234, 0.3);
  border-radius: var(--radius-sm, 6px);
  padding: 3px 7px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.card-btn-ai:hover {
  background: #9333ea;
  color: #ffffff;
}

.card-btn-drawer-toggle {
  background: var(--bg-hover, #f1f5f9);
  color: var(--text-muted, #64748b);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-sm, 6px);
  padding: 3px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: all 0.15s ease;
}

.card-btn-drawer-toggle:hover {
  color: var(--text-main, #1e293b);
  background: #e2e8f0;
}

.drawer-arrow {
  font-size: 0.65rem;
}

.card-btn-del {
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.card-btn-del:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.photo-card-desc-wrap {
  width: 100%;
}

.card-desc-input {
  width: 100%;
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: var(--radius-sm, 6px);
  padding: 0.4rem 0.55rem;
  font-size: 0.8rem;
  font-family: inherit;
  color: var(--text-main, #1e293b);
  background: var(--input-bg, #f8fafc);
  resize: vertical;
  min-height: 48px;
  max-height: 120px;
  line-height: 1.4;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.card-desc-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.photo-card-drawer {
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border-subtle, #e2e8f0);
}

.photo-drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.photo-drawer-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.photo-drawer-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted, #64748b);
}

.card-drawer-input {
  width: 100%;
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: var(--radius-sm, 5px);
  padding: 0.3rem 0.45rem;
  font-size: 0.76rem;
  font-family: inherit;
  color: var(--text-main, #1e293b);
  background: var(--input-bg, #ffffff);
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.card-drawer-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

/* ====================================================================
   우측 A4 실시간 시트 직접 클릭 편집 (Click-to-Edit) 스타일
   ==================================================================== */
.a4-caption-value.editable-cell {
  cursor: text;
  position: relative;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.a4-caption-value.editable-cell:hover {
  background: rgba(59, 130, 246, 0.05);
  outline: 1px dashed rgba(59, 130, 246, 0.4);
  outline-offset: -1px;
}

.a4-caption-value.editable-cell:focus {
  outline: 2px solid #2563eb !important;
  outline-offset: -2px;
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.2);
}

/* ====================================================================
   바닥글 페이지 번호(1 / N) 토글 스위치 및 정렬 그룹 스타일
   ==================================================================== */
.btn-segment-group.disabled-group {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.5);
  transition: opacity 0.2s ease;
}

.toggle-page-no-wrap input[type="checkbox"],
.preview-page-no-toggle input[type="checkbox"] {
  cursor: pointer;
  accent-color: #2563eb;
  width: 14px;
  height: 14px;
  margin: 0;
}

.toggle-page-no-wrap:hover span {
  color: #2563eb;
}

.preview-page-no-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-main, #334155);
  background: var(--bg-hover, #f1f5f9);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle, #e2e8f0);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.preview-page-no-toggle:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* ====================================================================
   [AI COMING SOON] 비전 AI 오픈 준비 중 안내 뱃지 & 안내 모달 스타일
   ==================================================================== */
.ai-coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(124, 58, 237, 0.25);
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.1);
}

.btn-ai-batch-compact.is-coming-soon {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.28);
}

.card-btn-ai.is-coming-soon {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.card-btn-ai.is-coming-soon:hover {
  background: #7c3aed;
  color: #ffffff;
}

.ai-coming-soon-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: fadeInModal 0.25s ease;
}

.ai-coming-soon-modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 25px 50px -12px rgba(124, 58, 237, 0.25);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  animation: scaleUpModal 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-coming-soon-header {
  padding: 1.5rem 1.5rem 1.2rem 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.08) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.ai-coming-soon-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.ai-coming-soon-pill {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
}

.btn-ai-coming-soon-x {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ai-coming-soon-x:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.ai-coming-soon-glow-icon {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 0.6rem;
  animation: subtlePulse 2s ease-in-out infinite alternate;
}

.ai-coming-soon-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0;
  letter-spacing: -0.01em;
}

.ai-coming-soon-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.ai-coming-soon-text {
  font-size: 0.88rem;
  color: var(--text-sub, #475569);
  line-height: 1.6;
  margin: 0;
  text-align: left;
}

.ai-coming-soon-preview-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.ai-preview-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
}

.ai-item-icon {
  font-size: 1.2rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.ai-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ai-item-content strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
}

.ai-item-content span {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.ai-coming-soon-footer {
  padding: 0 1.5rem 1.5rem 1.5rem;
  text-align: center;
}

.btn-ai-coming-soon-close {
  width: 100%;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
  transition: all 0.2s ease;
}

.btn-ai-coming-soon-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.45);
}

.preview-page-no-toggle:has(input:checked) {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
  color: #1d4ed8;
}

/* ==========================================================================
   Receipt & Expense Report Workspace Styles (Phase 1)
   ========================================================================== */
.receipt-workspace {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
}

.receipt-badge {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.dark-theme .receipt-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.receipt-action-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.receipt-action-bar .btn-primary-action {
  flex: 1.5;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.receipt-action-bar .btn-primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.receipt-action-bar .btn-primary-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.receipt-action-bar .btn-secondary-action {
  flex: 1;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.receipt-action-bar .btn-secondary-action:hover {
  border-color: var(--primary-border);
  background: var(--bg-surface-secondary);
}

.receipt-total-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.receipt-total-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.receipt-total-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}

.total-bar-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.total-bar-sub-info {
  font-size: 0.76rem;
  color: #38bdf8;
  font-weight: 600;
}

.receipt-modern-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  background: var(--bg-surface-secondary);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

@media (max-width: 640px) {
  .receipt-modern-form-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 0.75rem;
  }
}

.receipt-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

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

.receipt-form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.receipt-form-input {
  width: 100%;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.52rem 0.75rem;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.receipt-form-input:hover {
  border-color: rgba(37, 99, 235, 0.4);
}

.receipt-form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: var(--bg-surface);
}

.receipt-options-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
}

.receipt-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.receipt-checkbox-label input[type="checkbox"] {
  cursor: pointer;
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  margin: 0;
}

.approval-line-section {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.approval-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.approval-header-row .control-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.btn-add-step {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-surface);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-add-step:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.approval-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.approval-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.45rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.approval-chip:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.approval-step-input {
  border: none;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 700;
  width: 58px;
  text-align: center;
  color: var(--text-main);
  outline: none;
  padding: 0.12rem 0.2rem;
}

.btn-del-step {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.15rem 0.25rem;
  border-radius: var(--radius-full);
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
}

.btn-del-step:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.receipt-field-builder-section {
  margin-top: 1rem;
  padding: 0.85rem;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-subtle);
}

.receipt-field-builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.receipt-field-builder-header .control-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-add-field-row {
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-field-row:hover {
  background: var(--primary);
  color: #ffffff;
}

.receipt-field-builder-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.receipt-field-builder-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
}

.field-cell-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}

.inp-field-label {
  width: 100%;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-main);
  outline: none;
}

.inp-field-label:focus {
  border-color: var(--primary);
}

.btn-field-split {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.45rem;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-field-split:hover {
  border-color: var(--primary-border);
  color: var(--primary);
}

.btn-field-del {
  border: none;
  background: transparent;
  color: #ef4444;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.btn-field-del:hover {
  opacity: 1;
}

.receipt-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.receipt-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.receipt-empty-notice {
  text-align: center;
  padding: 2.2rem 1.2rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
}

.receipt-card-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.receipt-card-item:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.receipt-card-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.receipt-card-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.receipt-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.receipt-card-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.receipt-card-idx {
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.receipt-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-card-del {
  border: none;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-radius: var(--radius-full);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-card-del:hover {
  background: #ef4444;
  color: #ffffff;
}

.receipt-card-fields {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.receipt-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.receipt-field-col {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.receipt-field-col label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.receipt-field-col input {
  font-size: 0.8rem;
  padding: 0.38rem 0.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease;
}

.receipt-field-col input:focus {
  border-color: var(--primary);
}

.inp-amount {
  font-weight: 700 !important;
  color: var(--primary) !important;
  text-align: right;
}

/* 실시간 미리보기 상단 페이지 네비게이션 */
.preview-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.75rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.preview-page-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-page-nav {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-secondary);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.btn-page-nav:hover:not(:disabled) {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.btn-page-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.preview-page-indicator {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  padding: 0 0.25rem;
}

/* A4 실시간 프리뷰 전용 스타일 */
.receipt-a4-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: var(--bg-surface-secondary);
  padding: 1.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.photo-page-nav-wrap .btn-page-nav {
  padding: 0.2rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  border-radius: var(--radius-sm);
}

.receipt-a4-sheet {
  background: #ffffff !important;
  color: #0f172a !important;
  padding: 14px 16px !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  max-width: 510px !important;
  width: 100%;
  aspect-ratio: 1 / 1.414;
  min-height: 0;
  box-sizing: border-box;
  margin: 0 auto;
  box-shadow: var(--shadow-sheet);
}

/* ==========================================================================
   [1페이지] 정부/기업 표준 지출결의서 본문 집계표 스타일 (참고 이미지 2 양식)
   ========================================================================== */
.gov-resolution-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  height: 100%;
  justify-content: space-between;
}

.gov-doc-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.gov-title-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4px;
}

.gov-doc-main-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #0f172a;
  margin: 0;
  text-align: center;
}

.gov-approval-area {
  flex-shrink: 0;
}

/* 결재란 (모든 칸 비율 균등 보장) */
.approval-table.fixed-layout {
  border-collapse: collapse;
  table-layout: fixed;
  text-align: center;
  font-size: 9px;
  border: 1px solid #94a3b8;
  min-width: 160px;
}

.approval-table.fixed-layout th,
.approval-table.fixed-layout td {
  border: 1px solid #94a3b8;
  padding: 2px 2px;
  text-align: center;
  word-break: keep-all;
  line-height: 1.15;
}

.approval-table.fixed-layout thead th {
  background: #f8fafc;
  font-weight: 700;
  font-size: 9px;
  color: #334155;
}

.approval-side-header {
  width: 22px !important;
  background: #f8fafc;
  font-weight: 800;
  font-size: 9.5px;
  line-height: 1.25;
  color: #334155;
  text-align: center;
  vertical-align: middle;
  padding: 2px !important;
}

.stamp-cell {
  height: 38px;
  background: #ffffff;
}

/* 작성자 정보 인적사항 & 금액/제목 일체형 서식 테이블 (관공서/기업 표준) */
.gov-meta-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1px solid #94a3b8;
  margin-bottom: 6px;
  font-size: 9.5px;
}

.gov-meta-table th,
.gov-meta-table td {
  border: 1px solid #94a3b8;
  padding: 3px 6px;
  line-height: 1.25;
}

.gov-meta-lbl {
  background: #f8fafc;
  font-weight: 700;
  color: #334155;
  width: 16%;
  text-align: center;
  letter-spacing: 0.5px;
}

.gov-meta-val {
  color: #0f172a;
  width: 34%;
  font-weight: 600;
  text-align: center;
  word-break: keep-all;
  white-space: nowrap;
}

.gov-meta-amount-cell {
  text-align: left !important;
  padding: 4px 10px !important;
  background: #ffffff;
}

.gov-korean-amount {
  font-weight: 800;
  color: #1e3a8a;
  font-size: 10.5px;
  letter-spacing: -0.01em;
  margin-right: 6px;
}

.gov-num-amount {
  font-weight: 700;
  color: #2563eb;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

/* 내역 집계표 */
.gov-table-wrapper {
  flex: 1;
  min-height: 0;
  margin-bottom: 6px;
}

.gov-summary-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #94a3b8;
  font-size: 9px;
}

.gov-summary-table th {
  background: #f8fafc;
  font-weight: 700;
  color: #334155;
  border: 1px solid #94a3b8;
  padding: 3px 4px;
  text-align: center;
}

.gov-summary-table td {
  border: 1px solid #cbd5e1;
  padding: 1.5px 4px;
  height: 18px;
  box-sizing: border-box;
}

.gov-col-date {
  width: 18%;
  text-align: center;
}

.gov-col-usage {
  width: 40%;
}

.gov-col-amount {
  width: 22%;
  font-variant-numeric: tabular-nums;
}

.gov-col-memo {
  width: 20%;
}

.gov-total-row {
  background: #f1f5f9;
  font-weight: 800;
  border-top: 2px solid #94a3b8;
}

.gov-total-row td {
  padding: 2.5px 4px;
  height: 20px;
}

.gov-total-amount {
  color: #1e3a8a;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.gov-empty-row td {
  height: 18px;
  line-height: 18px;
  background-color: #ffffff;
}

/* 인라인 프리뷰 편집 셀 스타일링 */
.editable-receipt-cell,
.editable-meta-cell {
  cursor: text;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.editable-receipt-cell:hover,
.editable-meta-cell:hover {
  background-color: rgba(59, 130, 246, 0.08) !important;
  outline: 1px dashed #3b82f6;
}

.editable-receipt-cell:focus,
.editable-meta-cell:focus {
  background-color: #ffffff !important;
  outline: 2px solid #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  z-index: 10;
  position: relative;
}

/* 4컷 단일 프리셋 뱃지 */
.receipt-single-preset-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-surface-secondary, #f1f5f9);
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: var(--radius-md, 6px);
  font-size: 0.88rem;
  color: var(--text-main, #1e293b);
  width: 100%;
}

.receipt-single-preset-badge .preset-badge-icon {
  font-size: 1.1rem;
}

.receipt-single-preset-badge strong {
  color: var(--primary, #2563eb);
  font-weight: 700;
}

/* 하단 청구 문구 및 영수인 서명란 */
.gov-doc-footer-section {
  margin-top: auto;
  padding-top: 4px;
  text-align: center;
}

.gov-claim-statement {
  font-size: 10.5px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.gov-claim-date {
  font-size: 9.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.gov-signee-box {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  padding-right: 20px;
  font-size: 10.5px;
}

.gov-signee-title {
  font-weight: 700;
  color: #334155;
}

.gov-signee-name {
  font-weight: 800;
  color: #0f172a;
  text-decoration: underline;
  margin-left: 4px;
}

.gov-signee-seal {
  color: #dc2626;
  font-weight: 800;
}

/* ==========================================================================
   [2페이지 이상] 2열 영수증 증빙 시트 스타일 (상단 사진 + 하단 선택 주석표)
   ========================================================================== */
.receipt-proof-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  height: 100%;
}

.receipt-a4-subpage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 4px;
  margin-bottom: 6px;
  border-bottom: 1.5px solid #0f172a;
}

.subpage-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #0f172a;
}

.subpage-meta {
  font-size: 9px;
  font-weight: 600;
  color: #64748b;
}

.receipt-proof-grid {
  display: grid;
  width: 100%;
  flex: 1;
}

.receipt-proof-grid.grid-2x2 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
  flex: 1;
  height: calc(100% - 24px);
}

.receipt-proof-grid.grid-2x4 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
}

.receipt-proof-slot {
  display: flex;
  flex-direction: column;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
  min-height: 0;
}

.receipt-proof-photo {
  width: 100%;
  flex: 1;
  min-height: 0;
  background: #f8fafc;
  border-right: none;
  border-bottom: 1px solid #94a3b8;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.receipt-proof-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f1f5f9;
}

.proof-placeholder {
  color: #94a3b8;
  font-size: 9.5px;
  font-weight: 600;
  text-align: center;
  padding: 8px;
}

.receipt-proof-info {
  width: 100%;
  flex-shrink: 0;
  background: #ffffff;
}

.receipt-proof-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 9px;
  line-height: 1.3;
}

.receipt-proof-table td {
  border: 1px solid #cbd5e1;
  padding: 3px 6px;
  word-break: break-all;
}

.receipt-proof-table .lbl {
  width: 32%;
  background: #f8fafc;
  font-weight: 700;
  color: #475569;
  text-align: center;
  white-space: nowrap;
}

.receipt-proof-table .val {
  width: 68%;
  color: #0f172a;
}

.grid-2x4 .receipt-proof-table {
  font-size: 8px;
}

.grid-2x4 .receipt-proof-table td {
  padding: 2px 4px;
}

/* 주석 필드 선택 칩 스타일 (5종 항목 넣고 빼기) */
.receipt-fields-selector-group {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border-subtle);
}

.receipt-field-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.field-toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.field-toggle-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.field-toggle-chip.active {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
}

.field-toggle-chip input[type="checkbox"] {
  display: none;
}

.chip-check-icon {
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.field-chips-desc {
  font-size: 0.74rem;
  color: var(--text-sub);
  margin-top: 0.4rem;
  margin-bottom: 0;
}

/* 바닥글 페이지 번호 */
.receipt-a4-footer-page-no {
  margin-top: auto;
  padding-top: 8px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 2px;
}

/* ==========================================================================
   Receipt Card List & Item Styles
   ========================================================================== */
.receipt-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.receipt-empty-card-list {
  padding: 2rem 1rem;
  text-align: center;
  background: var(--bg-surface-secondary);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.receipt-empty-card-list .empty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.receipt-empty-card-list .empty-text {
  font-size: 0.86rem;
  line-height: 1.4;
  margin: 0;
}

.receipt-card-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.receipt-card-item:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.receipt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: var(--bg-surface-secondary);
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.5rem;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.card-seq-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.card-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.btn-card-delete {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.25rem 0.45rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.btn-card-delete:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.receipt-card-body {
  display: flex;
  padding: 0.85rem;
  gap: 0.85rem;
}

.card-thumb-area {
  width: 90px;
  height: 110px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.card-thumb-placeholder {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-fields-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.card-field-row {
  display: flex;
  gap: 0.5rem;
}

.card-field-row.full {
  width: 100%;
}

.card-field-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.card-field-group.full {
  width: 100%;
}

.card-field-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.card-field-input {
  width: 100%;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition);
}

.card-field-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.card-field-input.font-bold {
  font-weight: 700;
  color: #1e3a8a;
}

/* ==========================================================================
   Multi-Crop Modal & Receipt Card Crop Button (Impeccable Craft)
   ========================================================================== */
.btn-card-crop {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-surface-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-card-crop:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.crop-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeInModal 0.2s ease;
}

.crop-modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45);
  max-width: 920px;
  width: 100%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleUpModal 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.crop-modal-header {
  padding: 1.15rem 1.4rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-secondary);
}

.crop-modal-title-group {
  flex: 1;
}

.crop-modal-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 0.3rem;
}

.crop-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}

.crop-modal-guide {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.btn-crop-close {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.btn-crop-close:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
}

.crop-modal-toolbar {
  padding: 0.65rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.crop-preset-shortcuts {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.crop-preset-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.btn-crop-shortcut {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.btn-crop-shortcut:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.btn-crop-reset {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.btn-crop-reset:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.crop-stage-container {
  flex: 1;
  min-height: 380px;
  max-height: 60vh;
  background: #090d16;
  padding: 1rem;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crop-image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crop-stage-inner {
  position: relative;
  display: inline-block;
  user-select: none;
  touch-action: none;
}

.crop-base-image {
  display: block;
  max-width: 100%;
  max-height: 56vh;
  object-fit: contain;
  border-radius: 4px;
  pointer-events: none;
}

.crop-boxes-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: crosshair;
}

.crop-drag-preview {
  position: absolute;
  border: 2px dashed #38bdf8;
  background: rgba(56, 189, 248, 0.2);
  border-radius: 3px;
  pointer-events: none;
}

.crop-box-item {
  position: absolute;
  border: 2px solid #2563eb;
  background: rgba(37, 99, 235, 0.15);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 4px 14px rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  cursor: crosshair;
  pointer-events: none; /* 새 영역 드래그가 기존 박스에 의해 가로막히지 않도록 none 설정 */
}

.crop-box-badge {
  position: absolute;
  top: -22px;
  left: 0;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-del-crop-box {
  position: absolute;
  top: -22px;
  right: 0;
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 3px;
  width: 19px;
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  cursor: pointer;
  pointer-events: auto; /* 삭제 버튼만 독립 클릭 가능 */
  transition: var(--transition);
}

.btn-del-crop-box:hover {
  background: #dc2626;
  transform: scale(1.08);
}

.crop-modal-footer {
  padding: 0.95rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-secondary);
}

.crop-box-count-badge {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.crop-box-count-badge strong {
  color: var(--primary);
  font-size: 1.05rem;
}

.crop-footer-buttons {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-crop-cancel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.1rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.btn-crop-cancel:hover {
  background: var(--bg-surface-secondary);
  color: var(--text-main);
}

.btn-crop-apply {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.65rem 1.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
  transition: var(--transition);
}

.btn-crop-apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.crop-loading-spinner,
.crop-error-msg {
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 2rem;
  text-align: center;
}

/* ==========================================================================
   Receipt Vision AI Automation Styles
   ========================================================================== */
.receipt-ai-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
}

.btn-receipt-ai-batch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  transition: var(--transition);
}

.btn-receipt-ai-batch:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.btn-receipt-ai-batch:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-receipt-api-key {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.btn-receipt-api-key:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-surface-secondary);
}

.btn-card-ai {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #6366f1;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-card-ai:hover:not(:disabled) {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

.btn-card-ai:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rotating {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   지출 내역 및 집계서 (Executive Expense & Aggregation Summary) Styles
   ========================================================================== */
.aggregation-selector-section {
  margin-bottom: 1.2rem;
}

.aggregation-chips-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.btn-agg-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: var(--radius-md, 6px);
  color: var(--text-main, #334155);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition, all 0.2s ease);
}

.btn-agg-chip:hover {
  border-color: var(--primary, #2563eb);
  background: var(--bg-surface-secondary, #f8fafc);
}

.btn-agg-chip.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.expense-summary-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 12px 16px;
  box-sizing: border-box;
  font-family: "Malgun Gothic", "맑은 고딕", -apple-system, sans-serif;
  color: #0f172a;
}

.expense-header-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 8px;
  border-bottom: 2px solid #1e293b;
  margin-bottom: 10px;
}

.expense-doc-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin: 0;
}

.expense-doc-meta {
  text-align: right;
  font-size: 9.5px;
  color: #475569;
  line-height: 1.45;
}

.expense-kpi-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.expense-kpi-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
}

.expense-kpi-card.primary {
  background: #eff6ff;
  border-color: #93c5fd;
}

.kpi-card-lbl {
  font-size: 8.5px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 2px;
}

.expense-kpi-card.primary .kpi-card-lbl {
  color: #1d4ed8;
}

.kpi-card-val {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.expense-kpi-card.primary .kpi-card-val {
  color: #1e40af;
}

.kpi-card-sub {
  font-size: 8px;
  color: #64748b;
  margin-top: 1px;
}

.expense-agg-section {
  margin-bottom: 10px;
}

.expense-section-title {
  font-size: 10px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.expense-agg-table,
.expense-items-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 9px;
  line-height: 1.25;
}

.expense-agg-table th,
.expense-items-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  padding: 4px 5px;
  text-align: center;
}

.expense-agg-table td,
.expense-items-table td {
  border: 1px solid #cbd5e1;
  padding: 3.5px 5px;
  color: #1e293b;
}

.expense-items-wrapper {
  flex: 1;
  min-height: 0;
  margin-bottom: 8px;
}

.expense-footer-section {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

/* ==========================================================================
   영수증 정리 전용 완벽 A4 인쇄 & PDF 출력 스타일 (@media print)
   ========================================================================== */
#receipt-print-area {
  display: none !important;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 일반 웹페이지 요소(헤더, 네비, 좌측 컨트롤 패널, 모달, 광고 등) 모두 숨김 */
  body > *:not(#receipt-print-area) {
    display: none !important;
  }

  header, nav, footer, .navbar, .app-header, .site-header,
  .control-column, .preview-column, .receipt-action-bar,
  .mobile-tab-nav, .receipt-floating-controls, .preview-panel-header,
  .a4-sheet-container {
    display: none !important;
  }

  /* 인쇄 전용 컨테이너만 A4 크기로 정확히 노출 */
  #receipt-print-area {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    z-index: 9999999 !important;
  }

  .receipt-print-sheet {
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    box-sizing: border-box !important;
    padding: 14mm 16mm !important;
    margin: 0 auto !important;
    background: #ffffff !important;
    color: #0f172a !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    box-shadow: none !important;
    border: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .receipt-print-sheet:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  /* 인쇄 시 1페이지(본문 집계) 레이아웃 최적화 */
  .receipt-print-sheet .expense-summary-page {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  .receipt-print-sheet .expense-doc-title {
    font-size: 24px !important;
  }

  .receipt-print-sheet .expense-section-title {
    font-size: 11px !important;
  }

  .receipt-print-sheet .expense-items-table,
  .receipt-print-sheet .expense-agg-table {
    font-size: 10.5px !important;
    line-height: 1.35 !important;
  }

  .receipt-print-sheet .expense-items-table th,
  .receipt-print-sheet .expense-agg-table th {
    padding: 6px 6px !important;
    font-size: 11px !important;
    background: #f1f5f9 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .receipt-print-sheet .expense-items-table td,
  .receipt-print-sheet .expense-agg-table td {
    padding: 5px 6px !important;
    font-size: 10.5px !important;
  }

  /* 인쇄 시 2페이지~(증빙 4컷) 레이아웃 최적화 */
  .receipt-print-sheet .receipt-proof-page {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  .receipt-print-sheet .receipt-proof-grid.grid-2x2 {
    gap: 12px !important;
    height: calc(100% - 30px) !important;
  }

  .receipt-print-sheet .receipt-proof-table {
    font-size: 10px !important;
  }

  .receipt-print-sheet .receipt-proof-table td {
    padding: 4px 8px !important;
  }

  .receipt-print-sheet .receipt-a4-footer-page-no {
    margin-top: auto !important;
    padding-top: 10px !important;
    font-size: 11px !important;
  }
}

/* ==========================================================================
   Static Content Pages (Privacy Policy, Terms of Service)
   ========================================================================== */
.content-page-wrap {
  width: 100%;
  max-width: 860px;
  margin: 2.5rem auto 4rem;
  padding: 0 1.25rem;
}

.content-page-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.content-page-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary, #2563eb);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.content-page-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  margin: 0 0 0.5rem;
}

.content-page-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted, #64748b);
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
}

.content-page-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  margin: 1.8rem 0 0.6rem;
}

.content-page-body p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-sub, #334155);
  margin-bottom: 1rem;
}

.content-page-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
  display: flex;
  justify-content: center;
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--primary, #2563eb);
  color: #ffffff !important;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary-action:hover {
  background: var(--primary-hover, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/*# sourceMappingURL=styles.cffc600450e84dbc9522.css.map*/