:root {
  color: #1c1915;
  background: #f3f0e8;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0 auto;
  max-width: 880px;
  padding: 24px 16px 48px;
}

header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

h1, h2, h3 { margin: 0 0 8px; font-weight: 650; }
h1 { font-size: 28px; }
p { line-height: 1.6; }

header p, .hint { color: #5c564c; margin: 0; }
.banner {
  background: #fff4cc;
  border: 1px solid #e6d48a;
  padding: 10px 12px;
  border-radius: 8px;
}
.error { color: #8d2b2b; min-height: 1.2em; }

.card {
  background: #fffdf8;
  border: 1px solid #e4dccb;
  border-radius: 14px;
  padding: 18px;
  margin-top: 12px;
}

nav { display: flex; gap: 8px; margin-top: 8px; }
nav button, button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: #e7efe9;
  color: #16382c;
  cursor: pointer;
}
nav button.active, button.primary { background: #0f6b4c; color: white; }
button:disabled { opacity: 0.6; cursor: wait; }

label { display: block; margin: 12px 0; }
input[type="text"], input[type="password"], textarea, select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #d9d0c1;
  border-radius: 10px;
  font: inherit;
  background: white;
}
.check { display: flex; gap: 8px; align-items: center; }
.check input { width: auto; }

.item {
  border-top: 1px solid #eee6d8;
  padding: 12px 0;
}
.item strong { display: block; }
.tag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3ead2;
  font-size: 13px;
}
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.severe {
  background: #fde8e8;
  border: 1px solid #e7b4b4;
  padding: 8px 10px;
  border-radius: 8px;
}
#answer-text, #trial-answer-text { font-size: 18px; white-space: pre-wrap; }
#citations { padding-left: 18px; }

@media (max-width: 720px) {
  body { padding: 12px 12px 120px; }
  header { flex-direction: column; align-items: stretch; }
  h1 { font-size: 24px; }
  nav { flex-wrap: wrap; }
  nav button, button, select { min-height: 44px; }
  input[type="text"], input[type="password"], textarea, select { font-size: 16px; }
  #trial-form label { margin-bottom: 16px; }
}
