/* 对齐素材 web-invite-register-desktop / mobile */

:root {
  --gold: #e6a037;
  --gold-2: #f0b24a;
  --gold-deep: #c78d38;
  --ink: #050c18;
  --glass: rgba(14, 24, 38, 0.52);
  --line: rgba(255, 255, 255, 0.26);
  --muted: rgba(255, 255, 255, 0.62);
  --field: rgba(10, 18, 32, 0.55);
  --serif: "Cormorant Garamond", "Noto Serif SC", "Noto Naskh Arabic", Georgia, serif;
  --sans: "Outfit", "Noto Sans", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Thai", "Noto Sans Devanagari", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --arabic: "Noto Naskh Arabic", "Outfit", serif;
  --bg-ratio: 1.5; /* 1536/1024 */
}

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

html,
body {
  height: 100%;
}

body.invite {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--sans);
  color: #fff;
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
  overscroll-behavior: none;
}

html[dir="rtl"] body.invite,
html.is-rtl body.invite {
  font-family: var(--arabic);
}

html.is-zh body.invite {
  font-family: var(--sans);
}

html.is-zh .copy__title,
html.is-zh .card__title,
html.is-zh .success__title {
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  letter-spacing: 0.02em;
  font-weight: 600;
}

html.is-rtl .copy__title,
html.is-rtl .card__title,
html.is-rtl .success__title {
  font-family: var(--arabic);
  letter-spacing: 0;
  line-height: 1.25;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

/* 禁止 display:initial（会变成 inline，标题/副标并排错位） */
.desktop-only {
  display: block;
}
.mobile-only {
  display: none !important;
}

/* ——— Background：优先铺满宽度，避免 cover 把车裁得过大 ——— */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--ink);
}

/* 16:9 底图：cover 铺满常见显示器，不 letterbox */
.bg__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  background: var(--ink);
}

.bg__pattern {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(48vw, 640px);
  background: url("/invite/assets/web-invite-pattern.png") repeat;
  background-size: 190px;
  opacity: 0.32;
  mix-blend-mode: screen;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(110deg, #000 12%, transparent 86%);
  mask-image: linear-gradient(110deg, #000 12%, transparent 86%);
}

html.is-rtl .bg__pattern {
  inset: 0 0 0 auto;
  -webkit-mask-image: linear-gradient(250deg, #000 12%, transparent 86%);
  mask-image: linear-gradient(250deg, #000 12%, transparent 86%);
}

.bg__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(5, 12, 24, 0.22) 0%,
    rgba(5, 12, 24, 0.08) 38%,
    rgba(5, 12, 24, 0.22) 58%,
    rgba(5, 12, 24, 0.48) 100%
  );
  pointer-events: none;
}

html.is-rtl .bg__veil {
  background: linear-gradient(
    270deg,
    rgba(5, 12, 24, 0.22) 0%,
    rgba(5, 12, 24, 0.08) 38%,
    rgba(5, 12, 24, 0.22) 58%,
    rgba(5, 12, 24, 0.48) 100%
  );
}

/* ——— Lang：桌面在表单卡内右上角；手机仍固定视口 ——— */
.lang {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 50;
  width: max-content;
  pointer-events: none;
}

.lang__btn,
.lang__menu {
  pointer-events: auto;
}

.lang__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  min-width: 72px;
  max-width: min(168px, 46vw);
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 2;
}

#langCurrent {
  min-width: 0;
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-family: var(--sans);
}

.lang__menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 200px;
  max-width: min(260px, 80vw);
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 12px;
  background: rgba(12, 18, 28, 0.98);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 3;
}

.lang.is-open .lang__menu {
  display: block;
}

.lang__menu[hidden] {
  display: none !important;
}

.lang__menu li {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.lang__menu li:hover,
.lang__menu li[aria-selected="true"] {
  background: rgba(230, 160, 55, 0.16);
}

/* ——— Shell：桌面左文案垂直居中并略靠上；手机不受影响 ——— */
.shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: clamp(24px, 3.5vw, 56px);
  align-items: center;
  width: min(1080px, calc(100% - 80px));
  margin: 0 auto;
  min-height: 100dvh;
  padding: clamp(40px, 6vh, 72px) 0 clamp(56px, 9vh, 100px);
}

.copy {
  align-self: center;
  max-width: 28rem;
  text-align: start;
  margin-top: clamp(-68px, calc(-6vh - 20px), -40px);
}

.brand {
  display: inline-flex;
  margin-bottom: 20px;
}

.brand img {
  height: clamp(48px, 6.6vh, 64px);
  width: auto;
}

.copy__title {
  display: block;
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(34px, 3.4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  max-width: 12em;
  white-space: pre-line;
  text-align: start;
}

.copy__sub {
  display: block;
  margin: 0;
  max-width: 22em;
  font-size: 15px;
  font-weight: 400;
  color: var(--gold);
  line-height: 1.5;
  white-space: pre-line;
  text-align: start;
}

html.is-zh .copy__title {
  max-width: 10em;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.28;
  letter-spacing: 0.03em;
}

html.is-zh .copy__sub {
  font-size: 14px;
  max-width: 18em;
  letter-spacing: 0.04em;
}

html.is-rtl .copy__title {
  max-width: 12em;
  font-size: clamp(30px, 3vw, 42px);
}

html.is-rtl .copy__sub {
  max-width: 20em;
}

/* ——— Panel / Card ——— */
.panel {
  width: min(380px, 100%);
  margin-inline-start: auto;
  margin-inline-end: 0;
  justify-self: end;
  align-self: center;
  margin-top: clamp(12px, 2vh, 36px);
}

html.is-rtl .panel {
  margin-inline-start: 0;
  margin-inline-end: auto;
  justify-self: start;
}

.card {
  position: relative;
  padding: 22px 20px 16px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(28px) saturate(1.2);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
}

.card__title {
  margin: 0 0 16px;
  padding-inline: 0 64px;
  text-align: start;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

html.is-zh .card__title {
  font-size: 24px;
  letter-spacing: 0.04em;
}

.form {
  display: grid;
  gap: 13px;
}

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  text-align: start;
}

.field__box,
.phone-input,
.dial {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(6, 12, 22, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.field__input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13.5px;
  text-align: start;
}

.field__input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.field__input--invite {
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field__input--invite.is-locked,
.field__input--invite[readonly] {
  opacity: 0.92;
  cursor: default;
  color: rgba(255, 255, 255, 0.92);
}

.field__sep {
  display: none;
  width: 1px;
  height: 22px;
  margin: 0 10px;
  background: rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

.field__eye {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.7);
  padding: 0;
  flex-shrink: 0;
}

.field__eye svg {
  position: absolute;
  inset: 0;
  margin: auto;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.field__eye .eye-off {
  opacity: 0;
  transform: scale(0.7) rotate(-12deg);
  pointer-events: none;
}

.field__eye .eye-open {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.field__eye.is-on .eye-open {
  opacity: 0;
  transform: scale(0.7) rotate(12deg);
}

.field__eye.is-on .eye-off {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.field__eye:active {
  transform: scale(0.92);
}

.field__icon {
  margin-inline-end: 10px;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.invite-stack {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: start;
}

.field__tiny {
  font-size: 10px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.5);
}

.field--invite .field__input--invite {
  height: auto;
  min-height: 22px;
  padding: 0;
}

/* Desktop: 区号 / 号码 分两框；可搜索全区号 */
.phone-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.dial {
  justify-content: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.dial__flag {
  display: inline;
  font-size: 15px;
  line-height: 1;
}

.dial__chev {
  flex-shrink: 0;
  opacity: 0.72;
}

.phone-input {
  padding-inline-start: 14px;
  padding-inline-end: 14px;
}

.phone-input .field__input {
  width: 100%;
}

.field--phone {
  position: relative;
}

.dial-pop {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  width: min(320px, calc(100vw - 48px));
  max-height: min(320px, 52vh);
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 18, 28, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}

.dial-pop[hidden] {
  display: none !important;
}

.dial-pop__search {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  margin: 0 0 8px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  outline: 0;
  font-size: 13px;
  line-height: normal;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.dial-pop__search::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.dial-pop__list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.dial-pop__list::-webkit-scrollbar {
  width: 3px;
}

.dial-pop__list::-webkit-scrollbar-track {
  background: transparent;
}

.dial-pop__list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.dial-pop__list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.42);
}

.dial-pop__list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

/* 电脑端区号：显示国旗，不显国家名 */
@media (min-width: 821px) {
  .dial__flag {
    display: inline !important;
    font-size: 15px;
  }

  .dial-pop__flag {
    display: inline !important;
  }

  .dial-pop__list li {
    grid-template-columns: 28px auto;
  }

  .dial-pop__name {
    display: none;
  }

  .dial-pop__code {
    color: rgba(255, 255, 255, 0.92);
  }

  .dial-pop {
    width: min(180px, calc(100vw - 48px));
  }

  .phone-wrap {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  /* RTL 时表单控件保持 LTR 栅格，避免输入框被镜像挤窄 */
  html.is-rtl .card .form,
  html.is-rtl .phone-wrap,
  html.is-rtl .field__box,
  html.is-rtl .alts {
    direction: ltr;
  }

  html.is-rtl .field__label,
  html.is-rtl .card__title,
  html.is-rtl .or,
  html.is-rtl .signin,
  html.is-rtl .alt span {
    direction: rtl;
    text-align: right;
  }

  html.is-rtl .phone-wrap {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  html.is-rtl .field__box,
  html.is-rtl .phone-input,
  html.is-rtl .field__input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  html.is-rtl .panel {
    width: min(380px, 100%);
  }
}

.dial-pop__list li:hover,
.dial-pop__list li[aria-selected="true"] {
  background: rgba(230, 160, 55, 0.16);
}

.dial-pop__flag {
  font-size: 16px;
  line-height: 1;
}

.dial-pop__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dial-pop__code {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dial-pop__empty {
  display: block !important;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  cursor: default;
}

.form__err {
  display: none !important;
}

/* Toast */
.toast {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}

.toast[hidden] {
  display: none !important;
}

.toast__card {
  width: min(320px, 100%);
  padding: 22px 20px 16px;
  border-radius: 16px;
  background: rgba(16, 24, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.toast__msg {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.toast__ok {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1206;
  font-size: 14px;
  font-weight: 700;
}

body.toast-open {
  overflow: hidden;
}

.submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1206;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: filter 0.2s, transform 0.2s, opacity 0.2s;
}

.submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.submit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

.or::before,
.or::after {
  content: "";
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.alts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(8, 14, 24, 0.28);
  font-size: 11.5px;
  font-weight: 500;
  text-align: center;
  line-height: 1.25;
  transition: background 0.2s, border-color 0.2s;
}

.alt:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.4);
}

.signin {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.signin a {
  color: var(--gold);
  font-weight: 600;
}

.signin a:hover {
  color: var(--gold-2);
}

/* ——— Success ——— */
.success {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px 20px 48px;
}

.success[hidden] {
  display: none !important;
}

.success__card {
  width: min(420px, 100%);
  text-align: center;
}

.success__art {
  width: min(300px, 78vw);
  height: auto;
  margin: 0 auto 18px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
}

.success__title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 48px);
  font-weight: 600;
}

.success__sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.success__cta {
  border-radius: 14px;
}

body.is-success .shell,
body.is-success .lang {
  display: none;
}

body.is-success .bg__veil {
  background: rgba(5, 12, 24, 0.55);
}

/* ——— Mobile ——— */
@media (max-width: 820px) {
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: inline-flex !important;
  }
  h1.mobile-only,
  p.mobile-only {
    display: block !important;
  }
  .signin .mobile-only {
    display: inline !important;
  }

  /* 手机：顶对齐 cover，黑场贴合底图自带渐变 */
  .bg__photo {
    object-fit: cover;
    object-position: center top;
  }

  .bg__pattern {
    display: none;
  }

  .bg__veil,
  html.is-rtl .bg__veil {
    background: linear-gradient(
      to bottom,
      rgba(5, 12, 24, 0.18) 0%,
      rgba(5, 12, 24, 0.05) 26%,
      rgba(5, 12, 24, 0.12) 40%,
      rgba(5, 12, 24, 0.5) 100%
    );
  }

  .lang {
    position: fixed;
    top: 14px;
    inset-inline-end: 14px;
    z-index: 60;
  }

  .lang__btn {
    height: 30px;
    padding: 0 9px;
  }

  .card__title {
    padding-inline-end: 0;
  }

  .shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    width: calc(100% - 36px);
    min-height: 100dvh;
    min-height: 100svh;
    padding: 12px 0 max(28px, env(safe-area-inset-bottom));
    gap: 12px;
  }

  .copy {
    align-self: stretch;
    width: 100%;
    max-width: none;
    margin-top: auto;
    margin-inline: 0;
    margin-bottom: 0;
    padding-inline: 0;
    text-align: left;
  }

  html.is-rtl .copy {
    text-align: right;
  }

  /* logo / 主标题 / 副标题：LTR 靠左，阿语靠右 */
  .brand {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    margin-bottom: 10px;
  }

  html.is-rtl .brand {
    justify-content: flex-end;
  }

  .brand img {
    height: 34px;
  }

  .copy__title {
    max-width: none;
    width: 100%;
    margin-bottom: 6px;
    font-size: clamp(32px, 8vw, 40px);
    line-height: 1.12;
    text-align: left;
  }

  html.is-zh .copy__title {
    max-width: none;
    font-size: clamp(30px, 7.4vw, 36px);
  }

  html.is-rtl .copy__title {
    max-width: none;
    font-size: clamp(30px, 7.2vw, 36px);
    text-align: right;
  }

  .copy__sub {
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
    line-height: 1.4;
    max-width: none;
    width: 100%;
    margin-bottom: 4px;
    text-align: left;
  }

  html.is-rtl .copy__sub {
    text-align: right;
  }

  .panel {
    width: 100%;
    margin: 0;
    margin-top: 0;
    justify-self: stretch;
    align-self: stretch;
  }

  .card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .form {
    gap: 10px;
  }

  .phone-wrap {
    display: flex;
    align-items: center;
    grid-template-columns: none;
    gap: 0;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(10, 16, 26, 0.55);
  }

  .dial,
  .phone-input {
    border: 0;
    background: transparent;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
  }

  .dial {
    justify-content: flex-start;
    height: 50px;
    gap: 5px;
    font-size: 14px;
    width: auto;
    flex-shrink: 0;
  }

  .dial__flag {
    display: inline !important;
    font-size: 16px;
  }

  .dial__chev {
    width: 11px;
    height: 11px;
  }

  .field__sep {
    display: block;
  }

  .phone-input {
    flex: 1;
    min-width: 0;
    padding: 0;
  }

  .dial-pop {
    width: 100%;
    max-height: min(280px, 46vh);
  }

  .phone-input .field__input {
    height: 48px;
    font-size: 15px;
  }

  .field__box {
    border-radius: 14px;
    min-height: 50px;
    padding: 0 14px;
    background: rgba(10, 16, 26, 0.55);
    border-color: rgba(255, 255, 255, 0.26);
  }

  .field__box--invite {
    min-height: 54px;
  }

  .field__input {
    height: 48px;
    font-size: 15px;
  }

  .field--invite .field__input--invite {
    height: auto;
    min-height: 22px;
    font-size: 15px;
    font-weight: 700;
  }

  .field__tiny {
    margin-bottom: 2px;
  }

  /* 下载 / 网页同一行 */
  .alts {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .alt {
    justify-content: center;
    padding: 0 8px;
    min-height: 44px;
    border-radius: 12px;
    font-size: 11.5px;
    text-align: center;
    gap: 6px;
  }

  .alt span {
    line-height: 1.2;
  }

  html.is-rtl .alt {
    flex-direction: row;
  }

  .alt__chev {
    display: none !important;
  }

  .submit {
    height: 50px;
    margin-top: 4px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(90deg, #d4922e 0%, #c78d38 48%, #b87a28 100%);
    font-size: 15px;
  }

  html.is-rtl .submit {
    background: linear-gradient(270deg, #d4922e 0%, #c78d38 48%, #b87a28 100%);
  }

  .submit__arrow {
    display: inline !important;
    font-size: 17px;
    line-height: 1;
    font-weight: 500;
  }

  .or {
    margin: 14px 0 10px;
  }

  .signin {
    margin-top: 14px;
    font-size: 13px;
  }

  /* 手机阿语/RTL：防横向出屏；仅 is-rtl，不改其他语言布局 */
  html.is-rtl,
  html.is-rtl body.invite {
    overflow-x: hidden;
  }

  html.is-rtl .shell,
  html.is-rtl .panel,
  html.is-rtl .card,
  html.is-rtl .form,
  html.is-rtl .copy {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* 与桌面一致：表单控件 LTR 栅格，避免镜像把 min-content 撑破视口 */
  html.is-rtl .card .form,
  html.is-rtl .phone-wrap,
  html.is-rtl .field__box,
  html.is-rtl .alts {
    direction: ltr;
  }

  html.is-rtl .field__label,
  html.is-rtl .or,
  html.is-rtl .signin,
  html.is-rtl .alt span {
    direction: rtl;
    text-align: right;
  }

  html.is-rtl .field__box,
  html.is-rtl .phone-input,
  html.is-rtl .field__input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  html.is-rtl .alts {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  html.is-rtl .alt {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  html.is-rtl .alt span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  html.is-rtl .lang__menu {
    max-width: min(260px, calc(100vw - 28px));
  }

  html.is-rtl .lang__menu li {
    word-break: normal;
    overflow-wrap: anywhere;
  }

  html.is-rtl .copy__title,
  html.is-rtl .copy__sub,
  html.is-rtl .toast__msg {
    overflow-wrap: anywhere;
  }
}

@media (min-width: 821px) {
  .field__icon,
  .field__tiny,
  .submit__arrow,
  .alt__chev {
    display: none !important;
  }

  /* 桌面也显示区号（跟语言），仍不可点 */
  .dial__flag {
    display: none !important;
  }

  span.desktop-only,
  a.desktop-only,
  svg.desktop-only {
    display: inline-flex !important;
  }

  h1.desktop-only,
  h2.desktop-only,
  p.desktop-only {
    display: block !important;
  }

  .invite-stack {
    display: block;
  }

  .field--invite .field__input--invite {
    height: 42px;
  }
}

@media (max-width: 380px) {
  .shell {
    width: calc(100% - 24px);
  }

  .copy__title {
    font-size: 30px;
  }

  .brand {
    margin-bottom: 8px;
  }

  .brand img {
    height: 30px;
  }

  .alt {
    font-size: 10.5px;
    padding: 0 6px;
  }
}

@media (min-width: 821px) and (max-height: 760px) {
  .shell {
    min-height: auto;
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .brand {
    margin-bottom: 16px;
  }

  .card {
    padding: 20px 22px 16px;
  }

  .copy__title {
    font-size: clamp(32px, 3.8vw, 44px);
  }
}
