:root {
  --ink: #39220f;
  --muted: #86643e;
  --paper: rgba(255, 250, 225, .94);
  --paper-strong: #fff9e7;
  --gold: #d9af38;
  --gold-soft: #edd99b;
  --gold-line: rgba(210, 166, 52, .42);
  --orange: #d65d1e;
  --orange-deep: #973916;
  --jade: #39af8f;
  --sky: #69c7df;
  --shadow: 0 28px 80px rgba(137, 76, 24, .2);
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  --display-font: "FZShuTi", "STXingkai", "KaiTi", "STKaiti", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --mono: Consolas, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 226, 118, .34), transparent 34%),
    linear-gradient(90deg, #fff6d8 0%, #fffdf0 48%, #f6e5d8 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.25), transparent 35%),
    radial-gradient(circle at 18% 18%, rgba(255, 239, 166, .52), transparent 24%),
    radial-gradient(circle at 86% 16%, rgba(78, 190, 214, .12), transparent 24%);
}

button, input { font: inherit; }
button { border: 0; }
.hidden { display: none !important; }

.scene {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px clamp(18px, 4vw, 56px) 28px;
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 14px;
  border: 1px solid rgba(217, 175, 56, .24);
  border-radius: 18px;
  background: rgba(255, 250, 229, .62);
  box-shadow: 0 10px 28px rgba(139, 78, 26, .08);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #7a3a17;
}

.seal {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 226, 149, .9);
  border-radius: 12px;
  background: #fff4cf url("./app-icon.jpg") center / cover no-repeat;
  color: transparent;
  text-indent: -999px;
  box-shadow: 0 8px 18px rgba(164, 62, 24, .18);
}

.brand h1 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(22px, 2.1vw, 32px);
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255,255,255,.85), 0 2px 10px rgba(255, 238, 169, .65);
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.shell {
  position: relative;
  flex: 1;
  width: min(1180px, 100%);
  min-height: min(760px, calc(100vh - 112px));
  margin: 18px auto 0;
  padding: clamp(34px, 5vw, 58px) clamp(30px, 5vw, 58px);
  overflow: hidden;
  border: 1px solid rgba(218, 177, 72, .5);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.52), rgba(255,255,255,0) 30%),
    linear-gradient(90deg, rgba(255, 250, 226, .96) 0%, rgba(255, 250, 226, .9) 40%, rgba(255, 247, 219, .55) 72%, rgba(255, 247, 219, .9) 100%);
  box-shadow: var(--shadow);
}

.shell::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(216, 175, 63, .26);
  border-radius: 23px;
  pointer-events: none;
  z-index: 2;
}

.shell::after {
  display: none;
}

.hero {
  position: absolute;
  inset: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 250, 226, .98) 0%, rgba(255, 250, 226, .78) 35%, rgba(255, 250, 226, .2) 60%, rgba(255, 250, 226, .56) 100%),
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255, 248, 223, .12) 34%, rgba(255, 248, 223, .92) 70%, #fff8df 100%),
    url("./topbg.png") center top / cover no-repeat;
  box-shadow: none;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 13%, rgba(255, 231, 114, .18), transparent 24%),
    linear-gradient(180deg, rgba(255, 248, 223, 0) 0%, rgba(255, 248, 223, .88) 78%, #fff8df 100%);
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  right: clamp(34px, 5vw, 64px);
  bottom: clamp(42px, 7vw, 76px);
  width: min(520px, 46%);
  color: #7b431d;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(215, 175, 59, .48);
  border-radius: 999px;
  background: rgba(255, 246, 212, .82);
  color: #ad5b1b;
  font-size: 13px;
  margin-bottom: 12px;
}

.hero h2 {
  margin: 0;
  font-family: var(--display-font);
  color: #a55720;
  font-size: clamp(32px, 3.5vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
}

.hero p {
  max-width: 390px;
  margin: 14px 0 0;
  color: #8a6640;
  font-size: 15px;
  line-height: 1.8;
}

.card {
  position: relative;
  z-index: 3;
  width: min(430px, 43vw);
  margin-top: clamp(22px, 5vh, 58px);
  border: 1px solid rgba(213, 169, 58, .62);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% -9%, rgba(255, 229, 126, .34), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,255,255,0) 24%),
    var(--paper);
  box-shadow:
    0 22px 60px rgba(124, 70, 23, .18),
    inset 0 1px 0 rgba(255,255,255,.72);
  padding: 22px;
  backdrop-filter: blur(8px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(215, 175, 59, .27);
  border-radius: 17px;
  pointer-events: none;
}

.card::after {
  display: none;
}

.tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(215, 175, 59, .36);
  border-radius: 16px;
  background: rgba(255, 241, 196, .56);
  margin-bottom: 18px;
}

.tabs button {
  height: 38px;
  border-radius: 12px;
  background: transparent;
  color: #96703f;
  font-weight: 900;
  cursor: pointer;
}

.tabs button.active {
  outline: 2px solid #1d1b1a;
  outline-offset: -2px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.56), transparent 44%),
    linear-gradient(180deg, #fff2a5, #edbd38 58%, #cf771d);
  color: #3f230d;
  box-shadow:
    inset 0 1px rgba(255,255,255,.75),
    0 5px 14px rgba(207, 119, 29, .28);
}

.view {
  position: relative;
  z-index: 1;
  display: none;
}

.view.active { display: block; }
.view-head { margin-bottom: 16px; }
.view-head.center { text-align: center; }

.view-head h3 {
  margin: 0;
  font-family: var(--display-font);
  color: #a34b1b;
  font-size: 28px;
  letter-spacing: 0;
}

.view-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  margin-bottom: 7px;
  color: #784c25;
  font-size: 13px;
  font-weight: 900;
}

.field input {
  width: 100%;
  height: 46px;
  border: 1px solid #e8c783;
  border-radius: 14px;
  background: rgba(255,255,255,.76);
  color: var(--ink);
  padding: 0 13px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}

.field input:focus {
  border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 199, 82, .22);
}

.field input[readonly] {
  background: rgba(232, 221, 193, .72);
  color: #8a6a47;
}

.primary, .secondary, .ghost {
  min-height: 44px;
  border-radius: 14px;
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease, opacity .12s ease;
}

.primary {
  width: 100%;
  border: 1px solid #a84d16;
  background:
    linear-gradient(180deg, rgba(255,255,255,.48), transparent 42%),
    linear-gradient(180deg, #ffdc62, #ee9f28 56%, #bd501b);
  color: #3c210b;
  box-shadow:
    inset 0 1px rgba(255,255,255,.72),
    inset 0 -2px rgba(117, 44, 12, .18),
    0 9px 19px rgba(191, 80, 27, .24);
}

.secondary {
  border: 1px solid rgba(190, 111, 32, .72);
  background:
    linear-gradient(180deg, rgba(255,255,255,.58), transparent 44%),
    linear-gradient(180deg, #fff0aa, #e7b848 58%, #c97924);
  color: #4a270c;
  box-shadow: inset 0 1px rgba(255,255,255,.75);
}

.ghost {
  border: 1px solid rgba(215, 175, 59, .45);
  background: rgba(255, 250, 232, .7);
  color: #8c4f1c;
}

.topbar .ghost { background: rgba(255, 245, 209, .72); }
button:hover { filter: brightness(1.04); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; }

.quick-links {
  display: none;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.quick-links button {
  background: transparent;
  color: #a85a1f;
  cursor: pointer;
  font-weight: 900;
  text-decoration: underline;
}

.sms-row {
  display: grid;
  grid-template-columns: 1fr 116px;
  gap: 10px;
  align-items: end;
}

.sms-row .field { margin-bottom: 0; }

.sms-row + .primary {
  margin-top: 16px;
}

.hint {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.code-panel {
  border: 1px dashed rgba(207, 119, 29, .7);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.56), transparent 52%),
    rgba(255, 247, 218, .84);
  padding: 24px 18px 18px;
  text-align: center;
}

#authCode {
  width: 100%;
  margin: 0 auto 16px;
  background: transparent;
  color: #d75f1f;
  font-family: var(--mono);
  font-size: clamp(42px, 9vw, 58px);
  font-weight: 900;
  letter-spacing: .12em;
  cursor: pointer;
}

.timebar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #ead7ae;
}

.timebar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), var(--sky), var(--gold));
  transition: width .25s linear;
}

.code-panel p {
  margin: 10px 0 0;
  color: var(--muted);
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.captcha-modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(42, 28, 18, .45);
}

.captcha-dialog {
  width: auto;
  max-width: calc(100vw - 28px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  text-align: center;
}

.captcha-dialog h3 {
  display: none;
}

.captcha-dialog p {
  display: none;
}

#cap_iframe {
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

#captchaCloseBtn {
  display: none;
}

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  top: 42%;
  max-width: min(460px, calc(100vw - 28px));
  transform: translate(-50%, calc(-50% - 10px));
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 225, 151, .75);
  border-radius: 999px;
  background: rgba(116, 56, 18, .94);
  color: #fff0a8;
  padding: 11px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: opacity .18s ease, transform .18s ease;
}

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

@media (min-width: 861px) and (max-width: 1180px) {
  .scene {
    padding: 22px clamp(18px, 5vw, 42px) 28px;
  }

  .topbar {
    margin: 0 auto 12px;
  }

  .shell {
    flex: none;
    width: min(820px, 100%);
    min-height: auto;
    margin-top: 0;
    padding: clamp(250px, 30vh, 360px) clamp(24px, 5vw, 42px) 38px;
    background:
      linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255, 248, 223, .28) 32%, rgba(255, 248, 223, .95) 62%, #fff8df 100%),
      url("./topbg.png") center top / cover no-repeat;
  }

  .hero {
    display: none;
  }

  .card {
    width: min(520px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 860px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background: #fbf4dc url("./topbg.png") center top / cover scroll no-repeat;
  }

  body::before {
    background: linear-gradient(180deg, rgba(255, 252, 235, .03), rgba(255, 250, 235, .18) 32%, rgba(255, 250, 235, .78) 66%, #fbf4dc);
  }

  .scene {
    width: 100%;
    max-width: 100vw;
    padding: 14px 12px 18px;
    overflow-x: hidden;
  }

  .topbar {
    min-height: 48px;
  }

  .brand h1 {
    font-size: 20px;
  }

  .shell {
    flex: none;
    display: block;
    min-height: auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: clamp(176px, 34vh, 236px) 0 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .shell::before,
  .shell::after,
  .hero {
    display: none;
  }

  .card {
    width: min(100%, calc(100vw - 24px));
    max-width: 100%;
    margin-top: 0;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 250, 232, .9);
  }

  .tabs {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    overflow: hidden;
    margin-bottom: 14px;
  }

  .tabs button,
  .field,
  .field input,
  .primary,
  .secondary,
  .ghost {
    min-width: 0;
    max-width: 100%;
  }

  .tabs button {
    width: 100%;
    padding: 0 4px;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
  }

  .view-head h3 {
    font-size: 26px;
  }

  .field input {
    height: 44px;
  }

  .sms-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .sms-row .secondary {
    width: 100%;
  }

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

@media (max-width: 390px) {
  .scene {
    padding-inline: 10px;
  }

  .topbar {
    padding: 7px 10px;
    border-radius: 16px;
  }

  .seal {
    width: 36px;
    height: 36px;
  }

  .brand {
    gap: 9px;
  }

  .brand h1 {
    font-size: 18px;
  }

  .brand p {
    font-size: 12px;
  }

  .shell {
    padding-top: clamp(152px, 30vh, 204px);
  }

  .card {
    width: min(100%, calc(100vw - 20px));
    padding: 13px;
  }

  .tabs button {
    height: 36px;
    font-size: 16px;
  }

  .field {
    margin-bottom: 12px;
  }

  .primary,
  .secondary,
  .ghost {
    min-height: 42px;
  }
}
  font-family: var(--display-font);
  font-size: 17px;
  font-family: var(--display-font);
  font-size: 15px;
  font-family: var(--display-font);
  font-size: 17px;
