html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background-color: #f8f9fa;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body > .container {
  flex: 1 0 auto;
}

.navbar-brand {
  font-weight: 600;
}

.site-footer {
  flex-shrink: 0;
  width: 100%;
  margin-top: 2rem;
  background: #fff;
  border-top: 1px solid #dee2e6;
}

.site-footer .container {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-footer a {
  color: #6c757d;
  text-decoration: none;
}

.site-footer a:hover {
  color: #0d6efd;
  text-decoration: underline;
}

.card-hover {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.card-thumb {
  height: 140px;
  object-fit: cover;
}

.camera-container {
  position: relative;
  background: #1a1a2e;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  max-height: 70vh;
}

.camera-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 240px;
  color: #adb5bd;
  cursor: pointer;
}

.camera-guide-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.guide-frame {
  position: relative;
  width: min(82%, 22rem);
  aspect-ratio: 1.6;
  border: 2px dashed rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.camera-guide-overlay[data-state="centering"] .guide-frame {
  border-color: rgba(255, 193, 7, 0.9);
}

.camera-guide-overlay[data-state="almost"] .guide-frame {
  border-color: rgba(13, 202, 240, 0.95);
}

.camera-guide-overlay[data-state="ready"] .guide-frame,
.camera-guide-overlay[data-state="capturing"] .guide-frame {
  border-color: rgba(25, 135, 84, 0.95);
  border-style: solid;
}

.guide-corner {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border: 3px solid rgba(255, 255, 255, 0.9);
}

.guide-corner-tl {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 8px;
}

.guide-corner-tr {
  top: -2px;
  right: -2px;
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 8px;
}

.guide-corner-bl {
  bottom: -2px;
  left: -2px;
  border-right: none;
  border-top: none;
  border-bottom-left-radius: 8px;
}

.guide-corner-br {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 8px;
}

.guide-status {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  max-width: calc(100% - 2rem);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.camera-guide-overlay[data-state="ready"] .guide-status,
.camera-guide-overlay[data-state="capturing"] .guide-status {
  background: rgba(25, 135, 84, 0.92);
}

.camera-guide-overlay[data-state="centering"] .guide-status {
  background: rgba(255, 193, 7, 0.92);
  color: #212529;
}

.capture-guide-list {
  margin: 0;
  padding-left: 1.15rem;
}

.capture-guide-list li + li {
  margin-top: 0.25rem;
}

.capture-page .btn-lg {
  padding: 0.75rem 1.5rem;
}

.capture-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  opacity: 0.45;
}

.progress-step.active,
.progress-step.done {
  opacity: 1;
}

.progress-step .step-number {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #dee2e6;
  color: #495057;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.progress-step.active .step-number {
  background: #0d6efd;
  color: #fff;
}

.progress-step.done .step-number {
  background: #198754;
  color: #fff;
}

.progress-step .step-label {
  font-size: 0.75rem;
  color: #6c757d;
}

.progress-line {
  flex: 1;
  max-width: 3rem;
  height: 2px;
  background: #dee2e6;
  margin-bottom: 1.25rem;
}

.side-badge {
  display: inline-block;
  background: #0d6efd;
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.captured-thumb {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.captured-thumb img {
  width: 80px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.thumb-label,
.image-side-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #6c757d;
  letter-spacing: 0.03em;
}

.review-image-block,
.detail-image-block {
  position: relative;
}

.image-side-label {
  display: block;
  margin-bottom: 0.35rem;
}

.card-img-wrapper {
  position: relative;
}

.card-sides-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(13, 110, 253, 0.9);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.card-details dt {
  font-weight: 500;
  color: #6c757d;
}

.hero-section {
  padding: 3rem 0;
}

.landing-hero {
  padding: 3.5rem 0 2rem;
}

.landing-eyebrow {
  color: #0d6efd;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.landing-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
}

.landing-lead {
  font-size: 1.15rem;
  color: #495057;
}

.landing-section {
  padding: 2.5rem 0;
}

.landing-section-title {
  font-weight: 700;
}

.landing-stat-strip {
  margin-bottom: 1rem;
}

.landing-stat-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 1rem;
  padding: 1.25rem;
  height: 100%;
}

.landing-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0d6efd;
}

.landing-stat-label {
  color: #6c757d;
  font-size: 0.9rem;
}

.landing-feature-card,
.landing-compare-card,
.before-after-panel > div {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 1rem;
  padding: 1.5rem;
}

.landing-feature-icon,
.landing-step-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.landing-step-num {
  font-weight: 700;
  color: #0d6efd;
  margin-bottom: 0.5rem;
}

.landing-checklist,
.landing-bullets {
  padding-left: 1.2rem;
}

.landing-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.landing-tag,
.landing-audience span {
  display: inline-block;
  background: #e7f1ff;
  color: #0d6efd;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.landing-audience {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.landing-compare-card.negative {
  border-color: #f1c2c7;
  background: #fff8f8;
}

.landing-compare-card.positive {
  border-color: #badbcc;
  background: #f7fff9;
}

.before-after-panel {
  display: grid;
  gap: 1rem;
}

.panel-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #6c757d;
  margin-bottom: 0.75rem;
}

.paper-stack {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.digital-list {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.digital-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.digital-row span {
  color: #6c757d;
}

.landing-scenario {
  background: linear-gradient(135deg, #e7f1ff, #f8f9fa);
  border-radius: 1rem;
  padding: 2rem;
}

.landing-cta {
  padding: 3rem 0 2rem;
}

.manual-page .manual-hero {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 1rem;
  padding: 2rem;
}

.manual-toc {
  top: 1rem;
}

.manual-nav .nav-link {
  color: #495057;
  padding: 0.35rem 0;
}

.manual-nav .nav-link.active,
.manual-nav .nav-link:hover {
  color: #0d6efd;
}

.manual-section h3 {
  margin-top: 1rem;
}

.manual-steps {
  padding-left: 1.2rem;
}

.manual-steps li + li {
  margin-top: 0.75rem;
}

@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .navbar .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .capture-page .btn {
    min-height: 44px;
  }
}
