/* PhotoDaeji v2.0 — High-Clarity UI + Responsive A4 Preview Scaling + Crisp Print PDF */
:root {
  --navy: #0F172A;
  --navy-2: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --muted: #64748B;
  --border: #CBD5E1;
  --border-light: #E2E8F0;
  --bg: #F4F6F9;
  --card: #FFFFFF;
  --emerald: #059669;
  --emerald-bright: #10B981;
  --emerald-soft: #ECFDF5;
  --emerald-border: #A7F3D0;
  --amber: #D97706;
  --amber-soft: #FFFBEB;
  --blue-soft: #EFF6FF;
  --blue-border: #BFDBFE;
  --blue-text: #1E40AF;
  --red: #DC2626;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 6px 24px rgba(15, 23, 42, 0.07);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--navy);
  line-height: 1.55;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.ico-lg {
  width: 24px;
  height: 24px;
}

/* Header */
.site-header {
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 11px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #10B981, #047857);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.logo-title {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.logo-sub {
  font-size: 11.5px;
  color: #94A3B8;
}

.plan-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.4px;
}

.plan-pill.free {
  background: #334155;
  color: #E2E8F0;
}

.plan-pill.pro {
  background: #10B981;
  color: #FFFFFF;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  color: #CBD5E1;
  text-decoration: none;
  font-size: 12.8px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
  transition: color 0.14s ease, background 0.14s ease;
}

.nav-link:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.security-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6EE7B7;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  font-size: 13px;
  padding: 9px 15px;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--emerald-bright);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--emerald);
  transform: translateY(-1px);
}

.btn-navy {
  background: var(--navy);
  color: #FFFFFF;
}

.btn-navy:hover:not(:disabled) {
  background: var(--navy-2);
}

.btn-outline {
  background: #FFFFFF;
  color: var(--navy);
  border-color: var(--border);
}

.btn-outline:hover:not(:disabled) {
  background: #F8FAFC;
  border-color: #94A3B8;
}

.btn-ghost-dark {
  background: rgba(255, 255, 255, 0.09);
  color: #F1F5F9;
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-ghost-dark:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
}

.btn-pro {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
}

.btn-pro:hover:not(:disabled) {
  filter: brightness(0.95);
}

.btn-sm {
  font-size: 12.2px;
  padding: 6px 12px;
}

.btn-xs {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 5px;
}

/* Compact High-Contrast Hero */
.hero-strip {
  background: radial-gradient(circle at 85% 20%, rgba(16, 185, 129, 0.18), transparent 45%),
              linear-gradient(135deg, #0F172A 0%, #17253B 100%);
  color: #FFFFFF;
  padding: 22px 22px 24px;
  border-bottom: 1px solid #1E293B;
}

.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #6EE7B7;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.28);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.hero-copy h1 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.7px;
  line-height: 1.28;
  margin-bottom: 8px;
}

.hero-copy h1 span {
  color: #34D399;
}

.hero-copy p {
  font-size: 13.8px;
  color: #CBD5E1;
  line-height: 1.6;
  max-width: 640px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

/* Right Hero: 3-Step Visual Flow Card */
.hero-steps-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  padding: 15px 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hero-step {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 11px;
}

.hero-step-num {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 900;
  color: #34D399;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.hero-step strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 3px;
}

.hero-step span {
  display: block;
  font-size: 11.5px;
  color: #94A3B8;
  line-height: 1.45;
}

/* Main Workspace */
.workspace {
  max-width: 1400px;
  margin: 18px auto 34px;
  padding: 0 22px;
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 20px;
  align-items: start;
}

/* Left Control Panel (Sticky & Cleanly Tabbed) */
.panel {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: sticky;
  top: 68px;
}

.upload-header-box {
  padding: 15px 16px 14px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-light);
}

.dropzone {
  border: 2px dashed #10B981;
  border-radius: 11px;
  padding: 16px 14px;
  text-align: center;
  background: #F0FDF4;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: #047857;
  background: #DCFCE7;
  transform: translateY(-1px);
}

.dropzone-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #10B981;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.dropzone-title {
  font-size: 13.8px;
  font-weight: 800;
  color: #064E3B;
}

.dropzone-sub {
  font-size: 11.5px;
  color: #047857;
}

.upload-sub-actions {
  display: flex;
  gap: 7px;
  margin-top: 9px;
}

.upload-sub-actions .btn {
  flex: 1;
}

/* Segmented Tabs inside Sidebar */
.panel-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #F1F5F9;
  padding: 4px;
  gap: 4px;
  border-bottom: 1px solid var(--border-light);
}

.panel-tab-btn {
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.8px;
  font-weight: 700;
  color: var(--slate-600);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.14s ease;
}

.panel-tab-btn.active {
  background: #FFFFFF;
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.tab-count-badge {
  font-size: 10.5px;
  font-weight: 800;
  background: #E2E8F0;
  color: #334155;
  padding: 1px 6px;
  border-radius: 999px;
}

.panel-tab-btn.active .tab-count-badge {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.panel-tab-body {
  max-height: calc(100vh - 285px);
  min-height: 360px;
  overflow-y: auto;
}

.panel-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}

.panel-section:last-child {
  border-bottom: none;
}

.section-title {
  font-size: 12.8px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pro-tag {
  font-size: 10px;
  font-weight: 800;
  color: #B45309;
  background: #FEF3C7;
  padding: 1.5px 6px;
  border-radius: 4px;
}

/* Visual Layout Wireframe Cards */
.layout-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.radio-card {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 6px 8px;
  text-align: center;
  cursor: pointer;
  background: #FFFFFF;
  transition: all 0.14s ease;
}

.radio-card:hover {
  border-color: #94A3B8;
}

.radio-card.active {
  border-color: var(--emerald-bright);
  background: var(--emerald-soft);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.layout-wireframe {
  width: 34px;
  height: 44px;
  margin: 0 auto 6px;
  border: 1.5px solid #94A3B8;
  border-radius: 3px;
  padding: 3px;
  background: #FFFFFF;
  display: grid;
  gap: 2px;
}

.radio-card.active .layout-wireframe {
  border-color: var(--emerald);
}

.wf-cell {
  background: #CBD5E1;
  border-radius: 1px;
}

.radio-card.active .wf-cell {
  background: #34D399;
}

.wf-2 { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
.wf-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.wf-6 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }

.radio-card strong {
  display: block;
  font-size: 12.5px;
  color: var(--navy);
}

.radio-card span {
  font-size: 10.5px;
  color: var(--muted);
}

/* Preset Chips */
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.preset-chip {
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #F8FAFC;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.12s ease;
}

.preset-chip:hover {
  border-color: #94A3B8;
  color: var(--navy);
}

.preset-chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFFFFF;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.form-field {
  margin-bottom: 9px;
}

.form-field:last-child {
  margin-bottom: 0;
}

.form-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--slate-600);
  margin-bottom: 4px;
}

.form-field input[type="text"],
.form-field select {
  width: 100%;
  padding: 7.5px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--navy);
  background: #FFFFFF;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--emerald-bright);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #F8FAFC;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 12.2px;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
}

.toggle-item:hover {
  border-color: #CBD5E1;
}

.toggle-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--emerald);
  cursor: pointer;
}

/* Bulk Edit Bar & Photo Queue */
.bulk-bar {
  padding: 10px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 6px;
}

.bulk-bar input {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  font-size: 11.8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
}

.photo-editor-list {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.photo-edit-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 9px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: 9px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.photo-edit-item.highlight-flash {
  border-color: var(--emerald-bright);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.photo-thumb-wrap {
  position: relative;
}

.photo-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}

.photo-num-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  background: rgba(15, 23, 42, 0.88);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.photo-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.photo-edit-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.exif-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 4px;
}

.exif-pill.exif {
  background: #DCFCE7;
  color: #166534;
}

.exif-pill.file {
  background: #E2E8F0;
  color: #475569;
}

.photo-move-btns {
  display: flex;
  gap: 3px;
}

.photo-edit-fields input {
  width: 100%;
  padding: 5px 7px;
  font-size: 11.8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: inherit;
  color: var(--navy);
}

.photo-edit-fields input:focus {
  outline: none;
  border-color: var(--emerald-bright);
}

/* Right Preview Area */
.preview-toolbar {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 13px;
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.stats-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 10.8px;
  color: var(--muted);
  font-weight: 600;
}

.stat-value {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--navy);
}

.stat-value.accent {
  color: var(--emerald);
}

.zoom-group {
  display: inline-flex;
  background: #F1F5F9;
  padding: 3px;
  border-radius: 7px;
  gap: 2px;
}

.zoom-btn {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--slate-600);
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
}

.zoom-btn.active {
  background: #FFFFFF;
  color: var(--navy);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Friendly Demo Notice Banner (Non-Intrusive, High Clarity) */
.demo-banner {
  background: var(--blue-soft);
  border: 1.5px solid var(--blue-border);
  border-radius: 11px;
  padding: 11px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.demo-banner-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.8px;
  color: var(--blue-text);
}

.demo-badge {
  background: #2563EB;
  color: #FFFFFF;
  font-size: 10.8px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* PRO Paywall Banner (Shown only when user uploads real photos in FREE mode) */
.paywall-banner {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 1.5px solid #F59E0B;
  border-radius: 11px;
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.paywall-banner h3 {
  font-size: 13.5px;
  font-weight: 800;
  color: #92400E;
  margin-bottom: 2px;
}

.paywall-banner p {
  font-size: 12px;
  color: #78350F;
}

/* Print Tip Strip */
.print-tip-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 9px;
  padding: 8px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--slate-600);
}

.print-tip-strip strong {
  color: var(--navy);
}

/* Responsive A4 Stage (Zero Horizontal Overflow on Any Screen!) */
.paper-stage {
  background: #DDE3EC;
  border: 2px dashed transparent;
  border-radius: 14px;
  padding: 20px;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  transition: border-color 0.15s ease, background 0.15s ease;
  overflow-x: hidden;
}

.paper-stage.dragover {
  border-color: var(--emerald-bright);
  background: #D1FAE5;
}

.a4-scaler-slot {
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
}

.a4-scale-inner {
  transform-origin: top center;
  will-change: transform;
}

.a4-page {
  position: relative;
  width: 794px; /* Exact 210mm @ 96dpi for crisp pixel-accurate scaling */
  min-height: 1123px; /* Exact 297mm @ 96dpi */
  background: #FFFFFF;
  color: #111827;
  padding: 52px 48px 46px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
}

.watermark-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 8;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.watermark-text {
  font-size: 36px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.065);
  transform: rotate(-28deg);
  white-space: nowrap;
  letter-spacing: 3px;
  user-select: none;
}

/* Formal Header inside A4 Page */
.doc-header {
  border-bottom: 2.5px solid #0F172A;
  padding-bottom: 8px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}

.doc-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #0F172A;
  border: 1px solid #0F172A;
  padding: 1.5px 7px;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.doc-title {
  font-size: 20px;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: -0.5px;
}

.doc-page-num {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.doc-meta-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  font-size: 11.3px;
}

.doc-meta-table th,
.doc-meta-table td {
  border: 1px solid #94A3B8;
  padding: 4.5px 8px;
  text-align: left;
}

.doc-meta-table th {
  background: #F1F5F9;
  font-weight: 700;
  width: 15%;
  color: #1E293B;
}

.doc-meta-table td {
  width: 35%;
  color: #0F172A;
}

/* Photo Grid Layouts */
.photo-sheet-grid {
  display: grid;
  gap: 10px;
  flex: 1;
}

.photo-sheet-grid.layout-2 { grid-template-columns: 1fr; }
.photo-sheet-grid.layout-4 { grid-template-columns: 1fr 1fr; }
.photo-sheet-grid.layout-6 { grid-template-columns: 1fr 1fr; }

.photo-card-a4 {
  border: 1.2px solid #475569;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  break-inside: avoid;
  page-break-inside: avoid;
  overflow: hidden;
  cursor: pointer;
  transition: outline-color 0.14s ease;
}

.photo-card-a4:hover {
  outline: 2px solid #10B981;
  outline-offset: -2px;
}

.photo-card-head {
  background: #0F172A;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 4.5px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.photo-frame {
  position: relative;
  background: #F8FAFC;
  border-bottom: 1px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.layout-2 .photo-frame { height: 306px; }
.layout-4 .photo-frame { height: 252px; }
.layout-6 .photo-frame { height: 170px; }

.photo-frame img {
  width: 100%;
  height: 100%;
  display: block;
}

.photo-frame img.fit-contain { object-fit: contain; }
.photo-frame img.fit-cover { object-fit: cover; }

.photo-stamp-overlay {
  position: absolute;
  right: 7px;
  bottom: 7px;
  background: rgba(15, 23, 42, 0.8);
  color: #FDE047;
  font-family: "DejaVu Sans Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.3px;
}

.photo-caption-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.6px;
  line-height: 1.38;
}

.photo-caption-table th,
.photo-caption-table td {
  border-top: 1px solid #CBD5E1;
  padding: 3.5px 6px;
  text-align: left;
  vertical-align: top;
}

.photo-caption-table th {
  width: 62px;
  background: #F8FAFC;
  color: #334155;
  font-weight: 700;
  border-right: 1px solid #CBD5E1;
  white-space: nowrap;
}

.photo-hash-line {
  font-family: monospace;
  font-size: 9px;
  color: #475569;
  word-break: break-all;
}

.doc-footer {
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid #CBD5E1;
  display: flex;
  justify-content: space-between;
  font-size: 9.8px;
  color: #64748B;
}

.truncated-notice {
  width: 100%;
  max-width: 794px;
  padding: 18px 20px;
  border: 2px dashed #D97706;
  background: #FFFBEB;
  border-radius: 12px;
  text-align: center;
}

.truncated-notice h4 {
  font-size: 15px;
  font-weight: 800;
  color: #92400E;
  margin-bottom: 5px;
}

.truncated-notice p {
  font-size: 12.5px;
  color: #78350F;
  margin-bottom: 12px;
}

/* SEO Guide Hub & Cross Promo */
.seo-hub-section {
  max-width: 1400px;
  margin: 0 auto 30px;
  padding: 0 22px;
}

.seo-hub-head {
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.seo-hub-head h2 {
  font-size: 18.5px;
  font-weight: 900;
  color: var(--navy);
}

.seo-hub-head p {
  font-size: 13px;
  color: var(--muted);
}

.guide-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: all 0.16s ease;
}

.guide-card:hover {
  border-color: var(--emerald-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.guide-card .gc-tag {
  align-self: flex-start;
  font-size: 10.8px;
  font-weight: 800;
  color: var(--emerald);
  background: var(--emerald-soft);
  padding: 2.5px 8px;
  border-radius: 5px;
  margin-bottom: 8px;
}

.guide-card h3 {
  font-size: 13.8px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.42;
  margin-bottom: 6px;
}

.guide-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.guide-card .gc-more {
  margin-top: 10px;
  font-size: 11.8px;
  font-weight: 700;
  color: var(--emerald);
}

.cross-promo-bar {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cross-promo-bar strong {
  font-size: 15px;
  display: block;
  margin-bottom: 3px;
}

.cross-promo-bar span {
  font-size: 12.8px;
  color: #CBD5E1;
}

/* Info Cards */
.info-section {
  max-width: 1400px;
  margin: 0 auto 42px;
  padding: 0 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.info-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.info-card h2 {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.info-card ul {
  padding-left: 18px;
  font-size: 13px;
  color: var(--slate-600);
  line-height: 1.7;
}

.info-card p {
  font-size: 13px;
  color: var(--slate-600);
  line-height: 1.65;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: #FFFFFF;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

.modal-header {
  background: var(--navy);
  color: #FFFFFF;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
}

.modal-close {
  background: transparent;
  border: none;
  color: #CBD5E1;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

.pro-box {
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.pro-price {
  font-size: 16px;
  font-weight: 900;
  color: #047857;
  margin-bottom: 8px;
}

.pro-box ul {
  padding-left: 18px;
  font-size: 13px;
  color: #1E293B;
  line-height: 1.68;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 15px 0 12px;
  color: #94A3B8;
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-light);
}

.divider span {
  padding: 0 10px;
}

.license-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: monospace;
  font-size: 13.5px;
  margin-bottom: 9px;
}

.status-msg {
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 8px;
  min-height: 18px;
}

.status-msg.ok { color: var(--emerald); }
.status-msg.err { color: var(--red); }

.site-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border-light);
  background: #FFFFFF;
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--navy);
  color: #FFFFFF;
  padding: 11px 17px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  z-index: 200;
}

/* Responsive */
@media (max-width: 1140px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .panel {
    position: static;
  }
  .panel-tab-body {
    max-height: none;
    min-height: auto;
  }
  .guide-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .info-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner { padding: 10px 14px; }
  .security-pill, .nav-link { display: none; }
  .hero-strip { padding: 18px 14px; }
  .hero-copy h1 { font-size: 20.5px; }
  .hero-steps-card { grid-template-columns: 1fr; }
  .workspace, .seo-hub-section, .info-section { padding: 0 12px; }
  .paper-stage { padding: 10px; }
  .guide-cards-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   A4 MULTI-PAGE VECTOR PDF PRINT STYLESHEET (1:1 Exact A4)
   ============================================================ */
@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  body {
    background: #FFFFFF !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .no-print {
    display: none !important;
  }

  .workspace {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }

  .paper-stage {
    background: #FFFFFF !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    gap: 0 !important;
    overflow: visible !important;
  }

  .a4-scaler-slot {
    display: block !important;
    height: auto !important;
    width: auto !important;
    margin: 0 !important;
  }

  .a4-scale-inner {
    transform: none !important;
    width: auto !important;
    height: auto !important;
  }

  .a4-page {
    width: 210mm !important;
    height: 296mm !important;
    min-height: 296mm !important;
    padding: 13mm 13mm 12mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    page-break-after: always;
    break-after: page;
  }

  .a4-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .photo-card-a4 {
    outline: none !important;
  }

  .photo-card-head {
    background: #0F172A !important;
    color: #FFFFFF !important;
  }

  .photo-stamp-overlay {
    background: rgba(15, 23, 42, 0.82) !important;
    color: #FDE047 !important;
  }
}
