  .form-stack {
    display: grid;
    flex-shrink: 0;
    width: 100%;
    max-width: 476px;
    margin: 0 auto;
    padding: 4px 28px;
    overflow: hidden;
    transition: height 0.45s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .form-panel {
    grid-area: 1 / 1;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateX(var(--home-x, 26px));
    transition:
      opacity 0.42s cubic-bezier(0.32, 0.72, 0, 1),
      transform 0.42s cubic-bezier(0.32, 0.72, 0, 1),
      visibility 0s linear 0.42s;
  }
  #loginForm { --home-x: -26px; }
  #registerForm, #forgotForm { --home-x: 26px; }

  .form-panel.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
    transition:
      opacity 0.42s cubic-bezier(0.32, 0.72, 0, 1) 0.05s,
      transform 0.42s cubic-bezier(0.32, 0.72, 0, 1) 0.05s,
      visibility 0s;
  }
  .form-panel.active > * {
    animation: fadeUpSoft 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .form-panel.active > *:nth-child(1) { animation-delay: 0.06s; }
  .form-panel.active > *:nth-child(2) { animation-delay: 0.11s; }
  .form-panel.active > *:nth-child(3) { animation-delay: 0.16s; }
  .form-panel.active > *:nth-child(4) { animation-delay: 0.21s; }
  .form-panel.active > *:nth-child(5) { animation-delay: 0.26s; }
  .form-panel.active > *:nth-child(6) { animation-delay: 0.31s; }
  .form-panel.active > *:nth-child(7) { animation-delay: 0.36s; }

  @keyframes fadeUpSoft {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
  }

  .tabs {
    max-width: 420px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .form-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 4px;
    justify-content: center;
    justify-content: safe center;
  }

  .field { position: relative; }
  .field-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dim);
    margin-bottom: 8px;
  }
  .field-input-wrap { position: relative; }

  .field-input {
    width: 100%;
    height: 46px;
    padding: 0 16px 0 42px;
    background: var(--control-bg);
    border: none;
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    outline: none;
  }
  .field-input::placeholder { color: var(--text-faint); }
  .field-input:focus {
    background: var(--control-bg-focus);
    box-shadow: 0 0 0 2px var(--focus-ring);
  }
  .field-input.error {
    box-shadow: 0 0 0 2px rgba(255, 69, 58, 0.6);
  }

  .field-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--text-dim);
    transition: color 0.3s;
    pointer-events: none;
  }
  .field:focus-within .field-icon { color: var(--text); }

  .toggle-pw {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-dim);
    cursor: pointer; padding: 6px;
    border-radius: 6px;
    display: flex; transition: color 0.2s;
  }
  .toggle-pw:hover { color: var(--text); }
  .toggle-pw svg { width: 16px; height: 16px; }
  .toggle-pw.show { color: var(--text); }
  .field-error {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    will-change: max-height, opacity, transform;
    font-size: 12px;
    line-height: 1.4;
    color: #ff453a;
    transition:
      max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.34s cubic-bezier(0.4, 0, 0.2, 1),
      margin-top 0.4s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .field-error.show {
    max-height: 48px;
    margin-top: 6px;
    opacity: 1;
    transform: translateY(0);
  }

  .pw-strength {
    display: none;
    margin-top: 8px;
    gap: 6px;
    align-items: center;
  }
  .pw-strength.show { display: flex; }
  .pw-bar {
    flex: 1; height: 3px; border-radius: 2px;
    background: var(--track);
    overflow: hidden;
  }
  .pw-bar-fill {
    height: 100%; width: 0; border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s;
  }
  .pw-strength-text {
    font-size: 11px; min-width: 40px; text-align: right;
    color: var(--text-faint);
  }
  .pw-strength.weak .pw-bar-fill { width: 33%; background: #ff453a; }
  .pw-strength.weak .pw-strength-text { color: #ff453a; }
  .pw-strength.medium .pw-bar-fill { width: 66%; background: #ffd60a; }
  .pw-strength.medium .pw-strength-text { color: #ffd60a; }
  .pw-strength.strong .pw-bar-fill { width: 100%; background: var(--accent); }
  .pw-strength.strong .pw-strength-text { color: var(--accent); }

  .code-row {
    display: flex; gap: 10px;
  }
  .code-row .field-input { flex: 1; }
  .code-btn {
    flex: 0 0 auto;
    width: 120px;
    height: 46px;
    border: 1px solid var(--btn-border);
    background: transparent;
    color: var(--text);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
  }
  .code-btn:hover:not(:disabled) {
    background: var(--hover-bg);
    border-color: var(--btn-border-hover);
  }
  .code-btn:active:not(:disabled) {
    background: var(--active-bg);
  }
  .code-btn:disabled {
    color: var(--text-faint);
    border-color: var(--btn-border-disabled);
    cursor: not-allowed;
  }

  .btn-row { display: flex; gap: 12px; margin-top: 8px; }

  .btn {
    flex: 1;
    height: 46px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .btn-primary {
    color: var(--text);
    background: transparent;
    border: 1px solid var(--btn-border);
  }
  .btn-primary:hover {
    background: var(--hover-bg);
    border-color: var(--btn-border-hover);
  }
  .btn-primary:active {
    background: var(--active-bg);
  }
  .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .btn-secondary {
    color: var(--text);
    background: transparent;
    border: 1px solid var(--btn-border);
    flex: 0 0 auto;
    width: 46px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .btn-secondary:hover {
    background: var(--hover-bg);
  }
  .btn-secondary:active {
    transform: scale(0.95);
  }
  .btn-secondary svg { width: 18px; height: 18px; }

  .link-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    margin: 0 auto;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .link-btn:hover { color: var(--text); }
  .left-toolbar {
    position: absolute;
    top: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 30;
    animation: fadeUp 0.8s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .lang-wrap { position: relative; }
  .lang-btn {
    position: relative;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--btn-border);
    background: transparent;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  }
  .lang-btn:hover { background: var(--hover-bg); color: var(--text); }
  .lang-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
  .lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 148px;
    background: var(--menu-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  }
  .lang-wrap.open .lang-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  .lang-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-align: left;
  }
  .lang-item:hover { background: var(--hover-bg); color: var(--text); }
  .lang-item.active { color: var(--text); background: var(--track); }
  .lang-item .check {
    margin-left: auto;
    width: 14px; height: 14px;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .lang-item.active .check { opacity: 1; transform: scale(1); }
  .lang-chevron { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
  .lang-wrap.open .lang-chevron { transform: rotate(180deg); }

/* ── ShipModal 统一弹窗组件 ── */
.sm-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 2000; display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s ease; }
.sm-mask.on { opacity: 1; }
.sm-card { background: var(--side-bg, #0e0e0f); border: 1px solid var(--glass-border); border-radius: 14px; padding: 20px; max-width: 92vw; max-height: 88vh; max-height: 88dvh; overflow-y: auto; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55); transform: translateY(10px) scale(0.98); transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1); }
.sm-mask.on .sm-card { transform: translateY(0) scale(1); }
.sm-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.sm-body { font-size: 13px; color: var(--text); }
.sm-text { line-height: 1.7; color: var(--text-dim); }
.sm-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }
.sm-btn { padding: 8px 18px; border-radius: 9px; font-size: 12.5px; font-weight: 600; cursor: pointer; border: 1px solid var(--glass-border); background: var(--card-bg); color: var(--text); transition: filter 0.15s ease; }
.sm-btn.primary { background: var(--accent); border-color: var(--accent); color: #06210f; }
.sm-btn.danger { background: rgba(255, 69, 58, 0.15); border-color: rgba(255, 69, 58, 0.45); color: #ff9b96; }
.sm-btn:hover { filter: brightness(1.15); }
.sm-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.sm-input { width: 100%; box-sizing: border-box; background: var(--control-bg); border: 1px solid var(--glass-border); color: var(--text); border-radius: 9px; padding: 9px 12px; font-size: 13px; outline: none; }
.sm-input:focus { border-color: var(--accent); }
.sm-otp { display: flex; gap: 8px; justify-content: center; margin: 14px 0 4px; }
.sm-otp input { width: 42px; height: 52px; text-align: center; font-size: 20px; font-weight: 700; background: var(--control-bg); border: 1px solid var(--glass-border); color: var(--text); border-radius: 10px; outline: none; }
.sm-otp input:focus { border-color: var(--accent); }
.sm-otp-intent { color: var(--text); font-size: 13px; line-height: 1.6; }
.sm-otp-target { margin-top: 6px; color: var(--text-dim); font-size: 12px; line-height: 1.7; }
.sm-otp-target strong { color: var(--text); font-weight: 650; }
.sm-otp-error { min-height: 18px; color: #ff6961; font-size: 12px; line-height: 1.5; text-align: center; }
.sm-resend { display: block; margin: 8px auto 0; padding: 0; color: var(--accent); background: none; border: 0; font: inherit; font-size: 12px; cursor: pointer; }
.sm-resend:disabled { color: var(--text-faint); cursor: wait; }
