:root {
  --green: #168739;
  --green-light: #45a05b;
  --green-soft: #78b588;
  --text: #20242a;
  --muted: #8d939c;
  --line: #edf0f5;
  --bg: #f6f7fb;
  --red: #ff1016;
  --pink: #f73583;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  border: 0;
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

.page {
  display: none;
  min-height: 100vh;
  padding-bottom: 92px;
}

.page.is-active {
  display: block;
}

.title-bar {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  height: 58px;
  padding: 0 12px;
  background: linear-gradient(180deg, #45a05a, #3f9d55);
  color: #fff;
  box-shadow: 0 4px 16px rgb(25 72 41 / 12%);
}

.title-on-hero {
  background: transparent;
  box-shadow: none;
}

.pay-title-bar {
  background: linear-gradient(90deg, #f73683, #ff2025);
}

.title-bar h1 {
  margin: 0;
  text-align: center;
  font-size: 19px;
  font-weight: 800;
}

.back-btn {
  position: relative;
  width: 44px;
  height: 44px;
  background: transparent;
}

.back-btn::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 13px;
  width: 16px;
  height: 16px;
  border-left: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
}

.hero,
.compact-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 27%, rgb(255 255 255 / 15%) 0 76px, transparent 77px),
    radial-gradient(circle at 101% 44%, rgb(255 255 255 / 10%) 0 130px, transparent 131px),
    linear-gradient(180deg, #45a05a, #3f9d55);
}

.hero {
  min-height: 440px;
}

.compact-hero {
  width: min(calc(100% - 20px), 960px);
  min-height: 220px;
  margin: 10px auto 0;
  border-radius: 17px;
}

.emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 34px auto 0;
  border: 2px solid rgb(255 255 255 / 82%);
  border-radius: 50%;
  color: #fff;
}

.compact-hero .emblem {
  margin-top: 20px;
}

.emblem::before {
  content: "MEEP";
  position: absolute;
  bottom: 6px;
  width: 100%;
  text-align: center;
  color: rgb(255 255 255 / 82%);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
}

.emblem::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px dashed rgb(255 255 255 / 72%);
  border-radius: 50%;
}

.emblem span {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  margin-top: -10px;
  border-radius: 50%;
  background: #fff;
}

.emblem span::after {
  content: "";
  position: absolute;
  left: -12px;
  top: 19px;
  width: 40px;
  height: 17px;
  border-radius: 4px 4px 18px 18px;
  background: #fff;
}

.hero h2,
.compact-hero h2 {
  position: relative;
  z-index: 1;
  margin: 28px 0 0;
  color: #fff;
  text-align: center;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.12;
}

.compact-hero h2 {
  font-size: 32px;
}

.hero p,
.compact-hero p {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  color: rgb(255 255 255 / 92%);
  text-align: center;
  font-size: 15px;
}

.panel,
.home-card,
.content-card,
.about-card {
  width: min(calc(100% - 28px), 960px);
  margin-left: auto;
  margin-right: auto;
}

.home-card {
  position: relative;
  z-index: 2;
  margin-top: -142px;
  padding: 20px 15px 19px;
  border-radius: 8px 8px 0 0;
  background: #fff;
  box-shadow: 0 -1px 20px rgb(28 63 44 / 16%);
}

.content-card,
.about-card,
.form-card,
.input-card,
.service-card,
.payment-card,
.profile-card,
.record-list,
.chat-panel,
.agreement-text {
  background: #fff;
  box-shadow: 0 4px 18px rgb(28 36 52 / 5%);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.section-title::before {
  content: "";
  width: 7px;
  height: 25px;
  background: var(--green);
}

.primary-btn {
  display: block;
  width: 100%;
  height: 58px;
  border-radius: 6px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
}

.green-btn {
  background: var(--green);
  box-shadow: 0 14px 20px rgb(21 94 43 / 24%);
}

.home-card .primary-btn {
  margin-top: 28px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 31px;
}

.stats div {
  text-align: center;
}

.stats div + div {
  border-left: 1px solid #9b9b9b;
}

.stats strong {
  display: block;
  color: var(--green);
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
}

.stats span {
  display: block;
  margin-top: 6px;
  color: #7b7b7b;
  font-size: 11px;
  font-weight: 700;
}

.content-card {
  padding: 22px 13px 24px;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 17px;
  margin-top: 22px;
}

.reason-grid article {
  overflow: hidden;
  min-height: 132px;
  border-radius: 6px;
  background: var(--green-soft);
  color: #fff;
}

.reason-grid h4 {
  margin: 0;
  padding: 9px 10px;
  background: var(--green-light);
  text-align: center;
  font-size: 18px;
  font-weight: 500;
}

.reason-grid p {
  margin: 19px 14px 0;
  font-size: 16px;
  line-height: 1.45;
}

.reason-grid i {
  display: block;
  width: 106px;
  height: 2px;
  margin: 15px auto 0;
  background: #fff;
}

.about-card {
  padding: 24px;
  text-align: center;
}

.about-card h3 {
  margin: 0;
  font-size: 19px;
}

.about-card strong {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}

.about-card p {
  margin: 12px 0 0;
  color: #3f454c;
  font-size: 13px;
  line-height: 1.7;
  text-align: left;
}

.apply-form {
  margin-top: 10px;
  background: transparent;
  box-shadow: none;
}

.form-card {
  padding: 16px 14px 18px;
  border-radius: 8px;
}

.form-card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.form-card h2 span {
  margin-right: 2px;
  color: #f04142;
}

.subject-tabs {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.98fr;
  gap: 13px;
  margin-top: 23px;
  padding: 0 13px;
}

.subject-tabs input,
.payment-card input {
  position: absolute;
  opacity: 0;
}

.subject-tabs span {
  display: grid;
  place-items: center;
  height: 46px;
  border-radius: 9px;
  background: #f0f1f6;
  color: #696d73;
  font-size: 18px;
}

.subject-tabs input:checked + span {
  color: #fff;
  background: #0a9b4d;
  box-shadow: 0 8px 16px rgb(10 155 77 / 18%);
}

.input-card {
  margin-top: 20px;
}

.input-card label {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  height: 67px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
}

.input-card label:last-child {
  border-bottom: 0;
}

.input-card span {
  font-size: 19px;
  font-weight: 800;
}

.input-card input {
  min-width: 0;
  height: 100%;
  outline: 0;
  text-align: right;
  background: transparent;
  font-size: 18px;
}

.apply-form .primary-btn {
  margin-top: 33px;
}

.service-block {
  margin-top: 23px;
  background: transparent;
  box-shadow: none;
}

.service-block h2 {
  margin: 0 0 16px;
  font-size: 21px;
}

.service-card {
  padding: 18px 11px 12px;
  background: #f0f1f4;
}

.service-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
}

.service-card span {
  font-size: 18px;
}

.service-card strong {
  color: #df4658;
  font-size: 18px;
}

.agreement-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  margin-top: 12px;
  padding: 15px 13px 7px;
  box-shadow: none;
}

.agreement-row input {
  appearance: none;
  width: 19px;
  height: 19px;
  border: 1px solid #bfc3ca;
  border-radius: 50%;
  background: #fff;
}

.agreement-row input:checked {
  border-color: #19a85b;
  background:
    radial-gradient(circle at center, #19a85b 0 5px, transparent 6px),
    #fff;
}

.agreement-row button {
  padding: 0;
  background: transparent;
  color: #16828c;
}

.page-action {
  width: min(calc(100% - 28px), 960px);
  margin: 14px auto 0;
}

.red-btn {
  border-radius: 28px;
  background: var(--red);
}

.agreement-text {
  margin-top: 18px;
  padding: 18px;
  color: #121820;
  font-size: 19px;
  line-height: 1.62;
  text-align: justify;
}

.amount-block {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  min-height: 238px;
  padding-top: 118px;
}

.amount-block span {
  color: #b2b2b8;
  font-size: 17px;
  font-weight: 500;
}

.amount-block strong {
  color: #e13a48;
  font-size: 34px;
  font-weight: 800;
}

.payment-card label {
  display: grid;
  grid-template-columns: 41px 1fr 32px;
  align-items: center;
  gap: 10px;
  min-height: 73px;
  padding: 0 17px;
}

.payment-card label + label {
  border-top: 1px solid #edf0f5;
}

.payment-card b {
  font-size: 18px;
  font-weight: 500;
}

.pay-icon {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.wechat-icon {
  background: #48b24b;
}

.wechat-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  width: 16px;
  height: 11px;
  border-radius: 8px;
  background: #fff;
}

.wechat-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 12px;
  width: 13px;
  height: 5px;
  border-left: 3px solid #48b24b;
  border-bottom: 3px solid #48b24b;
  transform: rotate(-35deg);
}

.alipay-icon {
  background: #1d7ef2;
}

.alipay-icon::before {
  content: "支";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.payment-card i {
  justify-self: end;
  position: relative;
  width: 19px;
  height: 19px;
  border: 1px solid #d7dbe2;
  border-radius: 50%;
}

.payment-card input:checked ~ i {
  border-color: var(--pink);
  background: var(--pink);
}

.payment-card input:checked ~ i::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 6px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.pay-btn {
  position: fixed;
  left: 50%;
  bottom: 88px;
  width: min(calc(100% - 28px), 960px);
  height: 58px;
  border-radius: 29px;
  background: linear-gradient(90deg, #f73683, #ff2025);
  transform: translateX(-50%);
}

.site-tab-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 960px);
  height: 70px;
  background: #fff;
  box-shadow: 0 -4px 18px rgb(24 35 48 / 8%);
  transform: translateX(-50%);
}

.site-tab-bar button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  background: #fff;
  color: #1f2328;
  font-size: 14px;
}

.site-tab-bar .is-current {
  color: var(--green);
  font-weight: 800;
}

.home-icon,
.user-icon,
.chat-icon {
  position: relative;
  width: 22px;
  height: 22px;
}

.home-icon::before {
  content: "";
  position: absolute;
  inset: 5px 4px 2px;
  border: 1.8px solid currentColor;
  border-top: 0;
  border-radius: 2px;
}

.home-icon::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 13px;
  height: 13px;
  border-left: 1.8px solid currentColor;
  border-top: 1.8px solid currentColor;
  transform: rotate(45deg);
}

.user-icon::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 2px;
  width: 7px;
  height: 7px;
  border: 1.7px solid currentColor;
  border-radius: 50%;
}

.user-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 2px;
  width: 15px;
  height: 9px;
  border: 1.7px solid currentColor;
  border-radius: 12px 12px 3px 3px;
}

.chat-icon::before {
  content: "";
  position: absolute;
  inset: 3px 2px 6px;
  border: 1.8px solid currentColor;
  border-radius: 8px;
}

.chat-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 4px;
  width: 7px;
  height: 7px;
  border-left: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(-35deg);
}

.profile-card {
  margin-top: 16px;
  padding: 20px;
  border-radius: 8px;
}

.profile-card h2 {
  margin: 0;
  font-size: 22px;
}

.profile-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.record-list {
  margin-top: 14px;
  padding: 8px;
  border-radius: 8px;
}

.record-item {
  position: relative;
  padding: 14px 78px 14px 12px;
  border-bottom: 1px solid var(--line);
}

.record-item:last-child {
  border-bottom: 0;
}

.record-item strong {
  display: block;
  font-size: 17px;
}

.record-item span {
  display: block;
  margin-top: 4px;
  color: #6f7782;
  font-size: 13px;
}

.record-item b {
  position: absolute;
  top: 16px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
}

.record-item .paid {
  color: #11853b;
  background: #e7f7ed;
}

.record-item .unpaid {
  color: #c33d46;
  background: #fff0f1;
}

.chat-panel {
  display: grid;
  grid-template-rows: minmax(420px, 1fr) auto;
  min-height: calc(100vh - 160px);
  margin-top: 14px;
  border-radius: 8px;
  overflow: hidden;
}

.chat-list {
  min-height: 420px;
  max-height: calc(100vh - 225px);
  overflow-y: auto;
  padding: 16px;
  background: #f8fafc;
}

.message {
  width: fit-content;
  max-width: min(75%, 560px);
  margin-bottom: 12px;
}

.message p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.5;
}

.message span {
  display: block;
  margin-top: 4px;
  color: #9aa1aa;
  font-size: 12px;
}

.message-user {
  margin-left: auto;
}

.message-user p {
  background: #168739;
  color: #fff;
}

.message-user span {
  text-align: right;
}

.message-admin p {
  background: #fff;
  color: #222;
  box-shadow: 0 2px 8px rgb(0 0 0 / 5%);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-form input {
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #dde2e8;
  border-radius: 6px;
  outline: 0;
}

.chat-form button {
  border-radius: 6px;
  background: #168739;
  color: #fff;
  font-weight: 800;
}

.empty {
  padding: 24px;
  color: #8a929d;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 94px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgb(0 0 0 / 74%);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

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

@media (min-width: 768px) {
  .hero {
    min-height: 500px;
  }

  .hero h2 {
    font-size: 48px;
  }

  .compact-hero {
    min-height: 260px;
  }

  .compact-hero h2 {
    font-size: 44px;
  }

  .reason-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 430px) {
  .hero h2,
  .compact-hero h2 {
    font-size: 30px;
  }

  .subject-tabs {
    grid-template-columns: 1fr 0.7fr 0.8fr;
    gap: 10px;
    padding: 0;
  }

  .subject-tabs span {
    font-size: 16px;
  }

  .reason-grid p {
    font-size: 14px;
  }

  .input-card label {
    grid-template-columns: 100px 1fr;
  }
}
