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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
}

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

a:hover {
  text-decoration: underline;
}

.hidden { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.2rem;
  background: #ffffffd9;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #e5e7eb;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-dot {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.topbar-title {
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 0.98rem;
}

.plan-badge {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
}

.mainwrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.6rem 1.25rem 4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: stretch;
  margin-top: 0.5rem;
}

.hero-left h1 {
  font-size: 2.25rem;
  line-height: 1.05;
  margin-bottom: 0.8rem;
  color: #0f172a;
}

.lead {
  font-size: 0.98rem;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.hero-badges span {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: #e5efff;
  color: #1d4ed8;
}

.primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.keyword-line {
  font-size: 0.8rem;
  color: #6b7280;
}

.btn {
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 0.7rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: white;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
  background: #111827;
  color: #f9fafb;
}

.btn-ghost {
  background: #ffffff;
  color: #1f2933;
  border: 1px solid #e5e7eb;
}

.btn-mini {
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  background: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;
  cursor: pointer;
}

.hero-right {
  display: flex;
  flex-direction: column;
}

.pricing-card {
  background: #ffffff;
  border-radius: 1.1rem;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.pricing-card.highlight {
  border-color: #bfdbfe;
}

.pricing-header h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #0f172a;
}

.price {
  margin: 0.2rem 0 0.3rem;
  font-weight: 600;
  color: #1d4ed8;
}

.badge {
  font-size: 0.7rem;
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}

.pricing-list {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0.75rem;
  font-size: 0.85rem;
  color: #4b5563;
}

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

.pricing-note {
  font-size: 0.78rem;
  color: #6b7280;
}

.section.seo-text {
  margin-top: 2.5rem;
  padding: 1.5rem 1.3rem;
  border-radius: 1.1rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  font-size: 0.9rem;
  color: #374151;
}

/* Scanner */
.scanner-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.scanner-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: #f9fafb;
}

.icon-btn {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
}

.scan-hint {
  font-size: 0.8rem;
  color: #e5e7eb;
}

.scanner-view {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.scanner-view video,
.scanner-view canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-bottom {
  padding: 0.6rem 0.9rem 0.9rem;
  background: #020617;
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

.plan-info-bar {
  font-size: 0.78rem;
  color: #cbd5f5;
  margin-bottom: 0.3rem;
}

.scanner-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.scan-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.shutter-btn {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 4px solid #e5e7eb;
  background: transparent;
  position: relative;
  cursor: pointer;
}

.shutter-btn::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  background: #3b82f6;
}

.page-counter {
  font-size: 0.78rem;
  color: #e5e7eb;
}

.multi-page-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
}

.modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.3rem 1.4rem 1.4rem;
  max-width: 420px;
  width: 92%;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.35);
  color: #111827;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.modal-content p {
  font-size: 0.9rem;
  color: #4b5563;
}

.modal-note {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: #6b7280;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
}

/* PWA button */
.pwa-install-btn {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: white;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
  z-index: 45;
}

.footer {
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
  padding: 1.5rem 1.25rem 2rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-right {
    order: -1;
  }
}

@media (max-width: 640px) {
  .mainwrap {
    padding-inline: 0.9rem;
  }
  .hero-left h1 {
    font-size: 1.8rem;
  }
}
