:root {
  --ink: #172723;
  --ink-2: #2c4039;
  --muted: #77837d;
  --muted-2: #9aa49e;
  --green: #164a3e;
  --green-2: #1f6b57;
  --green-3: #2d806a;
  --green-soft: #e9f0eb;
  --gold: #bd9554;
  --gold-2: #d9bd82;
  --cream: #f5f1e7;
  --cream-2: #fbf9f4;
  --paper: #fffdf9;
  --line: #e5e2d8;
  --line-2: #eeeae1;
  --danger: #a94537;
  --danger-soft: #fbf0ee;
  --warn: #8a6227;
  --warn-soft: #fbf4e5;
  --shadow: 0 22px 60px rgba(34, 48, 42, 0.09);
  --shadow-sm: 0 8px 24px rgba(34, 48, 42, 0.06);
  --radius: 20px;
  --radius-sm: 14px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(900px 540px at 88% -6%, rgba(189, 149, 84, 0.16), transparent 62%),
    radial-gradient(700px 500px at -10% 12%, rgba(31, 107, 87, 0.11), transparent 60%),
    var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image: radial-gradient(rgba(23, 39, 35, 0.12) 0.55px, transparent 0.55px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
  z-index: -1;
}

a {
  color: var(--green);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

.shell {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 22px 20px calc(38px + env(safe-area-inset-bottom));
  min-height: 100dvh;
}

.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  box-shadow: 0 8px 18px rgba(22, 74, 62, 0.16);
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--green);
  line-height: 1.2;
  max-width: 205px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brandbar .brand {
  min-width: 0;
}

.brandbar .brand > div {
  min-width: 0;
}

.brandbar .brand-name {
  font-size: 17px;
  letter-spacing: 0.04em;
  max-width: 210px;
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--muted);
  margin-top: 3px;
}

.brandbar .quiet-link {
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid rgba(119, 131, 125, 0.3);
  white-space: nowrap;
}

.hero {
  padding: 4px 4px 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(29px, 8vw, 38px);
  line-height: 1.35;
  letter-spacing: 0.01em;
  font-weight: 700;
  color: var(--ink);
}

.hero h1 em {
  font-style: normal;
  color: var(--green-2);
  position: relative;
  white-space: nowrap;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 3px;
  height: 7px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(189, 149, 84, 0.28), rgba(189, 149, 84, 0.04));
  z-index: -1;
}

.hero p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 40em;
}

.card {
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid rgba(229, 226, 216, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -80px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(189, 149, 84, 0.1), transparent 68%);
  pointer-events: none;
}

.card-head {
  margin-bottom: 19px;
}

.card-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.04em;
}

.card-head p {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.field {
  margin-bottom: 14px;
}

.field label,
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 600;
  margin-bottom: 7px;
}

.optional {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--muted-2);
  letter-spacing: 0.08em;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffefb;
  border-radius: 13px;
  padding: 13px 14px;
  outline: none;
  font-size: 15px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.textarea {
  resize: vertical;
  min-height: 92px;
  line-height: 1.6;
}

.input::placeholder,
.textarea::placeholder {
  color: #b5bcb7;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(31, 107, 87, 0.6);
  box-shadow: 0 0 0 4px rgba(31, 107, 87, 0.09);
  background: #fff;
}

.input.invalid {
  border-color: rgba(169, 69, 55, 0.55);
  box-shadow: 0 0 0 4px rgba(169, 69, 55, 0.07);
}

.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #fffefb;
  border-radius: 13px;
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.input-wrap:focus-within {
  border-color: rgba(31, 107, 87, 0.6);
  box-shadow: 0 0 0 4px rgba(31, 107, 87, 0.09);
}

.input-wrap .prefix {
  padding: 0 2px 0 14px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 14px 12px;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.code-row {
  display: flex;
  gap: 9px;
}

.code-row .input-wrap {
  flex: 1;
  min-width: 0;
}

.btn-code {
  flex: 0 0 auto;
  min-width: 112px;
  border: 1px solid rgba(31, 107, 87, 0.24);
  background: var(--green-soft);
  color: var(--green);
  border-radius: 13px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 0 12px;
  white-space: nowrap;
  transition: background 0.18s;
}

.btn-code:hover {
  background: #dfeae3;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 13px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, #1d5b4c, #123c33);
  color: #fffdf7;
  box-shadow: 0 14px 30px rgba(22, 74, 62, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 17px 36px rgba(22, 74, 62, 0.28);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.btn-soft {
  background: var(--green-soft);
  color: var(--green);
}

.btn-link {
  width: auto;
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--muted);
  font-size: 12.5px;
}

.btn[disabled] {
  box-shadow: none;
}

.helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
  font-size: 11px;
  color: var(--muted-2);
}

.consent {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}

.consent a {
  border-bottom: 1px solid rgba(22, 74, 62, 0.25);
}

.dev-code {
  display: none;
  margin-top: 12px;
  border: 1px dashed rgba(189, 149, 84, 0.5);
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
}

.dev-code.show {
  display: block;
}

.dev-code strong {
  font-size: 17px;
  letter-spacing: 0.18em;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 18px;
}

.feature {
  border: 1px solid rgba(229, 226, 216, 0.75);
  background: rgba(255, 253, 249, 0.6);
  border-radius: 14px;
  padding: 13px 8px;
  text-align: center;
}

.feature b {
  display: block;
  font-size: 15px;
  font-family: var(--serif);
  color: var(--green);
  letter-spacing: 0.03em;
}

.feature span {
  font-size: 10.5px;
  color: var(--muted);
}

.trust-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 0 6px;
  font-size: 10.5px;
  color: var(--muted-2);
  line-height: 1.7;
}

.trust-note svg {
  flex: 0 0 auto;
  margin-top: 2px;
}

.footer {
  text-align: center;
  color: var(--muted-2);
  font-size: 10.5px;
  padding: 28px 10px 8px;
  line-height: 1.8;
}

.footer .sep {
  margin: 0 7px;
  opacity: 0.5;
}

/* Steps */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 2px 28px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 11px;
  white-space: nowrap;
}

.step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 11px;
  background: rgba(255, 253, 249, 0.7);
  transition: 0.2s;
}

.step.active {
  color: var(--green);
  font-weight: 600;
}

.step.active .step-dot {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  box-shadow: 0 6px 14px rgba(22, 74, 62, 0.2);
}

.step.done .step-dot {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(31, 107, 87, 0.3);
}

.step-line {
  flex: 1;
  height: 1px;
  background: var(--line);
  margin: 0 10px;
  min-width: 12px;
}

.page-head {
  padding: 0 4px 22px;
}

.page-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(25px, 7vw, 32px);
  line-height: 1.42;
  letter-spacing: 0.01em;
}

.page-head p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.all-optional {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 10.5px;
  font-weight: 600;
  margin-top: 12px;
  letter-spacing: 0.04em;
}

/* Profile form */
.form-card {
  padding: 24px 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 13px;
}

.form-grid .span-2 {
  grid-column: span 2;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  margin: 22px 0 14px;
}

.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-2);
}

.bmi-tip {
  font-size: 11px;
  color: var(--muted);
  margin: -6px 0 12px;
}

.bmi-tip strong {
  color: var(--green);
  font-weight: 600;
}

.form-actions {
  margin-top: 8px;
}

.form-actions .btn + .btn {
  margin-top: 9px;
}

.phone-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--green-soft);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 12px;
  color: var(--green);
  margin-bottom: 18px;
}

.phone-line strong {
  letter-spacing: 0.08em;
}

/* Questionnaire */
.test-shell {
  padding-top: 14px;
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}

.quiz-top {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 13px 20px 11px;
  background: rgba(245, 241, 231, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 226, 216, 0.55);
}

.quiz-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quiz-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.08em;
}

.quiz-brand img {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.quiz-exit {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11px;
  padding: 4px;
}

.progress-line {
  height: 4px;
  border-radius: 99px;
  background: rgba(23, 39, 35, 0.08);
  margin-top: 11px;
  overflow: hidden;
}

.progress-line span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green-2), var(--gold-2));
  transition: width 0.35s ease;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 7px;
  font-size: 10.5px;
  color: var(--muted);
}

.quiz-meta strong {
  color: var(--green);
  font-weight: 600;
}

.quiz-section-head {
  padding: 30px 4px 18px;
}

.quiz-kicker {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.quiz-section-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.quiz-section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.q-card {
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 18px 16px 16px;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(34, 48, 42, 0.035);
  scroll-margin-top: 112px;
  scroll-margin-bottom: 104px;
}

.q-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}

.q-index {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
  display: grid;
  place-items: center;
  margin-top: 2px;
  font-weight: 600;
}

.q-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.q-help {
  font-size: 11px;
  color: var(--muted-2);
  margin: 2px 0 13px 31px;
  line-height: 1.6;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-left: 31px;
}

.option-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fffefb;
  color: var(--ink-2);
  font-size: 12.5px;
  text-align: center;
  padding: 8px 9px;
  transition: 0.16s;
  user-select: none;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option:hover {
  border-color: rgba(31, 107, 87, 0.35);
}

.option.selected {
  border-color: var(--green-2);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(31, 107, 87, 0.12);
}

.option.selected::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-2);
  flex: 0 0 auto;
}

.q-card textarea,
.q-card input[type="text"] {
  width: calc(100% - 31px);
  margin-left: 31px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  outline: none;
  resize: vertical;
  min-height: 88px;
  font-size: 14px;
  background: #fffefb;
}

.q-card input[type="text"] {
  min-height: 46px;
}

.q-card textarea:focus,
.q-card input[type="text"]:focus {
  border-color: rgba(31, 107, 87, 0.55);
  box-shadow: 0 0 0 3px rgba(31, 107, 87, 0.08);
}

.safety-card {
  background: linear-gradient(180deg, #fdfaf2, #fffdf9);
  border-color: rgba(189, 149, 84, 0.28);
}

.safety-note {
  display: flex;
  gap: 9px;
  background: var(--warn-soft);
  border: 1px solid rgba(189, 149, 84, 0.25);
  color: var(--warn);
  border-radius: 13px;
  padding: 12px 13px;
  font-size: 11.5px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.save-hint {
  text-align: center;
  font-size: 10.5px;
  color: var(--muted-2);
  margin: 6px 0 14px;
  opacity: 0;
  transition: opacity 0.3s;
}

.save-hint.show {
  opacity: 1;
}

.quiz-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(245, 241, 231, 0.98) 55%, rgba(245, 241, 231, 0));
}

.quiz-nav-inner {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}

.quiz-nav .btn {
  flex: 1;
}

.quiz-nav .btn-back {
  flex: 0 0 96px;
}

/* Done */
.done-wrap {
  min-height: calc(100dvh - 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding-bottom: 30px;
}

.success-mark {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #2c806a, #164a3e);
  box-shadow: 0 20px 46px rgba(22, 74, 62, 0.25);
  position: relative;
}

.success-mark::before,
.success-mark::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(189, 149, 84, 0.35);
}

.success-mark::before {
  inset: -9px;
}

.success-mark::after {
  inset: -18px;
  opacity: 0.45;
}

.done-wrap h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(27px, 7.5vw, 34px);
  letter-spacing: 0.02em;
}

.done-wrap > p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
  margin: 14px auto 0;
  max-width: 23em;
}

.done-card {
  margin-top: 30px;
  text-align: left;
}

.done-steps {
  display: grid;
  gap: 18px;
}

.done-step {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.done-step .num {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  flex: 0 0 auto;
}

.done-step b {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.done-step span {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.7;
}

.contact-box {
  margin-top: 16px;
  padding: 15px;
  background: var(--cream-2);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.contact-box strong {
  color: var(--ink-2);
}

.done-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

/* Privacy */
.prose {
  font-size: 13px;
  line-height: 1.95;
  color: var(--ink-2);
}

.prose h2 {
  font-family: var(--serif);
  font-size: 18px;
  margin: 26px 0 8px;
}

.prose p {
  margin: 0 0 12px;
}

.prose ul {
  padding-left: 1.2em;
  margin: 0 0 14px;
}

.prose li {
  margin-bottom: 6px;
}

/* Basic condition selectors */
.condition-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 2px 0 16px;
}

.condition-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 99px;
  padding: 8px 11px;
  font-size: 11px;
  line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.condition-chip.selected {
  background: var(--green-soft);
  border-color: rgba(31, 107, 87, 0.38);
  color: var(--green);
  font-weight: 600;
}

.condition-chip[data-condition="none"].selected {
  background: #f2f4f1;
  border-color: #c8d1ca;
  color: var(--muted);
}

/* Customer account */
.account-shell {
  padding-top: 16px;
}

.account-hero {
  padding: 8px 4px 20px;
}

.account-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.35;
}

.account-hero p {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.account-badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.account-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 99px;
  padding: 3px 9px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
}

.account-badge.gold {
  background: var(--warn-soft);
  color: var(--warn);
}

.account-badge.gray {
  background: #f0f2ee;
  color: var(--muted);
}

.account-section {
  margin-top: 14px;
}

.account-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.account-card + .account-card {
  margin-top: 12px;
}

.account-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.account-card-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.02em;
}

.account-card-head p {
  margin: 3px 0 0;
  font-size: 10.5px;
  color: var(--muted);
}

.report-preview-pattern {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--green);
  line-height: 1.3;
}

.report-preview-score {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.retest-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--green-soft);
  border-radius: 13px;
  padding: 12px 13px;
  margin-top: 13px;
}

.retest-box b {
  display: block;
  color: var(--green);
  font-size: 13px;
}

.retest-box span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.retest-days {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--green);
  white-space: nowrap;
}

.comparison-summary {
  background: linear-gradient(135deg, #f3f8f4, #fbf8ef);
  border: 1px solid rgba(31, 107, 87, 0.12);
  border-radius: 13px;
  padding: 13px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-2);
}

.comparison-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.comparison-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11px;
  line-height: 1.65;
  padding: 8px 10px;
  border-radius: 9px;
  background: #f8faf7;
}

.comparison-item.better {
  background: #eef7f1;
  color: #1f6b57;
}

.comparison-item.weaker {
  background: #fbf1ee;
  color: #9a4c3f;
}

.comparison-item .arrow {
  font-weight: 700;
  flex: 0 0 auto;
}

.comparison-encourage {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-2);
  border-left: 3px solid var(--gold);
  padding-left: 10px;
}

.account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 13px;
}

.account-actions .btn {
  padding: 11px 12px;
  font-size: 12px;
}

.streak-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.streak-row .btn {
  flex: 0 0 auto;
  min-width: 76px;
  white-space: nowrap;
}

.account-card .list {
  display: grid;
}

.account-card .list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
}

.account-card .list-item:last-child {
  border-bottom: 0;
}

.account-card .list-item .grow {
  flex: 1;
  min-width: 0;
}

.account-card .list-item .title {
  font-size: 13px;
  font-weight: 600;
}

.account-card .list-item .sub {
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 2px;
}

.streak-number {
  font-family: var(--serif);
  font-size: 42px;
  color: var(--green);
  line-height: 1;
}

.streak-number small {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  margin-left: 2px;
}

.reward-item {
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 10px 11px;
  margin-top: 8px;
  background: #fffdf9;
}

.reward-item.claimed {
  opacity: 0.6;
}

.reward-item .top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.reward-item b {
  font-size: 12px;
}

.reward-item p {
  margin: 3px 0 0;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.6;
}

.reward-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  color: var(--gold);
  margin-top: 5px;
  letter-spacing: 0.04em;
}

.share-link-box {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.share-link-box input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px;
  font-size: 10.5px;
  background: #fff;
  color: var(--muted);
}

.video-browser {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 2px;
}

.category-rail {
  position: sticky;
  top: 72px;
  flex: 0 0 104px;
  width: 104px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: 16px;
  background: #fffdf8;
  border: 1px solid var(--line);
  box-shadow: 0 5px 16px rgba(34, 74, 62, 0.04);
}

.category-rail-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 9px 8px;
  text-align: left;
}

.category-rail-item b {
  font-size: 10.5px;
  line-height: 1.4;
  font-weight: 500;
}

.category-rail-item span {
  font-size: 8px;
  color: var(--muted-2);
}

.category-rail-item.active {
  background: var(--green);
  color: #fff;
}

.category-rail-item.active span {
  color: rgba(255, 255, 255, 0.6);
}

.video-pane {
  flex: 1;
  min-width: 0;
}

.video-pane .video-grid {
  grid-template-columns: 1fr;
}

.video-pane .video-card {
  padding: 6px 6px 12px;
}

.video-pane .video-card b {
  display: block;
  padding: 0 4px;
}

.video-pane .video-card > span {
  display: block;
  padding: 0 4px;
}

@media (min-width: 500px) {
  .category-rail {
    flex-basis: 116px;
    width: 116px;
  }

  .video-pane .video-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin-bottom: 12px;
}

.category-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 12px;
  white-space: nowrap;
}

.category-chip span {
  color: var(--muted-2);
  font-size: 10px;
  margin-left: 2px;
}

.category-chip.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.category-chip.active span {
  color: rgba(255, 255, 255, 0.65);
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.video-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  background: linear-gradient(150deg, #fffdf9, #f4f8f4);
  text-align: left;
  min-height: 100px;
}

.video-card .play {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 9px;
}

.video-poster-wrap {
  position: relative;
  margin: -5px -5px 9px;
  border-radius: 11px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #102f27;
}

.video-poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(8, 28, 22, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  display: grid;
  place-items: center;
  padding-left: 3px;
  font-size: 11px;
}

.video-card.has-poster {
  padding: 5px 5px 11px;
  text-align: left;
}

.video-card b {
  display: block;
  font-size: 12px;
  line-height: 1.5;
}

.video-card span {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
  margin-top: 3px;
}

.report-page {
  padding-top: 16px;
}

.report-cover {
  background: linear-gradient(145deg, #1b5749, #102f28);
  color: #f6f0df;
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
}

.report-cover .kicker {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--gold-2);
}

.report-cover h1 {
  margin: 8px 0 4px;
  font-family: var(--serif);
  font-size: 32px;
}

.report-cover p {
  margin: 0;
  font-size: 11px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
}

.report-score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.report-score-grid div {
  text-align: center;
}

.report-score-grid b {
  display: block;
  font-family: var(--serif);
  font-size: 23px;
}

.report-score-grid span {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
}

.report-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 18px;
  margin-top: 12px;
}

.report-block h2 {
  font-family: var(--serif);
  font-size: 18px;
  margin: 0 0 10px;
  padding-left: 9px;
  border-left: 3px solid var(--gold);
}

.report-block p,
.report-block li {
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-2);
}

.report-block ul {
  margin: 0;
  padding-left: 1.1em;
}

.report-block li {
  margin-bottom: 6px;
}

.meal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.meal-grid .box {
  background: #f8faf7;
  border-radius: 8px;
  padding: 8px;
  font-size: 10.5px;
  line-height: 1.7;
}

.meal-grid .box span {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
  margin-bottom: 2px;
}

.severity-block h2 {
  border-left-color: #a94537;
}

.severity-head {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border-radius: 10px;
  background: #fbf0ee;
}

.severity-head b {
  font-size: 13px;
  color: #a94537;
}

.severity-head span {
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

.severity-crisis,
.severity-high {
  border-color: rgba(169, 69, 55, 0.28);
}

.crisis-box {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 10px;
  background: #fff5f3;
  border: 1px solid rgba(169, 69, 55, 0.18);
}

.crisis-box b {
  color: #a94537;
  font-size: 11px;
}

.crisis-box ul {
  margin: 5px 0 0;
}

.treatment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 10px 0;
}

.treatment-card {
  padding: 10px;
  border-radius: 11px;
  background: #f6f9f5;
  border: 1px solid var(--line-2);
}

.treatment-card > span {
  display: inline-block;
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--gold);
  background: #fbf2dd;
  border-radius: 99px;
  padding: 3px 7px;
}

.treatment-card h3 {
  margin: 7px 0 5px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--green);
}

.treatment-card ul {
  padding-left: 1em;
  margin: 0;
}

.treatment-card li {
  font-size: 9.5px;
  line-height: 1.7;
  margin-bottom: 4px;
}

@media (max-width: 380px) {
  .treatment-grid {
    grid-template-columns: 1fr;
  }
}

.report-tongue {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.report-tongue img {
  width: 120px;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  background: #e8ede7;
}

.report-tongue p {
  margin: 7px 0 0;
}

@media (max-width: 380px) {
  .report-tongue {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .report-tongue img {
    width: 96px;
    height: 122px;
  }
}

.qa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
}

.qa-table th,
.qa-table td {
  text-align: left;
  border-bottom: 1px solid var(--line-2);
  padding: 8px 4px;
  vertical-align: top;
}

.qa-table th {
  color: var(--muted);
  font-weight: 500;
}

.qa-table td:last-child {
  color: var(--ink-2);
}

.player-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(8, 20, 16, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.player-box {
  width: 100%;
  max-width: 760px;
  background: #0d1f1a;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
}

.player-box video {
  width: 100%;
  max-height: 70vh;
  display: block;
  background: #000;
}

.player-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
}

.player-head b {
  font-size: 13px;
}

.player-head p {
  margin: 3px 0 0;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}

.player-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  flex: 0 0 auto;
}

/* Mini-program style customer account */
.app-body {
  background: #e9eee7;
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

.app-shell {
  max-width: 540px;
  min-height: 100vh;
  margin: 0 auto;
  background: #f7f5ee;
  box-shadow: 0 0 40px rgba(24, 49, 39, 0.08);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(247, 245, 238, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(34, 74, 62, 0.06);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
}

.app-brand img {
  width: 34px;
  height: 34px;
}

.app-brand b {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.app-brand span {
  display: block;
  font-size: 9px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
  margin-top: 1px;
}

.app-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-top-link {
  color: var(--green);
  font-size: 11px;
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 99px;
  background: var(--green-soft);
}

.app-top-avatar {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  padding: 7px 9px;
  border-radius: 99px;
}

.app-main {
  padding: 0 14px 22px;
}

.app-loading {
  display: grid;
  place-items: center;
  min-height: 60vh;
  color: var(--muted);
  font-size: 12px;
  gap: 10px;
}

.wechat-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0d6b4b, #128a5e);
  color: #fff;
  text-align: left;
  box-shadow: 0 8px 20px rgba(13, 107, 75, 0.22);
}

.wechat-banner-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.wechat-banner-icon svg {
  width: 19px;
  height: 19px;
}

.wechat-banner-text {
  flex: 1;
  min-width: 0;
}

.wechat-banner-text b {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.wechat-banner-text small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.66);
}

.wechat-banner-action {
  font-size: 10px;
  color: #f1d79c;
  white-space: nowrap;
}

.wechat-layer {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(7, 22, 17, 0.72);
}

.wechat-card {
  position: relative;
  width: min(420px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 20px;
  background: #fffdf8;
  padding: 22px 18px 17px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.wechat-close {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.wechat-card-kicker {
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.wechat-card h2 {
  margin: 5px 0 4px;
  font-family: var(--serif);
  font-size: 24px;
}

.wechat-card > p {
  margin: 0 auto;
  max-width: 310px;
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
}

.wechat-qr {
  width: 210px;
  height: 210px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  margin: 14px auto 10px;
  display: block;
}

.wechat-qr-empty {
  width: 210px;
  min-height: 130px;
  margin: 14px auto 10px;
  border: 1px dashed rgba(31, 107, 87, 0.3);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.7;
  background: #f7faf5;
}

.wechat-id-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #f4f8f3;
}

.wechat-id-row span {
  font-size: 9px;
  color: var(--muted-2);
  white-space: nowrap;
}

.wechat-id-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  text-align: center;
}

.wechat-id-row button {
  border: 0;
  border-radius: 7px;
  background: var(--green);
  color: #fff;
  font-size: 9px;
  padding: 6px 9px;
  white-space: nowrap;
}

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

.wechat-tip {
  margin: 10px 0 0 !important;
  font-size: 8.5px !important;
  color: var(--muted-2) !important;
}

.app-hero {
  position: relative;
  overflow: hidden;
  margin: 0 -14px 14px;
  padding: 22px 20px 20px;
  border-radius: 0 0 30px 30px;
  color: #fff;
  background:
    radial-gradient(260px 180px at 92% 0%, rgba(233, 201, 123, 0.28), transparent 65%),
    linear-gradient(145deg, #0c332b 0%, #155344 58%, #1e6a56 100%);
  box-shadow: 0 16px 34px rgba(19, 65, 52, 0.2);
}

.app-hero::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: -80px;
  bottom: -120px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--gold-2);
}

.hero-kicker::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--gold-2);
}

.app-hero h1 {
  position: relative;
  z-index: 1;
  margin: 10px 0 3px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.app-hero .hero-sub {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
}

.hero-score-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 16px;
}

.score-ring {
  --p: 0%;
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: conic-gradient(#e9c97b var(--p), rgba(255, 255, 255, 0.14) 0);
  display: grid;
  place-items: center;
}

.score-ring div {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #12483c;
  display: grid;
  place-items: center;
  align-content: center;
  line-height: 1;
}

.score-ring b {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
}

.score-ring small {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 3px;
}

.hero-score-text {
  min-width: 0;
}

.hero-score-text .pattern {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.3;
}

.hero-score-text .level {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.58);
  margin-top: 3px;
}

.hero-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 99px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.82);
  font-size: 9px;
}

.hero-chip.gold {
  background: rgba(233, 201, 123, 0.16);
  color: #f2dda6;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 13px;
}

.hero-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  border-radius: 11px;
  font-size: 12px;
  text-decoration: none;
  background: #f3d99a;
  color: #183c32;
  font-weight: 600;
}

.hero-actions a.ghost {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 400;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 4px;
}

.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 4px 11px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid rgba(34, 74, 62, 0.06);
  box-shadow: 0 4px 14px rgba(34, 74, 62, 0.05);
  color: var(--ink);
  text-decoration: none;
}

.quick-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
}

.quick-icon.gold {
  background: #fbf2dd;
  color: #a77b2d;
}

.quick-item b {
  font-size: 11px;
  font-weight: 600;
}

.quick-item span {
  font-size: 8.5px;
  color: var(--muted-2);
  margin-top: -3px;
}

.app-section {
  margin-top: 18px;
  scroll-margin-top: 74px;
}

.app-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 9px;
}

.app-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.app-section-title i {
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-2), var(--green-2));
}

.app-section-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.02em;
}

.app-section-title p {
  margin: 2px 0 0;
  font-size: 9px;
  color: var(--muted-2);
}

.app-section-link {
  color: var(--green);
  font-size: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.app-card {
  background: #fff;
  border: 1px solid rgba(34, 74, 62, 0.055);
  border-radius: 18px;
  padding: 15px;
  box-shadow: 0 5px 18px rgba(34, 74, 62, 0.045);
}

.app-card + .app-card {
  margin-top: 9px;
}

.app-card.soft {
  background: linear-gradient(145deg, #fbfaf5, #f3f7f1);
}

.app-card.dark {
  background: linear-gradient(145deg, #123f34, #0d2d26);
  color: #fff;
  border-color: transparent;
}

.app-card .list {
  display: grid;
}

.app-card .list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
}

.app-card .list-item:last-child {
  border-bottom: 0;
}

.app-card .list-item .grow {
  flex: 1;
  min-width: 0;
}

.app-card .list-item .title {
  font-size: 13px;
  font-weight: 600;
}

.app-card .list-item .sub {
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 2px;
}

.app-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.app-card-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.app-card-head p {
  margin: 3px 0 0;
  font-size: 9.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

.app-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 99px;
  padding: 4px 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 9px;
  white-space: nowrap;
}

.app-pill.gold {
  background: #fbf1da;
  color: #98702a;
}

.app-pill.gray {
  background: #f0f2ee;
  color: var(--muted);
}

.report-main {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 11px;
}

.report-main .score-big {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  background: var(--green-soft);
  color: var(--green);
  line-height: 1;
}

.report-main .score-big b {
  font-family: var(--serif);
  font-size: 24px;
}

.report-main .score-big span {
  font-size: 8px;
  color: var(--muted-2);
  margin-top: 3px;
}

.report-main .pattern {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.3;
}

.report-main .date {
  font-size: 9.5px;
  color: var(--muted-2);
  margin-top: 3px;
}

.retest-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 12px;
  background: #f5f8f2;
}

.retest-strip b {
  display: block;
  font-size: 11.5px;
  color: var(--green);
}

.retest-strip span {
  display: block;
  font-size: 9px;
  color: var(--muted-2);
  margin-top: 2px;
}

.retest-strip strong {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--green);
  font-weight: 500;
  white-space: nowrap;
}

.app-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-size: 11.5px;
  text-decoration: none;
  text-align: center;
}

.app-btn.ghost {
  background: #f5f7f3;
  color: var(--green);
}

.app-btn.gold {
  background: #f1d491;
  color: #563f12;
}

.app-btn:disabled {
  opacity: 0.5;
}

.selftest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.selftest-item {
  padding: 8px 9px;
  border-radius: 10px;
  background: #f7f9f5;
}

.selftest-item span {
  display: block;
  font-size: 8.5px;
  color: var(--muted-2);
}

.selftest-item b {
  display: block;
  font-size: 10.5px;
  line-height: 1.45;
  margin-top: 2px;
  color: var(--ink-2);
  font-weight: 500;
}

.tongue-layout {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 11px;
  margin-top: 10px;
}

.tongue-photo {
  width: 112px;
  height: 138px;
  border-radius: 14px;
  object-fit: cover;
  background: #e8ede7;
  border: 1px solid var(--line);
}

.tongue-empty {
  width: 112px;
  height: 138px;
  border-radius: 14px;
  border: 1.5px dashed rgba(31, 107, 87, 0.3);
  background: #f6f9f4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--green);
  text-align: center;
  padding: 8px;
}

.tongue-empty span {
  font-size: 9px;
  color: var(--muted-2);
  line-height: 1.5;
}

.tongue-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tongue-tag {
  font-size: 9px;
  padding: 4px 7px;
  border-radius: 7px;
  background: #eef5ee;
  color: var(--green);
}

.tongue-tag.warn {
  background: #fbf1e5;
  color: #9b6a24;
}

.tongue-desc {
  font-size: 10px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 8px 0 0;
}

.tongue-note {
  font-size: 8.5px;
  color: var(--muted-2);
  line-height: 1.55;
  margin: 7px 0 0;
}

.tongue-upload-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f4f8f3;
  border: 1px solid rgba(31, 107, 87, 0.08);
}

.tongue-upload-cta div {
  flex: 1;
  min-width: 0;
}

.tongue-upload-cta b {
  display: block;
  font-size: 10.5px;
}

.tongue-upload-cta span {
  display: block;
  font-size: 8.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

.video-stage {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  border-radius: 18px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  text-decoration: none;
  background:
    radial-gradient(240px 170px at 82% 5%, rgba(233, 201, 123, 0.32), transparent 65%),
    linear-gradient(145deg, #1b3b37, #0b2925 70%);
  box-shadow: 0 10px 24px rgba(17, 54, 44, 0.18);
}

.video-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(6, 24, 19, 0.72));
}

.video-stage > * {
  position: relative;
  z-index: 1;
}

.video-stage .stage-kicker {
  position: absolute;
  top: 16px;
  left: 17px;
  font-size: 8px;
  letter-spacing: 0.16em;
  color: #e8ce92;
}

.video-stage .stage-play {
  position: absolute;
  top: 32px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  padding-left: 3px;
}

.video-stage h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.35;
}

.video-stage p {
  margin: 5px 0 0;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.66);
}

.video-stage .watch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 10px;
  color: #f0d79b;
}

.video-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.video-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #f7f9f5;
  text-decoration: none;
  color: var(--ink);
}

.video-row .mini-play {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding-left: 2px;
}

.video-row div {
  min-width: 0;
  flex: 1;
}

.video-row b {
  display: block;
  font-size: 10.5px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-row span {
  display: block;
  font-size: 8.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

.video-cat-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 9px 1px 1px;
}

.video-cat {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 99px;
  background: #f4f7f2;
  color: var(--muted);
  font-size: 9px;
  text-decoration: none;
}

.reward-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.reward-tile {
  padding: 12px;
  border-radius: 15px;
  background: linear-gradient(145deg, #fffdf8, #fbf5e8);
  border: 1px solid rgba(172, 135, 69, 0.12);
  min-height: 108px;
  display: flex;
  flex-direction: column;
}

.reward-tile.green {
  background: linear-gradient(145deg, #f5faf6, #edf5ee);
  border-color: rgba(31, 107, 87, 0.1);
}

.reward-tile .r-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #f5e8c8;
  color: #98702a;
  margin-bottom: 7px;
}

.reward-tile.green .r-icon {
  background: #e1f0e5;
  color: var(--green);
}

.reward-tile b {
  font-size: 11px;
}

.reward-tile p {
  margin: 3px 0 0;
  font-size: 8.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

.reward-tile .r-action {
  margin-top: auto;
  padding-top: 8px;
}

.reward-tile .r-action button,
.reward-tile .r-action a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 9.5px;
  text-decoration: none;
}

.reward-tile .r-action button:disabled {
  opacity: 0.5;
}

.reward-tile.green .r-action button {
  background: #fff;
  color: var(--green);
  border: 1px solid rgba(31, 107, 87, 0.14);
}

.reward-list {
  margin-top: 8px;
}

.reward-item {
  margin-top: 7px;
}

.app-tabbar {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 0;
  width: min(540px, 100%);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(34, 74, 62, 0.08);
  box-shadow: 0 -8px 24px rgba(34, 74, 62, 0.06);
}

.app-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #9aa59d;
  font-size: 8.5px;
  text-decoration: none;
  padding: 3px 0;
}

.app-tab-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.app-tab-icon svg {
  width: 21px;
  height: 21px;
}

.app-tab.active {
  color: var(--green);
}

.app-tab.active .app-tab-icon {
  background: var(--green-soft);
  border-radius: 9px;
}

.brand-block {
  overflow: hidden;
  margin-bottom: 9px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(34, 74, 62, 0.06);
  box-shadow: 0 5px 18px rgba(34, 74, 62, 0.045);
}

.brand-photo-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 7px 7px 0;
}

.brand-photo-scroll img {
  flex: 0 0 86%;
  width: 86%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: #e8ede7;
}

.brand-photo-scroll img:only-child {
  flex-basis: 100%;
  width: 100%;
}

.brand-copy {
  padding: 13px 15px 15px;
}

.brand-kicker {
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.brand-copy h3 {
  margin: 5px 0 6px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.35;
}

.brand-copy p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.brand-source-note {
  margin: 3px 2px 0;
  font-size: 8.5px;
  line-height: 1.6;
  color: var(--muted-2);
}

.app-account-footer {
  padding: 20px 2px 10px;
  text-align: center;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.7;
}

.app-account-footer a {
  color: var(--green);
  text-decoration: none;
}

.tongue-modal-preview {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 14px;
  background: #edf1eb;
}

.app-banner {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #e9f4ea;
  border: 1px solid rgba(31, 107, 87, 0.14);
  color: var(--green);
  font-size: 10.5px;
}

.quick-icon-svg {
  width: 14px;
  height: 14px;
  display: inline-flex;
  flex: 0 0 auto;
}

.quick-icon-svg svg,
.quick-icon svg,
.app-btn svg,
.app-tab svg {
  width: 100%;
  height: 100%;
  display: block;
}

.quick-icon {
  overflow: hidden;
}

.quick-icon > svg {
  width: 19px;
  height: 19px;
}

.r-icon svg {
  width: 16px;
  height: 16px;
}

.stage-play .quick-icon-svg {
  width: 18px;
  height: 18px;
}

.app-btn .quick-icon-svg {
  width: 13px;
  height: 13px;
}

.tongue-preview-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(9, 24, 19, 0.7);
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.tongue-preview-card {
  width: min(480px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 20px 20px 16px 16px;
  background: #fffdf8;
  padding: 15px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.tongue-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.tongue-preview-head b {
  font-family: var(--serif);
  font-size: 18px;
}

.tongue-preview-head p {
  margin: 3px 0 0;
  font-size: 9.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

.tongue-preview-head button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.tongue-preview-tips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 9px;
}

.tongue-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  margin-top: 12px;
}

.tongue-upload-progress {
  margin-top: 10px;
}

.tongue-upload-progress > div {
  height: 6px;
  border-radius: 99px;
  background: #e9efe8;
  overflow: hidden;
}

.tongue-upload-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green-2), var(--gold-2));
  transition: width 0.2s;
}

.tongue-upload-progress p {
  font-size: 9px;
  color: var(--muted-2);
  margin: 5px 0 0;
}

@media (max-width: 360px) {
  .app-hero h1 {
    font-size: 24px;
  }
  .quick-item b {
    font-size: 10px;
  }
  .reward-grid {
    grid-template-columns: 1fr;
  }
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(94px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  background: rgba(23, 39, 35, 0.94);
  color: #fff;
  border-radius: 12px;
  padding: 11px 17px;
  font-size: 12.5px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  max-width: min(88vw, 380px);
  text-align: center;
  line-height: 1.5;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  background: rgba(130, 45, 34, 0.96);
}

.loading {
  min-height: 50vh;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  gap: 12px;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 2px solid rgba(31, 107, 87, 0.18);
  border-top-color: var(--green-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skip-link {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}

.notice-inline {
  background: var(--green-soft);
  border-radius: 13px;
  padding: 13px 14px;
  font-size: 11.5px;
  color: var(--green);
  line-height: 1.75;
  margin-bottom: 18px;
}

.notice-inline.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

@media (max-width: 400px) {
  .shell {
    padding-left: 16px;
    padding-right: 16px;
  }
  .card {
    padding: 22px 17px;
    border-radius: 18px;
  }
  .form-card {
    padding: 20px 16px;
  }
  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .option-grid.three {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span-2 {
    grid-column: span 1;
  }
  .btn-code {
    min-width: 98px;
    font-size: 11.5px;
  }
  .quiz-top {
    padding-left: 16px;
    padding-right: 16px;
  }
  .quiz-nav {
    padding-left: 16px;
    padding-right: 16px;
  }
  .option-grid,
  .q-help,
  .q-card textarea,
  .q-card input[type="text"] {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 340px) {
  .option-grid,
  .option-grid.three {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
