* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f6f3f4;
  color: #222;
  min-height: 100vh;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.top h1 {
  margin: 0;
  font-size: 20px;
}
.muted { color: #888; font-size: 13px; }
.card {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.field { margin-bottom: 12px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: #666; }
.field input, .field textarea, .code-input {
  width: 100%;
  border: 1px solid #e6e0e2;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}
.code-input {
  font-size: 28px;
  letter-spacing: 6px;
  text-align: center;
}
.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 12px;
  background: #c45c76;
  color: #fff;
  font-size: 16px;
}
.btn.secondary { background: #fff; color: #c45c76; border: 1px solid #e7c5ce; }
.btn.ghost { background: #f3f3f3; color: #444; }
.btn.warn { background: #fff; color: #b42318; border: 1px solid #f0c7c3; }
.btn + .btn, .actions .btn + .btn { margin-top: 8px; }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.actions .btn { flex: 1; margin-top: 0; }
.nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.nav button {
  min-height: 88px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #222;
  font-size: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tabs button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 8px 6px;
  background: #fff;
  color: #666;
}
.tabs button.on { background: #c45c76; color: #fff; }
.line { font-size: 14px; line-height: 1.5; margin: 4px 0; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; }
.photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; background: #eee; }
.video-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #111; margin-bottom: 12px; }
.video-wrap video { width: 100%; display: block; }
.result { font-size: 18px; font-weight: 600; }
.result.bad { color: #b42318; }
.result.ok { color: #067647; }
.empty { text-align: center; color: #888; padding: 28px 8px; }
.back {
  border: 0;
  background: transparent;
  color: #c45c76;
  padding: 0;
  font-size: 15px;
}
.sheet textarea { min-height: 88px; }
