:root,
html,
body,
#app,
page {
  --primary: #a73755;
  --primary-strong: #7f263f;
  --primary-light: #c7657f;
  --primary-soft: #f3e2e7;
  --bg: #f3f2f0;
  --bg-pattern: #e5e2df;
  --card-bg: #fbfaf8;
  --surface-muted: #eeece9;
  --text: #25232a;
  --text-secondary: #68636d;
  --border: #d9d5d2;
  --outline: #36313a;
  --success: #386b55;
  --warning: #8a5a27;
  --danger: #a73755;
  --shadow: rgba(52, 42, 48, .08);
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.7rem;
  color: var(--text);
  background: var(--bg);
}

html,
body,
#app {
  min-height: 100%;
  margin: 0;
}

page,
.index-page,
.upload-page,
.analyzing-page,
.report-page,
.history-page,
.profile-page {
  min-height: 100dvh;
  box-sizing: border-box;
}

.card {
  position: relative;
  box-sizing: border-box;
  margin: 0.5rem;
  padding: 0.7rem;
  overflow: hidden;
  border: 0.025rem solid var(--border);
  border-radius: 0.4rem;
  background: var(--card-bg);
  box-shadow: 0 0.35rem 1rem var(--shadow);
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.3rem;
  padding: 0.55rem 1.1rem;
  border: 0.025rem solid var(--primary-strong);
  border-radius: 0.25rem;
  color: #fffdf8;
  background: var(--primary);
  box-shadow: 0 0.2rem 0.55rem rgba(127, 38, 63, 0.18);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
}

.btn-primary:active {
  transform: translateY(0.025rem) scale(0.99);
  box-shadow: 0 0.075rem 0.25rem rgba(127, 38, 63, 0.16);
}

.btn-primary[disabled],
.btn-primary.disabled {
  opacity: 0.5;
  pointer-events: none;
}

taro-input-core,
taro-textarea-core {
  color: var(--text);
}

.disclaimer-bar {
  margin: 0.45rem 0.5rem;
  padding: 0.4rem 0.5rem;
  border: 0.025rem solid #d9c8ad;
  border-radius: 0.3rem;
  color: #80501a;
  background: #fff3ce;
  font-size: 0.525rem;
  line-height: 1.55;
  text-align: left;
}

@media (prefers-reduced-motion: no-preference) {
  .card {
    animation: card-pop 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  @keyframes card-pop {
    from {
      opacity: 0;
      transform: translateY(0.2rem);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root,
  html,
  body,
  #app,
  page {
    --bg: #201f23;
    --card-bg: #2a292e;
    --surface-muted: #343238;
    --text: #f3f0ed;
    --text-secondary: #bbb5be;
    --border: #47444b;
    --outline: #d5cdd4;
    --shadow: rgba(0, 0, 0, .28);
    background-color: var(--bg);
  }
}
