:root {
  --bg: #f7f3ee;
  --surface: #ffffff;
  --ink: #2b2522;
  --muted: #8a7f78;
  --accent: #b5776a;
  --accent-ink: #ffffff;
  --line: #e7dfd6;
  --ok: #6c8f6a;
  --warn: #b8574a;
  --serif: 'Gowun Batang', 'Noto Serif KR', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px calc(40px + env(safe-area-inset-bottom));
}

/* 메인 */
.hero { text-align: center; }
.hero-photo {
  aspect-ratio: 4 / 5;
  border-radius: 200px 200px 16px 16px;
  background:
    linear-gradient(160deg, #e9d8cc 0%, #d9b9a8 55%, #c79c8c 100%);
  background-size: cover;
  /* 4:5 틀로 잘릴 때 어디를 남길지. 두 사람이 사진 아래쪽에 있어서 아래를 살린다 */
  background-position: center 80%;
  margin: 8px auto 28px;
  width: 82%;
}
.hero-photo.has-image { background-color: var(--line); }
.names {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.04em;
  margin: 0;
}
.heart { color: var(--accent); font-size: 0.8em; margin: 0 0.2em; }
.date {
  font-family: var(--serif);
  color: var(--muted);
  margin: 8px 0 0;
  letter-spacing: 0.1em;
}

.greeting {
  font-family: var(--serif);
  text-align: center;
  line-height: 1.9;
  margin: 32px 0 28px;
  font-size: 16px;
}
.greeting p { margin: 0 0 8px; }

/* 패널 */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 20px;
}

.field { display: block; margin-bottom: 18px; }
.field-label { display: block; font-size: 14px; margin-bottom: 8px; }
.field-label small { color: var(--muted); }
.field input {
  width: 100%;
  font: inherit;
  font-size: 16px; /* iOS 확대 방지 */
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn-primary, .btn-secondary {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  padding: 18px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:active { filter: brightness(0.92); }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  margin-top: 10px;
  font-size: 16px;
  padding: 14px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
  margin: 16px 0 0;
}
.privacy {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin: 12px 0 0;
}

/* 진행 */
.progress-title {
  font-family: var(--serif);
  font-size: 18px;
  text-align: center;
  margin: 0 0 16px;
}
.bar {
  height: 10px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.progress-count {
  text-align: center;
  font-variant-numeric: tabular-nums;
  margin: 12px 0 0;
  font-size: 15px;
}

.result { margin-top: 20px; }
.result-msg {
  font-family: var(--serif);
  text-align: center;
  font-size: 18px;
  margin: 0 0 16px;
}
.result-msg.ok { color: var(--ok); }
.result-msg.warn { color: var(--warn); }

.closed {
  font-family: var(--serif);
  text-align: center;
  line-height: 1.9;
}
.closed p { margin: 0; }

.loading { text-align: center; color: var(--muted); }
