:root {
  color-scheme: light;
  --bg: #f4f0e8;
  --ink: #25231f;
  --muted: #716b61;
  --line: #ded5c6;
  --panel: #fffdf8;
  --green: #28785f;
  --green-dark: #1f604c;
  --amber: #b66b27;
  --soft: #ede5d8;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(140deg, rgba(40, 120, 95, 0.12), transparent 35%),
    linear-gradient(340deg, rgba(182, 107, 39, 0.14), transparent 40%),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.shell {
  width: min(100%, 680px);
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow,
.section {
  margin: 0 0 7px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
}

.eyebrow small,
h1 small,
.section small,
h2 small,
.choice small,
.hint small,
.note-field small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
}

.section small {
  margin-top: 2px;
  font-size: 12px;
}

.eyebrow small {
  margin-top: 3px;
  font-size: 12px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.05;
}

h1 small {
  margin-top: 9px;
  font-size: 16px;
}

.counter {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(222, 213, 198, 0.9);
  margin-bottom: 18px;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transition: width 180ms ease;
}

.question-card,
.success {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(222, 213, 198, 0.95);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(65, 55, 42, 0.14);
  padding: clamp(22px, 5vw, 34px);
}

.question-head {
  min-height: 132px;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.24;
  letter-spacing: 0;
}

h2 small {
  margin-top: 8px;
  font-size: clamp(16px, 2.6vw, 20px);
}

.hint {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
}

.hint small {
  margin-top: 4px;
  font-size: 14px;
}

.answer-area {
  display: grid;
  gap: 10px;
  margin: 12px 0 18px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
}

.choice input {
  width: 19px;
  height: 19px;
  accent-color: var(--green);
  flex: 0 0 auto;
}

.choice span {
  line-height: 1.45;
}

.choice small {
  margin-top: 3px;
  font-size: 13px;
}

.text-input {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 13px 14px;
  color: var(--ink);
  outline: none;
}

.input-with-unit {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}

.input-with-unit input {
  border: 0;
  min-width: 0;
}

.input-with-unit span {
  padding: 0 15px;
  color: var(--muted);
  font-weight: 700;
}

.note-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.note-field small {
  display: inline;
  margin-left: 4px;
  font-size: 13px;
}

.note-field textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
}


.intro-card .question-head {
  min-height: auto;
}

.intro-card .answer-area {
  margin-top: 18px;
}

.intro-profile {
  display: grid;
  grid-template-columns: 0.78fr 1fr;
  gap: 20px;
  align-items: start;
}

.intro-profile img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.intro-copy p {
  margin-bottom: 16px;
  color: var(--ink);
  line-height: 1.65;
  font-weight: 650;
}

.intro-copy p small,
.intro-copy li small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

.intro-copy ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.intro-copy li {
  border-top: 1px solid var(--line);
  padding-top: 9px;
  color: var(--ink);
  line-height: 1.45;
  font-weight: 750;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary {
  background: var(--green);
  color: #fff;
}

.primary:hover {
  background: var(--green-dark);
}

.ghost {
  background: var(--soft);
  color: var(--ink);
}

.success {
  text-align: center;
}

.success h2 {
  margin-bottom: 12px;
}

.success p {
  color: var(--muted);
  line-height: 1.7;
}

.success button {
  width: 100%;
  margin-top: 12px;
}

@media (max-width: 520px) {
  .app {
    align-items: stretch;
    padding: 16px;
  }

  .topbar {
    align-items: start;
  }

  h1 {
    font-size: 29px;
  }

  .question-head {
    min-height: 150px;
  }


  .intro-profile {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .intro-profile img {
    max-height: 360px;
    object-position: 50% 14%;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .ghost {
    order: 2;
  }
}
