/* =========================================================
   重庆讨喜科技有限公司 · taoxikj.xyz
   Registration experience — 2026
   ========================================================= */

:root {
  --pine: #0C261F;
  --pine-2: #12352B;
  --ink: #10251D;
  --jade: #0F7B5F;
  --jade-dark: #0A5F49;
  --jade-soft: #E6F2EB;
  --mint: #DFF4E9;
  --mint-bright: #6EE7B7;
  --paper: #FFFDF8;
  --bone: #F4F2EA;
  --bone-deep: #EDEAE0;
  --line: #E5E1D5;
  --line-strong: #D8D3C5;
  --muted: #5D6861;
  --muted-2: #66716A;
  --error: #B23A2C;
  --error-soft: #FFF7F4;

  --font-sans: "Segoe UI Variable Display", "Segoe UI", "PingFang SC",
    "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --card-radius: 26px;
  --field-radius: 13px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

svg {
  display: block;
}

::selection {
  background: var(--mint);
  color: var(--pine);
}

:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 3px;
  border-radius: 3px;
}

.brand-panel :focus-visible {
  outline-color: var(--mint-bright);
}

[hidden] {
  display: none !important;
}

html.modal-open,
html.modal-open body {
  overflow: hidden;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--paper);
  color: var(--pine);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(12, 38, 31, .18);
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Shell ---------- */

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(460px, .96fr);
  min-height: 100vh;
  min-height: 100svh;
}

/* ---------- Brand panel ---------- */

.brand-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding: clamp(28px, 3.4vw, 48px) clamp(30px, 4.6vw, 72px) clamp(24px, 3vw, 38px);
  overflow: hidden;
  color: var(--paper);
  background:
    radial-gradient(115% 80% at 92% 2%, rgba(25, 112, 86, .52) 0%, rgba(12, 38, 31, 0) 56%),
    radial-gradient(80% 55% at 0% 100%, rgba(83, 210, 168, .12) 0%, rgba(12, 38, 31, 0) 62%),
    var(--pine);
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .2;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.brand-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(223, 244, 233, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(223, 244, 233, .045) 1px, transparent 1px);
  background-size: 92px 92px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .95), transparent 78%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .95), transparent 78%);
}

.orbit {
  position: absolute;
  top: 9%;
  right: -24%;
  z-index: -1;
  width: min(78vw, 820px);
  height: auto;
  pointer-events: none;
}

.brand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--mint);
  color: var(--pine);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .08),
    0 6px 18px rgba(0, 0, 0, .18);
}

.brand-mark svg {
  width: 32px;
  height: 32px;
}

.brand-word {
  color: var(--paper);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.2;
}

.beta {
  padding: 6px 10px 5px;
  border: 1px solid rgba(223, 244, 233, .17);
  border-radius: 999px;
  color: rgba(223, 244, 233, .55);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1;
  text-indent: .16em;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.brand-body {
  align-self: center;
  max-width: 650px;
  padding: clamp(44px, 8vh, 96px) 0 clamp(40px, 6vh, 72px);
}

.brand-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: rgba(223, 244, 233, .67);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .2em;
  line-height: 1;
}

.pulse {
  position: relative;
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint-bright);
  box-shadow: 0 0 0 0 rgba(110, 231, 183, .28);
  animation: pulse 3s var(--ease) infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(110, 231, 183, .28); }
  45% { box-shadow: 0 0 0 7px rgba(110, 231, 183, 0); }
}

.brand-body h1 {
  margin: 0 0 clamp(20px, 3vh, 28px);
  color: #F8FAF6;
  font-size: clamp(40px, 4.55vw, 66px);
  font-weight: 620;
  letter-spacing: -.025em;
  line-height: 1.2;
  text-wrap: balance;
}

.brand-lede {
  max-width: 360px;
  margin: 0;
  color: rgba(223, 244, 233, .58);
  font-size: 14.5px;
  font-weight: 400;
  letter-spacing: .015em;
  line-height: 1.9;
  text-wrap: pretty;
}

.brand-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(223, 244, 233, .12);
  color: rgba(223, 244, 233, .55);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.brand-foot p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.mini-dot {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mint-bright);
  opacity: .8;
}

/* ---------- Auth panel ---------- */

.auth-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background:
    radial-gradient(90% 55% at 100% 0%, rgba(255, 255, 255, .9) 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(60% 40% at 0% 100%, rgba(15, 123, 95, .035) 0%, rgba(244, 242, 234, 0) 65%),
    var(--bone);
}

.auth-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(24px, 3.4vw, 48px);
  pointer-events: none;
}

.auth-top > * {
  pointer-events: auto;
}

.domain {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .18em;
  line-height: 1;
}

.auth-top p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: .01em;
}

.auth-top a {
  margin-left: 5px;
  color: var(--jade);
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 123, 95, .28);
  padding-bottom: 1px;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}

.auth-top a:hover {
  color: var(--jade-dark);
  border-bottom-color: var(--jade-dark);
}

.auth-wrap {
  display: grid;
  flex: 1;
  place-items: center;
  padding: clamp(94px, 11vh, 118px) clamp(20px, 3.4vw, 48px) clamp(44px, 6vh, 64px);
}

/* ---------- Card ---------- */

.auth-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 438px);
  min-height: 610px;
  padding: clamp(28px, 2.7vw, 38px);
  border: 1px solid rgba(16, 37, 29, .09);
  border-radius: var(--card-radius);
  background: var(--paper);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 24px 64px rgba(16, 37, 29, .07),
    0 3px 10px rgba(16, 37, 29, .025);
  animation: card-in .7s var(--ease-out) both;
}

.auth-card.is-compact {
  min-height: 560px;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 123, 95, .3), transparent);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 15px;
  color: var(--jade);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .18em;
  line-height: 1;
  text-transform: uppercase;
}

.kicker-line {
  display: block;
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.auth-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 2.3vw, 33px);
  font-weight: 660;
  letter-spacing: -.035em;
  line-height: 1.2;
}

.sub {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .01em;
  line-height: 1.6;
}

/* ---------- Form ---------- */

#register-form,
#login-form {
  margin-top: 27px;
}

.form-grid {
  display: grid;
  gap: 17px;
}

.field-group {
  min-width: 0;
}

.field-group > label,
.label-row label {
  display: inline-block;
  margin: 0 0 7px;
  color: #35473E;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .015em;
  line-height: 1.3;
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.label-row label {
  margin-bottom: 7px;
}

.hint {
  margin-bottom: 7px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.3;
  text-align: right;
  transition: color .2s var(--ease);
}

.hint.is-ok {
  color: var(--jade);
}

.field {
  display: flex;
  align-items: center;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--field-radius);
  background: #FAF8F2;
  overflow: hidden;
  transition:
    border-color .2s var(--ease),
    background-color .2s var(--ease),
    box-shadow .2s var(--ease);
}

.field:hover {
  border-color: var(--line-strong);
}

.field:focus-within {
  border-color: var(--jade);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(15, 123, 95, .085);
}

.field.is-error {
  border-color: rgba(178, 58, 44, .58);
  background: var(--error-soft);
}

.field.is-error:focus-within {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(178, 58, 44, .08);
}

.field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 450;
  letter-spacing: .015em;
  line-height: 1;
}

.field input::placeholder {
  color: #6B756E;
  font-weight: 400;
  letter-spacing: .01em;
}

.prefix {
  display: flex;
  align-items: center;
  align-self: stretch;
  flex: none;
  padding: 0 13px 0 15px;
  border-right: 1px solid #E4E0D4;
  color: #4B5B53;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
}

.field input[type="password"] {
  letter-spacing: .08em;
}

.field input[type="password"]::placeholder {
  letter-spacing: .01em;
}

.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  margin-right: 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #7E8881;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.icon-btn:hover {
  color: var(--ink);
  background: #F0EEE6;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn .eye-closed {
  display: none;
}

.icon-btn.is-visible .eye-open {
  display: none;
}

.icon-btn.is-visible .eye-closed {
  display: block;
}

.send-code {
  flex: none;
  height: 36px;
  margin-right: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: var(--jade-soft);
  color: #0A6B50;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: .01em;
  white-space: nowrap;
  transition:
    background-color .2s var(--ease),
    color .2s var(--ease),
    transform .12s var(--ease);
}

.send-code:hover:not(:disabled) {
  background: #D8EBE1;
}

.send-code:active:not(:disabled) {
  transform: scale(.97);
}

.send-code:disabled {
  background: #F1EFE7;
  color: #9AA39C;
  cursor: default;
}

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 7px 0 0;
  color: var(--error);
  font-size: 11px;
  font-weight: 450;
  letter-spacing: .01em;
  line-height: 1.45;
}

.field-error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 13px;
  height: 13px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(178, 58, 44, .1);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.agree-error {
  margin-top: 8px;
}

/* ---------- Agreement ---------- */

.agree {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 19px;
  cursor: pointer;
  user-select: none;
}

.agree input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.box {
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid #CFCABD;
  border-radius: 5px;
  background: #FFFFFF;
  color: #FFFFFF;
  transition:
    background-color .18s var(--ease),
    border-color .18s var(--ease),
    transform .12s var(--ease);
}

.box svg {
  width: 11px;
  height: 11px;
  opacity: 0;
  transform: scale(.55);
  transition: opacity .16s var(--ease), transform .18s var(--ease);
}

.agree input:checked + .box {
  border-color: var(--jade);
  background: var(--jade);
}

.agree input:checked + .box svg {
  opacity: 1;
  transform: scale(1);
}

.agree input:focus-visible + .box {
  outline: 2px solid var(--jade);
  outline-offset: 2px;
}

.agree:active .box {
  transform: scale(.93);
}

.agree-text {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .005em;
  line-height: 1.75;
}

.text-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: #41544A;
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(65, 84, 74, .35);
  text-underline-offset: 2px;
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease);
}

.text-link:hover {
  color: var(--jade);
  text-decoration-color: var(--jade);
}

/* ---------- Submit ---------- */

.submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 54px;
  margin-top: 22px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--field-radius);
  background: var(--jade);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 660;
  letter-spacing: .03em;
  text-decoration: none;
  box-shadow:
    0 10px 24px rgba(15, 123, 95, .17),
    0 1px 0 rgba(255, 255, 255, .16) inset;
  overflow: hidden;
  transition:
    background-color .2s var(--ease),
    transform .16s var(--ease),
    box-shadow .2s var(--ease);
}

.submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, .14) 48%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .65s var(--ease);
}

.submit:hover {
  background: var(--jade-dark);
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px rgba(15, 123, 95, .21),
    0 1px 0 rgba(255, 255, 255, .16) inset;
}

.submit:hover::after {
  transform: translateX(120%);
}

.submit:active {
  transform: translateY(0);
}

.submit .arrow {
  width: 17px;
  height: 17px;
  transition: transform .22s var(--ease);
}

.submit:hover .arrow {
  transform: translateX(3px);
}

.submit.is-loading {
  background: #0B6B50;
  pointer-events: none;
}

.submit.is-loading .arrow {
  display: none;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.submit.is-loading .spinner {
  display: block;
}

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

.switch {
  margin: 17px 0 0;
  color: var(--muted-2);
  font-size: 11.5px;
  letter-spacing: .01em;
  line-height: 1.6;
  text-align: center;
}

.switch a {
  margin-left: 3px;
  color: var(--jade);
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 123, 95, .25);
  padding-bottom: 1px;
  transition: border-color .2s var(--ease);
}

.switch a:hover {
  border-bottom-color: var(--jade);
}

/* ---------- Login extras ---------- */

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}

.check-inline input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.check-inline .box {
  margin-top: 0;
  width: 17px;
  height: 17px;
}

.check-inline input:checked + .box {
  border-color: var(--jade);
  background: var(--jade);
}

.check-inline input:checked + .box svg {
  opacity: 1;
  transform: scale(1);
}

.check-inline input:focus-visible + .box {
  outline: 2px solid var(--jade);
  outline-offset: 2px;
}

.forgot {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(107, 117, 110, .25);
  padding-bottom: 1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.forgot:hover {
  color: var(--jade);
  border-bottom-color: var(--jade);
}

/* ---------- Success ---------- */

.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 6px;
  text-align: center;
  animation: success-in .5s var(--ease-out) both;
}

@keyframes success-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--jade);
}

.success-icon::before,
.success-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(15, 123, 95, .22);
  border-radius: 50%;
  animation: halo 2.8s var(--ease) infinite;
}

.success-icon::after {
  animation-delay: 1.2s;
}

@keyframes halo {
  0% { transform: scale(1); opacity: .65; }
  75%, 100% { transform: scale(1.5); opacity: 0; }
}

.success-icon svg {
  width: 30px;
  height: 30px;
}

.success .kicker {
  justify-content: center;
  margin-bottom: 14px;
}

.success h2 {
  font-size: 30px;
}

.success-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

#success-phone {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.success-btn {
  width: 100%;
  margin-top: 30px;
}

.success .switch {
  margin-top: 18px;
}

/* ---------- Footer ---------- */

.auth-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(24px, 3.4vw, 48px) 10px;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: .03em;
  line-height: 1.5;
}

.icp-line {
  margin: 0;
  padding: 0 clamp(24px, 3.4vw, 48px) 16px;
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: .02em;
  line-height: 1.5;
  text-align: center;
}

.icp-line a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.icp-line a:hover {
  color: var(--jade);
  border-bottom-color: currentColor;
}

.foot-links {
  display: flex;
  align-items: center;
  gap: 9px;
}

.foot-links a {
  text-decoration: none;
  transition: color .2s var(--ease);
}

.foot-links a:hover {
  color: var(--jade);
}

/* ---------- Legal dialog ---------- */

.legal-dialog {
  width: min(92vw, 560px);
  max-height: 84svh;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(5, 20, 15, .3);
}

.legal-dialog::backdrop {
  background: rgba(6, 24, 18, .55);
  backdrop-filter: blur(4px);
}

.legal-dialog[open] {
  animation: dialog-in .28s var(--ease-out) both;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.legal-inner {
  max-height: 84svh;
  padding: clamp(24px, 4vw, 34px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

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

.dialog-head h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -.03em;
}

.dialog-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  margin-top: -4px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}

.dialog-close:hover {
  background: var(--bone);
  color: var(--ink);
}

.dialog-close svg {
  width: 16px;
  height: 16px;
}

.legal-body {
  color: var(--muted);
}

.legal-body p {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.9;
  text-wrap: pretty;
}

.legal-body h3 {
  margin: 22px 0 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .01em;
}

.legal-note {
  margin-top: 26px !important;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted-2) !important;
  font-size: 10.5px !important;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 32px);
  padding: 12px 17px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: #12271F;
  color: #F7FAF5;
  font-size: 12px;
  letter-spacing: .01em;
  line-height: 1.45;
  box-shadow: 0 16px 44px rgba(6, 24, 18, .24);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity .24s var(--ease), transform .3s var(--ease-out);
}

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

.toast-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint-bright);
}

/* ---------- Misc ---------- */

.noscript {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 70;
  transform: translateX(-50%);
  margin: 0;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--error);
  color: #FFFFFF;
  font-size: 12px;
  white-space: nowrap;
}

.shake {
  animation: shake .4s var(--ease);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1120px) {
  .brand-panel {
    padding-left: clamp(28px, 4vw, 48px);
    padding-right: clamp(28px, 4vw, 48px);
  }

  .brand-body h1 {
    font-size: clamp(38px, 4.5vw, 54px);
  }

  .auth-card {
    padding: 30px;
  }
}

@media (max-width: 980px) {
  .shell {
    display: block;
  }

  .brand-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    padding: 17px 22px;
    background:
      radial-gradient(90% 160% at 100% 0%, rgba(25, 112, 86, .5) 0%, rgba(12, 38, 31, 0) 62%),
      var(--pine);
  }

  .brand-panel::after,
  .brand-grid,
  .orbit,
  .brand-body,
  .brand-foot {
    display: none;
  }

  .brand-head {
    width: 100%;
  }

  .brand-mark,
  .brand-mark svg {
    width: 29px;
    height: 29px;
  }

  .brand-mark {
    font-size: 17px;
  }

  .brand-word {
    font-size: 14px;
  }

  .auth-panel {
    min-height: calc(100svh - 63px);
  }

  .auth-top {
    position: static;
    padding: 18px 22px 0;
  }

  .domain {
    display: none;
  }

  .auth-top p {
    margin-left: auto;
  }

  .auth-wrap {
    padding: 22px 20px 36px;
  }

  .auth-card {
    width: min(100%, 452px);
    min-height: 0;
    padding: 30px;
  }

  .auth-foot {
    padding: 20px 22px 10px;
  }
}

@media (max-width: 560px) {
  .brand-panel {
    padding: 15px 18px;
  }

  .auth-panel {
    min-height: calc(100svh - 59px);
  }

  .auth-top {
    padding: 16px 18px 0;
  }

  .auth-wrap {
    padding: 16px 14px 30px;
  }

  .auth-card {
    padding: 27px 21px 25px;
    border-radius: 22px;
  }

  .auth-card::before {
    left: 21px;
    right: 21px;
  }

  .auth-card h2 {
    font-size: 29px;
  }

  .sub {
    font-size: 12.5px;
  }

  #register-form,
  #login-form {
    margin-top: 24px;
  }

  .form-grid {
    gap: 15px;
  }

  .field {
    height: 51px;
  }

  .field input {
    font-size: 16px;
    padding: 0 12px;
  }

  .prefix {
    padding: 0 11px 0 13px;
  }

  .send-code {
    padding: 0 10px;
    font-size: 11.5px;
  }

  .agree-text {
    font-size: 10.5px;
  }

  .submit {
    height: 52px;
    margin-top: 20px;
  }

  .auth-foot {
    padding: 16px 18px 10px;
    font-size: 9.5px;
  }

  .icp-line {
    padding: 0 18px 14px;
    font-size: 9px;
  }

  .legal-inner {
    padding: 24px 21px;
  }

  .toast {
    bottom: 18px;
  }
}

@media (max-width: 380px) {
  .brand-word {
    font-size: 13px;
    letter-spacing: .04em;
  }

  .beta {
    padding: 5px 8px 4px;
    font-size: 8px;
  }

  .kicker {
    font-size: 8.5px;
    letter-spacing: .14em;
  }

  .auth-card h2 {
    font-size: 27px;
  }

  .hint {
    font-size: 9.5px;
  }

  .send-code {
    padding: 0 8px;
    font-size: 11px;
  }

  .auth-foot {
    gap: 12px;
  }

  .foot-links span:last-child {
    display: none;
  }
}

@media (min-width: 981px) and (max-height: 820px) {
  .auth-wrap {
    padding-top: 84px;
    padding-bottom: 30px;
  }

  .auth-card {
    min-height: 0;
    padding: 28px 32px;
  }

  .form-grid {
    gap: 14px;
  }

  .submit {
    margin-top: 18px;
  }

  .brand-body {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
