:root {
  --bg: #f4f0ea;
  --card: #fffaf2;
  --text: #1e1d1b;
  --muted: #77706a;
  --line: rgba(0,0,0,.09);
  --dark: #121212;
  --accent: #dfb76e;
  --accent-2: #fff2cf;
  --danger: #d95d39;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(223, 183, 110, .28), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(255, 242, 207, .9), transparent 22%),
    var(--bg);
}

.app-shell {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px 36px;
}
.card {
  background: rgba(255, 250, 242, .92);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 18px;
  margin: 14px 0;
  box-shadow: 0 16px 45px rgba(28, 23, 16, .08);
  backdrop-filter: blur(16px);
}
.dark-card {
  color: white;
  background: linear-gradient(150deg, #111, #2b251b 58%, #806235);
  overflow: hidden;
  position: relative;
}
.dark-card::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  right: -80px;
  bottom: -110px;
  background: rgba(255, 255, 255, .12);
}
.top-row, .section-title-row, .result-header, .select-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.eyebrow {
  margin: 0;
  color: rgba(255,255,255,.68);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 6px 0 4px; font-size: 34px; letter-spacing: -1px; }
h2 { font-size: 19px; margin-bottom: 8px; }
h3 { margin: 3px 0 0; font-size: 21px; }
.hero-text { color: rgba(255,255,255,.78); line-height: 1.62; margin-bottom: 16px; }
.paw { font-size: 34px; }
.status-pill {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.86);
  font-size: 12px;
}
.muted { color: var(--muted); line-height: 1.55; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid input:nth-child(1), .form-grid input:nth-child(5), .form-grid button { grid-column: 1 / -1; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  border-radius: 16px;
  padding: 13px 12px;
  font-size: 15px;
  outline: none;
}
input:focus, select:focus { border-color: rgba(223,183,110,.8); box-shadow: 0 0 0 3px rgba(223,183,110,.16); }
.primary-btn, .secondary-btn, .ghost-btn {
  border: 0;
  cursor: pointer;
  border-radius: 17px;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 16px;
}
.primary-btn { background: #111; color: white; }
.primary-btn:disabled { background: #c8c0b6; cursor: not-allowed; }
.secondary-btn { background: var(--accent-2); color: #3c2a0f; border: 1px solid rgba(223,183,110,.45); }
.ghost-btn { background: rgba(0,0,0,.06); color: var(--text); padding: 9px 12px; font-size: 13px; }
.full { width: 100%; margin-top: 14px; }
.select-row { margin-top: 12px; }
.select-row label { color: var(--muted); font-size: 14px; min-width: 72px; }
.recorder { display: grid; place-items: center; gap: 12px; padding: 10px 0 4px; }
.record-btn {
  width: 154px;
  height: 154px;
  border-radius: 50%;
  border: 8px solid #fff4d8;
  background: radial-gradient(circle, #ff7259, #d93c2e);
  color: white;
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 18px 42px rgba(217, 60, 46, .28);
}
.record-btn.recording { animation: pulse 1s infinite; background: radial-gradient(circle, #ff9c5a, #ce2819); }
@keyframes pulse { 50% { transform: scale(1.04); box-shadow: 0 22px 58px rgba(217, 60, 46, .42); } }
.timer { font-size: 28px; font-variant-numeric: tabular-nums; font-weight: 800; }
audio { width: 100%; margin: 10px 0 0; }
.upload-fallback { margin-top: 14px; color: var(--muted); font-size: 14px; }
.upload-fallback input { margin: 12px 0; }
.confidence {
  min-width: 76px;
  text-align: center;
  padding: 13px 10px;
  border-radius: 18px;
  background: #111;
  color: white;
  font-size: 20px;
  font-weight: 900;
}
.quote {
  margin-top: 16px;
  padding: 17px;
  border-radius: 20px;
  background: #fff2cf;
  font-size: 18px;
  line-height: 1.65;
  font-weight: 800;
}
.suggestion { color: #4b453d; line-height: 1.65; }
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.feature-item {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 10px;
  background: rgba(255,255,255,.6);
}
.feature-item b { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.feedback { margin-top: 12px; }
.products { display: grid; gap: 10px; }
.product {
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.62);
  border-radius: 18px;
  padding: 14px;
}
.product strong { display: block; margin-bottom: 5px; }
.product span { color: var(--muted); line-height: 1.45; font-size: 14px; }
.coupon { display: inline-flex; margin-top: 8px; padding: 4px 8px; border-radius: 999px; background: #111; color: white; font-size: 12px; }
.history-item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.history-item:first-child { border-top: 0; }
.history-item b { display: block; margin-bottom: 5px; }
.report-bars { display: grid; gap: 8px; margin: 8px 0 12px; }
.report-row { display: grid; grid-template-columns: 100px 1fr 46px; gap: 8px; align-items: center; font-size: 13px; }
.bar { height: 8px; background: rgba(0,0,0,.08); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: #111; border-radius: 999px; }
@media (max-width: 380px) {
  .form-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  h1 { font-size: 30px; }
}
