:root {
  color-scheme: light;
  --ink: #1d2925;
  --muted: #6d7771;
  --paper: #f5f2eb;
  --card: #fffefa;
  --green: #245c49;
  --green-dark: #194533;
  --line: #e4e3d9;
  --accent: #d7ed9f;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 92% 6%, rgba(215, 237, 159, 0.38), transparent 25rem),
    var(--paper);
  color: var(--ink);
}

button,
a {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app {
  width: min(100% - 40px, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 0 max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.topbar,
.brand,
.progress-row,
.navigation,
.result-actions,
.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar {
  min-height: 40px;
}

.brand {
  justify-content: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 17px;
  font-weight: 700;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.intro {
  margin: 38px 0 25px;
}

.intro h1 {
  margin: 8px 0 6px;
  font-size: clamp(29px, 8vw, 36px);
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.intro-copy,
.question-hint,
.result-context {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.flow {
  padding: 22px 20px 20px;
  border: 1px solid rgba(29, 41, 37, 0.06);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 14px 36px rgba(48, 56, 46, 0.06);
}

.progress-row {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
}

#progress-label {
  color: var(--green);
}

#progress-caption {
  color: var(--muted);
  font-weight: 500;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9ebe3;
}

.progress-track span {
  width: 50%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--green);
  transition: width 180ms ease;
}

.question-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 29px;
}

.question-index {
  color: #a4ac9f;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.question-heading h2,
.result-heading h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.question-hint {
  margin-top: 6px;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.option {
  min-height: 59px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.option:active {
  transform: scale(0.99);
}

.option-label {
  font-size: 16px;
  font-weight: 600;
}

.option-mark {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1.5px solid #d5dad1;
  border-radius: 50%;
  color: transparent;
  font-size: 12px;
  font-weight: 700;
}

.option[aria-pressed="true"] {
  border-color: var(--green);
  background: #f3f8ed;
}

.option[aria-pressed="true"] .option-mark {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.option:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #a6c76b;
  outline-offset: 3px;
}

.navigation {
  gap: 12px;
  margin-top: 22px;
}

.back-button,
.next-button {
  min-height: 48px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.back-button {
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--green);
}

.next-button {
  flex: 1;
  border: 0;
  background: var(--green);
  color: white;
  transition: background 140ms ease, opacity 140ms ease;
}

.next-button:not(:disabled):hover {
  background: var(--green-dark);
}

.next-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

#result-screen {
  padding-top: 23px;
}

.result-heading {
  align-items: flex-start;
}

.result-heading h2 {
  margin-top: 5px;
}

.result-stamp {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid #cfe0b0;
  border-radius: 50%;
  background: #f2f8e8;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.result-context {
  margin-top: 8px;
}

.key-parameter {
  margin: 11px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: #f0f5e8;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
}

.learn-control {
  width: fit-content;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 7px 0 0 auto;
  color: #4a5750;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.learn-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.toggle-track {
  width: 35px;
  height: 20px;
  display: block;
  padding: 3px;
  border-radius: 99px;
  background: #d7dcd4;
  pointer-events: none;
  transition: background 140ms ease;
}

.toggle-track span {
  width: 14px;
  height: 14px;
  display: block;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  transition: transform 140ms ease;
}

.learn-control input:checked + .toggle-track {
  background: var(--green);
}

.learn-control input:checked + .toggle-track span {
  transform: translateX(15px);
}

.learn-control input:focus-visible + .toggle-track {
  outline: 3px solid #a6c76b;
  outline-offset: 3px;
}

.recipe-list {
  display: grid;
  gap: 0;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.recipe-item {
  border-bottom: 1px solid #eeeee7;
}

.recipe-item:last-child {
  border-bottom: 0;
}

.recipe-row {
  width: 100%;
  min-height: 43px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 15px;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
  text-align: left;
}

.recipe-row:not(:disabled) {
  cursor: pointer;
}

.recipe-row:disabled {
  opacity: 1;
}

.recipe-row:not(:disabled):hover .recipe-name {
  color: var(--green);
}

.recipe-indicator {
  color: var(--green);
  font-size: 17px;
  text-align: center;
}

.principle-detail {
  margin: -1px 0 12px;
  padding: 0 20px 0 0;
  color: #4b5851;
  font-size: 12px;
  line-height: 1.7;
}

.scene-description,
.snow-tip {
  margin: 9px 0 0;
  padding: 10px 11px;
  border-radius: 10px;
  background: #f5f4ed;
  color: #46534b;
  font-size: 12px;
  line-height: 1.65;
}

.snow-tip {
  background: #eef4f7;
  color: #355468;
  font-weight: 600;
}

.recipe-name {
  color: #626d66;
}

.recipe-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.recipe-note {
  color: var(--green);
  font-size: 11px;
  font-weight: 500;
}

.result-actions {
  gap: 8px;
  margin-top: 17px;
}

.result-actions .back-button {
  white-space: nowrap;
}

.restart-button {
  flex: 0 0 auto;
  min-width: 120px;
  padding: 0 15px;
}

footer {
  margin-top: auto;
  padding-top: 22px;
  color: #788078;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

[hidden] {
  display: none !important;
}

body.showing-result .topbar,
body.showing-result .intro,
body.showing-result footer {
  display: none;
}

body.showing-result .flow {
  align-self: stretch;
  margin: auto 0;
  padding-top: 12px;
  padding-bottom: 12px;
}

body.showing-result #result-screen {
  padding-top: 6px;
}

body.showing-result .recipe-list {
  margin-top: 2px;
}

body.showing-result .recipe-row {
  min-height: 31px;
}

body.showing-result .result-actions {
  margin-top: 5px;
}

body.showing-result .key-parameter {
  margin-top: 6px;
  padding-top: 6px;
  padding-bottom: 6px;
}

body.showing-result .learn-control {
  min-height: 27px;
  margin-top: 2px;
}

body.showing-result .scene-description,
body.showing-result .snow-tip {
  margin-top: 4px;
  padding-top: 5px;
  padding-bottom: 5px;
}

@media (min-height: 850px) {
  .intro {
    margin-top: 54px;
    margin-bottom: 32px;
  }

  .flow {
    padding: 25px 24px 23px;
  }
}

@media (max-width: 360px) {
  .app {
    width: min(100% - 28px, 480px);
  }

  .flow {
    padding-right: 16px;
    padding-left: 16px;
  }

  .recipe-row {
    font-size: 12px;
  }

  .recipe-value {
    gap: 5px;
    font-size: 13px;
  }
}
