: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("./lingjing-icon.png") 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;
  }
}

/* ===================================
   Minimal glass refresh
====================================== */
:root {
  --ink: #f7fbff;
  --muted: rgba(235, 247, 255, .72);
  --paper: rgba(8, 22, 28, .62);
  --paper-strong: rgba(10, 27, 34, .8);
  --gold: #ffd06a;
  --gold-soft: rgba(255, 208, 106, .28);
  --gold-line: rgba(255, 255, 255, .18);
  --orange: #ff9b61;
  --orange-deep: #ff744f;
  --jade: #65e7c8;
  --sky: #64b7ff;
  --shadow: 0 30px 90px rgba(0, 0, 0, .36);
  --display-font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

body {
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(5, 20, 24, .12), rgba(5, 20, 24, .28)),
    url("./reg-bg-glass.png") center center / cover fixed no-repeat,
    #d9f8fb;
  letter-spacing: 0;
}

body::before {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(8, 26, 31, .22)),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: auto, 58px 58px, 58px 58px;
}

.scene {
  padding: 20px clamp(18px, 4vw, 56px) 32px;
}

.topbar {
  width: auto;
  min-height: 62px;
  padding: 9px 13px;
  border-color: rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(7, 18, 24, .58);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  backdrop-filter: blur(24px) saturate(1.35);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
}

.brand {
  color: var(--ink);
}

.seal {
  width: 46px;
  height: 46px;
  border-color: rgba(255, 255, 255, .28);
  border-radius: 50%;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .25);
}

.brand h1 {
  color: var(--ink);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 850;
  text-shadow: 0 16px 42px rgba(0, 0, 0, .42);
}

.brand p {
  color: rgba(235, 247, 255, .66);
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 440px);
  align-items: center;
  gap: clamp(26px, 4vw, 56px);
  width: min(1180px, 100%);
  min-height: min(740px, calc(100vh - 124px));
  padding: clamp(30px, 4vw, 54px);
  border-color: rgba(255, 255, 255, .18);
  border-radius: 30px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .045) 42%, rgba(8, 22, 28, .12));
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.shell::before {
  inset: 1px;
  border-color: rgba(255, 255, 255, .12);
  border-radius: inherit;
}

.hero {
  position: relative;
  inset: auto;
  min-height: 440px;
  border-radius: 24px;
  background: transparent;
  box-shadow: none;
}

.hero::before {
  display: none;
}

.hero-copy {
  position: absolute;
  left: 0;
  right: auto;
  bottom: 0;
  width: min(560px, 100%);
  color: var(--ink);
}

.eyebrow {
  height: 34px;
  padding: 0 14px;
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .1);
  color: var(--jade);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.hero h2 {
  max-width: 560px;
  color: var(--ink);
  font-size: clamp(36px, 4.2vw, 58px);
  font-weight: 900;
  line-height: 1.08;
  text-shadow: 0 18px 54px rgba(0, 0, 0, .5);
}

.hero p {
  max-width: 460px;
  color: rgba(235, 247, 255, .78);
  font-size: 16px;
}

.card {
  width: 100%;
  margin: 0;
  padding: 22px;
  border-color: rgba(255, 255, 255, .18);
  border-radius: 26px;
  background: var(--paper);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);
  backdrop-filter: blur(26px) saturate(1.35);
  box-shadow:
    0 26px 76px rgba(0, 0, 0, .34),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

.card::before {
  inset: 1px;
  border-color: rgba(255, 255, 255, .1);
  border-radius: inherit;
}

.tabs {
  gap: 6px;
  padding: 5px;
  border-color: rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.tabs button {
  height: 40px;
  border-radius: 999px;
  color: rgba(235, 247, 255, .7);
  transition: color .24s cubic-bezier(.2, .8, .2, 1), background .24s cubic-bezier(.2, .8, .2, 1), transform .24s cubic-bezier(.2, .8, .2, 1), box-shadow .24s cubic-bezier(.2, .8, .2, 1);
}

.tabs button.active {
  outline: 0;
  color: #071318;
  background: linear-gradient(135deg, var(--jade), var(--sky));
  box-shadow: 0 15px 34px rgba(86, 196, 220, .24);
}

.view-head h3 {
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
}

.view-head p,
.code-panel p,
.hint {
  color: var(--muted);
}

.field span {
  color: rgba(235, 247, 255, .8);
}

.field input {
  height: 48px;
  border-color: rgba(255, 255, 255, .16);
  border-radius: 15px;
  background: rgba(255, 255, 255, .08);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: border-color .24s cubic-bezier(.2, .8, .2, 1), box-shadow .24s cubic-bezier(.2, .8, .2, 1), background .24s cubic-bezier(.2, .8, .2, 1), transform .24s cubic-bezier(.2, .8, .2, 1);
}

.field input::placeholder {
  color: rgba(235, 247, 255, .42);
}

.field input:focus {
  border-color: rgba(101, 231, 200, .82);
  background: rgba(255, 255, 255, .13);
  box-shadow: 0 0 0 5px rgba(101, 231, 200, .13);
}

.field input[readonly] {
  color: rgba(235, 247, 255, .58);
  background: rgba(255, 255, 255, .05);
}

.primary,
.secondary,
.ghost {
  min-height: 46px;
  border-radius: 999px;
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), box-shadow .24s cubic-bezier(.2, .8, .2, 1), background .24s cubic-bezier(.2, .8, .2, 1), filter .24s cubic-bezier(.2, .8, .2, 1), opacity .24s cubic-bezier(.2, .8, .2, 1);
}

.primary {
  border-color: rgba(255, 255, 255, .42);
  color: #071318;
  background: linear-gradient(135deg, var(--jade), var(--sky));
  box-shadow: 0 18px 42px rgba(78, 188, 218, .24);
}

.secondary {
  border-color: rgba(255, 255, 255, .18);
  color: var(--ink);
  background: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.ghost,
.topbar .ghost {
  border-color: rgba(255, 255, 255, .18);
  color: rgba(235, 247, 255, .82);
  background: rgba(255, 255, 255, .08);
}

button:hover {
  filter: none;
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

.quick-links button {
  color: var(--jade);
}

.code-panel {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .045));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

#authCode {
  color: var(--jade);
  text-shadow: 0 14px 42px rgba(101, 231, 200, .22);
}

.timebar {
  background: rgba(255, 255, 255, .1);
}

.timebar span {
  background: linear-gradient(90deg, var(--jade), var(--sky), var(--gold));
}

.captcha-modal {
  background: rgba(3, 10, 13, .54);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.toast {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(8, 22, 28, .86);
  color: var(--ink);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
}

@media (min-width: 861px) and (max-width: 1180px) {
  .topbar {
    margin: 0 auto 14px;
  }

  .shell {
    display: block;
    width: min(840px, 100%);
    padding: clamp(230px, 30vh, 320px) clamp(24px, 5vw, 42px) 38px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(7, 18, 24, .26) 48%, rgba(7, 18, 24, .34));
  }

  .hero {
    display: none;
  }

  .card {
    width: min(520px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 860px) {
  body {
    background:
      linear-gradient(180deg, rgba(5, 20, 24, .08), rgba(5, 20, 24, .44)),
      url("./reg-bg-glass.png") center top / cover scroll no-repeat,
      #d9f8fb;
  }

  body::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(7, 18, 24, .36) 58%, rgba(7, 18, 24, .62));
  }

  .topbar {
    width: 100%;
  }

  .shell {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: auto;
    padding: clamp(150px, 28vh, 220px) 0 0;
    overflow: visible;
  }

  .card {
    width: min(100%, calc(100vw - 24px));
    max-width: 100%;
    margin: 0 auto;
    padding: 16px;
    border-radius: 22px;
    background: rgba(8, 22, 28, .68);
    -webkit-backdrop-filter: blur(24px) saturate(1.35);
    backdrop-filter: blur(24px) saturate(1.35);
  }

  .view,
  .view.active,
  .view-head,
  .field,
  .field input,
  .primary,
  .secondary,
  .ghost {
    width: 100%;
    max-width: 100%;
  }

  .view-head h3 {
    font-size: 24px;
  }
}

@media (max-width: 390px) {
  .brand h1 {
    font-size: 17px;
  }

  .shell {
    padding-top: clamp(125px, 22vh, 170px);
  }
}

/* ===================================
   Sunlight tuning
====================================== */
:root {
  --paper: rgba(34, 72, 82, .48);
  --paper-strong: rgba(42, 86, 96, .62);
  --line: rgba(255, 255, 255, .3);
  --line-strong: rgba(255, 255, 255, .42);
  --muted: rgba(243, 251, 255, .78);
  --shadow: 0 26px 70px rgba(0, 0, 0, .24);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(5, 48, 58, .22)),
    url("./reg-bg-glass.png") center center / cover fixed no-repeat,
    #d9f8fb;
}

body::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(7, 48, 58, .18)),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
}

.topbar {
  background: rgba(37, 83, 94, .5);
}

.shell {
  background: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .065) 42%, rgba(18, 56, 66, .12));
}

.card {
  background: rgba(34, 72, 82, .5);
}

.captcha-box {
  background: rgba(34, 72, 82, .72);
}

@media (min-width: 861px) and (max-width: 1180px) {
  .shell {
    background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(18, 56, 66, .24) 48%, rgba(18, 56, 66, .3));
  }
}

@media (max-width: 860px) {
  body {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(5, 48, 58, .36)),
      url("./reg-bg-glass.png") center top / cover scroll no-repeat,
      #d9f8fb;
  }

  body::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(7, 48, 58, .3) 58%, rgba(7, 48, 58, .48));
  }

  .card {
    background: rgba(34, 72, 82, .56);
  }
}

/* ===================================
   Unified Frosted Glass
====================================== */
:root {
  --glass-blur: 32px;
  --glass-saturate: 1.58;
  --glass-frost: rgba(255, 255, 255, .13);
  --glass-frost-strong: rgba(50, 105, 116, .48);
  --glass-shadow: 0 28px 76px rgba(14, 61, 74, .22);
}

.topbar,
.shell,
.card,
.captcha-dialog,
.toast,
.code-panel {
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(145deg, var(--glass-frost-strong), rgba(255, 255, 255, .08));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  box-shadow: var(--glass-shadow), inset 0 1px rgba(255, 255, 255, .28);
}

.tabs,
.field,
.field input,
.primary,
.secondary,
.ghost,
.quick-links button {
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  backdrop-filter: blur(20px) saturate(1.35);
}

.card {
  background:
    linear-gradient(145deg, rgba(54, 112, 124, .54), rgba(255, 255, 255, .12));
}

/* ===================================
   Contrast tuning for glass panels
====================================== */
:root {
  --ink-strong: #062833;
  --ink: #123d48;
  --ink-soft: rgba(18, 61, 72, .76);
}

.topbar,
.topbar h1,
.topbar p,
.hero-copy,
.hero-copy h2,
.hero-copy p,
.card,
.card h3,
.card p,
.field,
.field span,
.quick-links button,
.captcha-dialog,
.captcha-dialog h3,
.captcha-dialog p {
  color: var(--ink-strong);
  text-shadow: none;
}

.topbar p,
.hero-copy p,
.card p,
.field span,
.view-head p {
  color: var(--ink-soft);
}

.field input {
  color: var(--ink-strong);
  background: rgba(232, 252, 255, .3);
}

.field input::placeholder {
  color: rgba(6, 40, 51, .52);
}

.tabs button {
  color: rgba(6, 40, 51, .62);
}

.tabs button.active,
.primary {
  color: #061318;
}

.secondary,
.ghost {
  color: var(--ink);
}

/* ===================================
   Lingjing unified brand icon
====================================== */
.seal {
  background: rgba(255, 255, 255, .28) url("./lingjing-icon.png") center / cover no-repeat;
  border: 1px solid var(--line-strong);
  box-shadow: 0 14px 30px rgba(14, 61, 74, .24), inset 0 1px rgba(255, 255, 255, .3);
}

/* ===================================
   Final typography polish
====================================== */
.brand h1,
.hero-copy h2,
.view-head h3 {
  color: #073240;
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: 0 !important;
  text-shadow: none;
}

.brand h1 {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.1;
}

.brand p,
.hero-copy p,
.view-head p {
  color: rgba(7, 50, 64, .68);
  font-weight: 560;
  text-shadow: none;
}

/* ===================================
   Glass border color polish
====================================== */
:root {
  --glass-edge: rgba(115, 224, 234, .5);
  --glass-edge-soft: rgba(115, 224, 234, .28);
  --glass-edge-inner: rgba(255, 255, 255, .34);
}

.card {
  border-color: var(--glass-edge);
  box-shadow:
    0 28px 76px rgba(14, 61, 74, .18),
    inset 0 1px var(--glass-edge-inner),
    inset 0 -1px rgba(115, 224, 234, .16);
}

.card::before {
  border-color: var(--glass-edge-soft);
}

.tabs,
.field input,
.secondary,
.ghost,
.quick-links button {
  border-color: rgba(112, 215, 224, .26);
  background: rgba(232, 252, 255, .28);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .22),
    inset 0 -1px rgba(92, 186, 199, .08);
}

.tabs {
  background: rgba(32, 95, 108, .16);
}

.tabs button {
  color: rgba(7, 50, 64, .62);
}

.tabs button.active,
.primary {
  border-color: rgba(170, 242, 240, .62);
  box-shadow:
    0 14px 34px rgba(44, 147, 181, .18),
    inset 0 1px rgba(255, 255, 255, .34);
}

.field input:focus {
  border-color: rgba(86, 204, 214, .56);
  box-shadow:
    0 0 0 3px rgba(101, 231, 200, .1),
    inset 0 1px rgba(255, 255, 255, .24);
}

.field {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(232, 252, 255, .42) inset;
  -webkit-text-fill-color: #061318;
  caret-color: #061318;
}

/* ===================================
   Auth view rhythm
====================================== */
body[data-view="login"] .card {
  min-height: 0;
}

body[data-view="login"] #loginView.active {
  min-height: 0;
  display: block;
}

body[data-view="login"] #loginBtn {
  margin-top: 22px;
}

body[data-view="login"] .quick-links {
  margin-top: 16px;
}

body[data-view="login"] .field,
body[data-view="register"] .field,
body[data-view="retrieve"] .field {
  margin-bottom: 14px;
}

body[data-view="login"] .view-head,
body[data-view="register"] .view-head,
body[data-view="retrieve"] .view-head {
  margin-bottom: 16px;
}

/* Keep SMS code input and button on the same visual baseline. */
.sms-row {
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: end;
  column-gap: 16px;
}

.sms-row .field {
  display: grid;
  grid-template-rows: auto 56px;
  gap: 7px;
  margin-bottom: 0 !important;
}

.sms-row .field input,
.sms-row .secondary {
  height: 56px;
  min-height: 56px;
  border-radius: 28px;
}

.sms-row .secondary {
  align-self: end;
  width: 100%;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  transform: none !important;
}

@media (max-width: 640px) {
  .sms-row {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

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