:root {
  --page-width: 402px;
  --blue: #1298df;
  --fee-background: #f2f1f8;
}

* {
  box-sizing: border-box;
}

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

body {
  color: #3e3e42;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.page {
  width: min(100%, var(--page-width));
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
}

/* 查询页：微信的状态栏与网页标题栏都不属于本实现。 */
.query-view,
.query-page {
  background: #fff;
}

.school-brand {
  display: grid;
  height: 55px;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  background: #fff;
}

.school-brand h1 {
  margin: 0;
  color: #404040;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.7px;
  line-height: 1.1;
  white-space: nowrap;
}

.school-seal,
.campus-photo {
  position: relative;
  overflow: hidden;
}

.school-seal {
  width: 55px;
  height: 50px;
}

.school-seal img,
.campus-photo img {
  position: absolute;
  display: block;
  width: 402px;
  max-width: none;
  height: auto;
  user-select: none;
}

.school-seal img {
  top: -100px;
  left: 0;
}

.campus-photo {
  height: 151px;
  border-bottom: 1px solid #5f5f5f;
  background: #cbd3d7;
}

.campus-photo img {
  top: -155px;
  left: 0;
}

.query-form {
  padding: 8px 15px 40px;
}

.query-field {
  display: flex;
  height: 52px;
  align-items: center;
  border-bottom: 1px solid #dedede;
  color: #050505;
}

.query-field > span {
  flex: 0 0 69px;
  font-size: 15px;
}

.query-field input {
  min-width: 0;
  flex: 1;
  padding: 0 1px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #222;
  font-size: 16px;
  text-align: right;
  transform: translateY(3px) scale(0.875);
  transform-origin: right center;
}

.query-field input::placeholder {
  color: #adadad;
  opacity: 1;
}

.primary-button {
  width: 100%;
  height: 47px;
  border: 1px solid #087eca;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 1px;
}

.primary-button:active {
  background: #0788d2;
}

.query-form .primary-button {
  margin-top: 90px;
}

.query-dialog[hidden] {
  display: none;
}

.query-dialog {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.57);
}

.query-dialog__panel {
  width: min(100%, 300px);
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
  text-align: center;
  transform: translateY(20px);
}

.query-dialog__content {
  min-height: 100px;
  padding: 16px 20px 15px;
}

.query-dialog h2 {
  margin: 0;
  color: #111;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
}

.query-dialog p {
  margin: 18px 0 0;
  color: #999;
  font-size: 15px;
  line-height: 1.5;
}

.query-dialog__confirm {
  display: block;
  width: 100%;
  height: 57px;
  border: 0;
  border-top: 1px solid #e7e7e7;
  background: #fff;
  color: #11bf08;
  font-size: 20px;
  font-weight: 400;
}

.query-dialog__confirm:active {
  background: #f7f7f7;
}

/* 费用页：微信“我的费用”导航栏与状态栏已移除。 */
.fees-view,
.fees-page {
  background: var(--fee-background);
}

.fees-top-space {
  height: 38px;
}

.student-summary {
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  background: #fff;
  color: #45454a;
  font-size: 19px;
  letter-spacing: -0.3px;
}

.student-summary span:last-child {
  transform: translateX(-44px);
}

.section-space {
  height: 41px;
  background: var(--fee-background);
}

.fee-year {
  position: relative;
  height: 44px;
  overflow: hidden;
  border-bottom: 2px solid #0e9bdf;
  background: #fff;
}

.fee-year::before {
  content: "2026";
  position: absolute;
  top: 18px;
  left: calc(50% - 25px);
  color: #0d9add;
  font-family: Arial, sans-serif;
  font-size: 18px;
  line-height: 1;
}

.fee-year::after {
  content: "缴";
  position: absolute;
  top: 4px;
  left: calc(50% + 20px);
  display: grid;
  width: 28px;
  height: 20px;
  place-items: center;
  border-radius: 13px;
  background: #f2080b;
  color: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  line-height: 1;
  transform: none;
}

.fee-year img {
  display: none;
}

.fee-list {
  background: #fff;
}

.fee-row {
  display: grid;
  height: 69px;
  grid-template-columns: 66px minmax(70px, 1fr) minmax(104px, auto) 38px;
  align-items: center;
  padding: 0 17px;
  border-bottom: 1px solid #efefef;
}

.fee-row:last-child {
  border-bottom: 0;
}

.fee-name,
.fee-amount {
  font-size: 19px;
  letter-spacing: 0.1px;
}

.fee-amount {
  justify-self: end;
  color: #535359;
  font-family: Arial, "PingFang SC", sans-serif;
  transform: translateX(-12px);
}

/* 复用原图中的标准勾选与编辑图标，避免将图标作为代码绘制。 */
.fee-check,
.fee-edit {
  display: block;
  width: 28px;
  height: 28px;
  background-image: url("assets/fees-reference.jpg");
  background-repeat: no-repeat;
  background-size: 402px auto;
}

.fee-check-blue {
  background-position: -48px -286px;
}

.fee-check-gray {
  background-position: -48px -349px;
}

.fee-edit {
  align-self: center;
  justify-self: end;
  background-position: -367px -285px;
  transform: translateY(2px);
}

.amount-space {
  height: 42px;
}

.total-row {
  display: flex;
  height: 52px;
  align-items: center;
  gap: 54px;
  padding: 0 34px;
  border-bottom: 1px solid #ededed;
  background: #fff;
  color: #505056;
  font-size: 19px;
}

.total-row span:last-child {
  font-family: Arial, "PingFang SC", sans-serif;
}

.payment-area {
  min-height: 360px;
  padding: 40px 16px;
  background: var(--fee-background);
}

.payment-button {
  position: relative;
}

.payment-button__loading {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: payment-loading 0.75s linear infinite;
}

.payment-button.is-loading {
  display: inline-grid;
  place-items: center;
  cursor: wait;
  opacity: 0.88;
}

.payment-button.is-loading .payment-button__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.payment-button.is-loading .payment-button__loading {
  display: block;
}

.payment-loading-toast[hidden] {
  display: none;
}

.payment-loading-toast {
  position: fixed;
  z-index: 10;
  top: 50%;
  left: 50%;
  display: flex;
  width: 94px;
  height: 94px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 7px;
  background: rgba(72, 72, 72, 0.78);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.payment-loading-toast__spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: payment-loading 0.75s linear infinite;
}

@keyframes payment-loading {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 402px) {
  .school-seal img,
  .campus-photo img {
    width: 100vw;
  }

  .school-seal img {
    top: -24.88vw;
  }

  .campus-photo {
    height: 37.56vw;
  }

  .campus-photo img {
    top: -38.56vw;
  }

  .school-brand h1 {
    font-size: clamp(15px, 4.48vw, 18px);
  }

  .query-field input {
    font-size: 16px;
  }
}
