:root {
  --navy: #1b3a5c;
  --maroon: #8f1d2c;
  --maroon-dark: #6e1620;
  --text: #22303f;
  --text-muted: #4c5a68;
  --border: #d9dce6;
  --radius: 14px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: #f5f6fa;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
}

h1 {
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
  color: var(--navy);
}

.subtitle {
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

.step-label {
  font-weight: 700;
  color: var(--maroon);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  margin: 0 0 0.9rem;
}

.step {
  scroll-margin-top: 1.5rem;
}

.frame-sample {
  width: 100%;
  max-width: 320px;
  border-radius: 50%;
  margin-bottom: 1.75rem;
  box-shadow: 0 4px 20px rgba(16, 38, 62, 0.15);
}

.upload-row {
  margin-bottom: 1rem;
}

input#photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.75rem;
  border-radius: 999px;
  background: var(--maroon);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--maroon-dark);
  transform: translateY(-1px);
}

.status {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.75rem 0;
}

.position-area {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.position-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

#preview-canvas {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(16, 38, 62, 0.15);
  touch-action: none;
  cursor: grab;
  margin-bottom: 1.25rem;
}

#preview-canvas:active {
  cursor: grabbing;
}

#zoom-slider {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 1.25rem;
}

.result-area {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 1.5rem;
}

#result-img {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(16, 38, 62, 0.15);
}

#share-btn {
  margin-right: 0.5rem;
  margin-bottom: 0.75rem;
}

.btn-download {
  background: var(--navy);
}

.btn-download:hover {
  background: #10263e;
}
