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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #1a1a2e;
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

.header {
  background: linear-gradient(135deg, #1a2c3e 0%, #2c5f7a 100%);
  color: white;
  padding: 24px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.header .article {
  font-size: 14px;
  opacity: 0.9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-bar {
  background: rgba(255, 255, 255, 0.2);
  height: 4px;
  border-radius: 2px;
  margin-top: 16px;
  overflow: hidden;
}

.progress-fill {
  background: #6abf8a;
  height: 100%;
  transition: width 0.3s ease;
}

.step-container {
  padding: 20px;
}

.step-card {
  background: white;
  border-radius: 28px;
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
  overflow: hidden;
  transition: transform 0.2s;
}

.step-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  padding: 16px 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.step-number {
  font-size: 14px;
  font-weight: 600;
  color: #6c7e8e;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.step-complete {
  background: #6abf8a;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-complete.completed {
  background: #27ae60;
  cursor: default;
  opacity: 0.7;
}

.step-complete:active {
  transform: scale(0.95);
}

.step-image {
  position: relative;
  background: #fafbfc;
  text-align: center;
  padding: 0;
  cursor: default;
}

.zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  backdrop-filter: blur(4px);
}

.step-description {
  padding: 20px;
  font-size: 18px;
  font-weight: 500;
  background: #ffffff;
  border-top: 1px solid #f0f2f5;
  color: #2c3e50;
}

.nav-buttons {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}

.nav-btn {
  flex: 1;
  background: #2c3e50;
  color: white;
  border: none;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 60px;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:active {
  transform: scale(0.97);
  background: #1a252f;
}

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

.missing-btn {
  width: 100%;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  padding: 18px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 60px;
  cursor: pointer;
  margin: 20px 0;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.missing-btn:active {
  transform: scale(0.98);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  z-index: 100;
  overflow-y: auto;
}

.modal-content {
  background: white;
  margin: 20px;
  border-radius: 32px;
  padding: 28px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content h2 {
  font-size: 28px;
  margin-bottom: 24px;
  color: #1a2c3e;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
  color: #4a5b6b;
}

.form-group select,
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  font-family: inherit;
  transition: border 0.2s;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #6abf8a;
}

.photo-preview {
  margin-top: 12px;
  max-width: 100%;
  display: none;
}

.photo-preview img {
  max-width: 100%;
  border-radius: 16px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkbox-group input {
  width: 24px;
  height: 24px;
}

.submit-btn {
  background: linear-gradient(135deg, #27ae60 0%, #1a6d4c 100%);
  color: white;
  border: none;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 60px;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
}

.close-modal {
  background: #95a5a6;
  margin-top: 12px;
}

.footer {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: #6c7e8e;
  margin-top: 20px;
}

.stats {
  background: #f0f9ff;
  margin: 16px 20px;
  padding: 16px;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-text {
  font-size: 13px;
  color: #2c5f7a;
  font-weight: 500;
  flex: 1;
  min-width: 160px;
}

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

.review-open-btn {
  background: #fff;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.review-open-btn:hover {
  background: #eff6ff;
}

.reset-stats {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.shop-cta-bar {
  margin: 0 20px 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
  border: 1px solid #fcd34d;
  text-align: center;
}

.shop-cta-bar__text {
  font-size: 14px;
  color: #92400e;
  font-weight: 600;
  margin-bottom: 8px;
}

.shop-cta-bar__link {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  color: #b45309;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shop-cta-bar__link:hover {
  color: #78350f;
}

.modal-lead {
  font-size: 14px;
  color: #64748b;
  margin: -12px 0 20px;
}

.star-rating {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
}

.star-rating .star {
  background: none;
  border: none;
  font-size: 36px;
  line-height: 1;
  color: #cbd5e1;
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.15s, transform 0.15s;
}

.star-rating .star.is-active,
.star-rating .star.is-hover {
  color: #f59e0b;
  transform: scale(1.05);
}

.modal--review {
  z-index: 110;
}

.step-image-viewport {
  position: relative;
  overflow: auto;
  max-height: min(70vh, 520px);
  margin: 16px 16px 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  border-radius: 16px;
  background: #f1f5f9;
}

.step-image-viewport img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  transition: transform 0.15s ease-out;
  border-radius: 16px;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.zoom-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px 14px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.zoom-tool-btn {
  min-width: 44px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  font-size: 18px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.zoom-tool-btn:active {
  background: #e2e8f0;
}

.zoom-tool-btn--text {
  font-size: 13px;
  font-weight: 600;
}

.zoom-pct {
  min-width: 52px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.zoom-hint {
  position: absolute;
  bottom: 52px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  max-width: calc(100% - 24px);
  text-align: right;
}

.zoom-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.94);
  flex-direction: column;
  padding: env(safe-area-inset-top, 12px) 12px 12px;
}

.zoom-lightbox.is-open {
  display: flex;
}

.zoom-lightbox__close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

.zoom-lightbox__toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 0 12px;
}

.zoom-lightbox__toolbar .zoom-tool-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #f8fafc;
}

.zoom-lightbox__pct {
  min-width: 56px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
}

.zoom-lightbox__viewport {
  flex: 1;
  overflow: auto;
  touch-action: none;
  border-radius: 12px;
  cursor: grab;
}

.zoom-lightbox__viewport.is-dragging {
  cursor: grabbing;
}

.zoom-lightbox__viewport img {
  display: block;
  max-width: none;
  margin: 0 auto;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
}

.zoom-lightbox__hint {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  padding: 8px 0 4px;
}

.post-assembly {
  margin: 16px 20px 0;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #e9f5ef 0%, #f0fdf4 100%);
  border: 1px solid #bbf7d0;
}

.post-assembly h3 {
  font-size: 16px;
  color: #166534;
  margin-bottom: 10px;
}

.post-assembly ul {
  list-style: none;
  font-size: 14px;
  color: #14532d;
}

.post-assembly li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(22, 101, 52, 0.15);
}

.post-assembly li:last-child {
  border-bottom: none;
}

.post-assembly a {
  color: #15803d;
  font-weight: 600;
}

.back-link {
  display: inline-block;
  margin: 12px 20px 0;
  color: #2c5f7a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .step-description {
    font-size: 16px;
  }
  .step-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .step-complete {
    justify-content: center;
  }
}
