:root {
  --bg: #f4f2ec;
  --paper: #fffcf7;
  --ink: #1c1b18;
  --muted: #6f6c64;
  --line: #e4e0d6;
  --accent: #1c1b18;
  --danger: #b42318;
  --ok: #2f6b3c;
  --shadow: 0 8px 28px rgba(28, 27, 24, 0.06);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

body {
  min-height: 100dvh;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.top {
  padding: 8px 4px 18px;
}

.kicker {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: none;
}

h1 {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 0.02em;
  margin: 6px 0 8px;
}

.lead {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.steps {
  display: flex;
  gap: 6px;
  margin: 18px 0 20px;
}

.steps span {
  height: 3px;
  flex: 1;
  background: var(--line);
  border-radius: 99px;
}

.steps span.on {
  background: var(--ink);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.card h2 {
  font-size: 17px;
  margin: 0 0 6px;
  font-weight: 650;
}

.hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 14px;
}

label.field {
  display: block;
  margin-bottom: 14px;
}

label.field span,
.field-title {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  font-size: 16px;
  line-height: 1.5;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px 12px;
  color: var(--ink);
  outline: none;
  font-family: inherit;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: #b9b3a4;
}

.choices {
  display: flex;
  gap: 8px;
}

.choices button,
.btn {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
}

.choices button.ghost,
.btn.ghost,
.chip {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.choices button.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.chip {
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
}

.row-btns {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.row-btns .btn {
  flex: 1;
}

.btn.block {
  width: 100%;
  margin-top: 8px;
}

.btn:disabled {
  opacity: 0.4;
}

.counter {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(244, 242, 236, 0.92);
  backdrop-filter: blur(8px);
  margin: 0 -4px 12px;
  padding: 10px 4px 8px;
  font-size: 13px;
}

.counter strong {
  font-size: 16px;
}

.entry {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.entry-head b {
  font-size: 14px;
}

.linkish {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  padding: 0;
}

.subrow {
  display: grid;
  grid-template-columns: 1fr 72px 32px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.answer-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.record-wrap {
  text-align: center;
  padding: 8px 0 4px;
}

.rec-btn {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.rec-btn.hot {
  background: var(--danger);
}

.rec-tip {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.rec-actions {
  margin-top: 10px;
}

.rec-actions .btn {
  min-width: 96px;
}

.audio-ok {
  font-size: 13px;
  color: var(--ok);
  margin: 8px 0;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.thumbs .shot {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}

.thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbs .shot button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
}

.add-photo {
  aspect-ratio: 1;
  border: 1px dashed var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  background: #fff;
}

.hidden-file {
  display: none;
}

.errors {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.6;
  margin: 8px 0 0;
}

.review dt {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}

.review dd {
  margin: 2px 0 0;
  font-size: 15px;
  line-height: 1.6;
}

.done {
  text-align: center;
  padding: 48px 12px;
}

.done h1 {
  margin-top: 12px;
}

.warn {
  font-size: 12px;
  color: #8a5a12;
  background: #fff6e8;
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.55;
  margin-bottom: 12px;
}
