/* ------------------------------------------------------------------
   Trust Wallet onboarding — static rebuild of the 5 onboarding screens.
   Pure HTML/CSS/JS. No network calls, no fonts or images from a CDN.
   ------------------------------------------------------------------ */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/Inter-Light-DbzEu6wT.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Inter-Regular-BpskOkD5.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Inter-Medium-BtfNrkJj.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Inter-SemiBold-C9_sHzqi.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Inter-Bold-BVTOCPiq.ttf') format('truetype');
}
/* 原包 fallback 字体：Binance Plex（Inter 缺字时回退，含日文等） */
@font-face {
  font-family: 'Binance Plex';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/BinancePlex-Light-Dk-luP3T.otf') format('opentype');
}
@font-face {
  font-family: 'Binance Plex';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/BinancePlex-Regular-BLuvvIRe.otf') format('opentype');
}
@font-face {
  font-family: 'Binance Plex';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/BinancePlex-Medium-BpU6gxin.otf') format('opentype');
}
@font-face {
  font-family: 'Binance Plex';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/BinancePlex-SemiBold--t69YBF_.otf') format('opentype');
}

:root {
  --brand: #392ffa;
  --brand-ink: #2f26d8;
  --ink: #0a0b0d;
  --ink-soft: #41465a;
  --ink-2: #5b6070;
  --muted: #8d93a3;
  --line: #e4e6ee;
  --field-border: #d9dbe7;
  --pill: #f4f4f6;
  --pill-ink: #b8bbc6;
  --row: #f4f4f6;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: 'Inter', 'Binance Plex', ui-sans-serif, system-ui, 'Yu Gothic UI', 'Yu Gothic', 'Hiragino Sans', 'Noto Sans JP', 'Meiryo', sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
button { font-family: inherit; }

/* ============================================================ shell */

.shell {
  display: grid;
  grid-template-columns: minmax(340px, 33.1%) 1fr;
  min-height: 100vh;
}

/* ---------------- left rail ---------------- */

.side {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 33px 32px 36px clamp(28px, 7.6vw, 120px);
  background: linear-gradient(135deg, #dee2f6 0%, #e6e9f8 32%, #f0f2fb 68%, #fcfcfe 100%);
}

.brand {
  width: 207px;
  max-width: 100%;
  height: auto;
}

.step {
  margin-top: 56px;
  font-size: 13px;
  line-height: 1;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.side__title {
  margin: 30px 0 0;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* 左栏插画：原包内嵌 Lottie（Security / Import Wallet），画布 1024 / 1080，
   这里把画布缩到原截图里的实际尺寸，靠负边距把图形对回原位。 */
.art {
  position: relative;
  width: 284.4px;
  height: 284.4px;
  margin: 49.5px 0 0 -56.6px;
  flex: none;
}

.art--laptop {
  width: 269.5px;
  height: 269.5px;
  margin: 118px 0 0 -7.4px;
}

.help {
  margin-top: auto;
  margin-bottom: 31vh;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  font-size: 13px;
  color: #6d7484;
  text-decoration: none;
}

.help svg { width: 14px; height: 14px; }

/* ---------------- right column ---------------- */

.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 124px clamp(28px, 12.2vw, 194px) 64px clamp(28px, 14.3vw, 227px);
}

.main__inner > form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.main__inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: calc(100vh - 188px);
  width: 100%;
  max-width: 644px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  font-size: 13px;
  color: #7d8494;
  text-decoration: none;
}

.back svg { width: 14px; height: 14px; }

.main__title {
  margin: 26px 0 0;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.connect-desc {
  margin: 22px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink);
  max-width: 520px;
}

/* ---------------- Ledger connect ---------------- */

.side__subtitle {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.ledger-label {
  margin: 22px 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.ledger-select {
  position: relative;
}

.ledger-select__btn {
  display: flex;
  align-items: center;
  width: 100%;
  height: 60px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  background: var(--pill);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.ledger-select__coin { margin-right: 12px; display: inline-flex; align-items: center; }
.ledger-select__coin svg { width: 22px; height: 22px; }
.ledger-select__name { flex: 1; text-align: left; }
.ledger-select__chevron { width: 16px; height: 16px; color: var(--muted); }

.ledger-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(20, 20, 40, 0.12);
  padding: 8px;
  z-index: 5;
}

.ledger-option {
  display: flex;
  align-items: center;
  width: 100%;
  height: 54px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.ledger-option:hover { background: #F4F4F6; }
.ledger-option__coin { margin-right: 12px; display: inline-flex; align-items: center; }
.ledger-option__coin svg { width: 22px; height: 22px; }


.icon1{
  width:24px;
  height:24px;
  margin-right: 10px;
  border-radius: 50%;
}

.ledger-art {
  position: relative;
  margin-top: 26px;
  width: 100%;
  height: 230px;
  border-radius: 18px;
  background: #F0F0F2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ledger-art svg { width: 100%; height: auto; }
.ledger-art > img:first-child { width: 100%; height: auto; }

/* Ledger 设备屏幕中央叠加的币种图标：按 ledger3.svg 屏框 rect 居中 */
.ledger-art__coin {
  position: absolute;
  left: 51.9%;
  top: 52.7%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  object-fit: contain;
  pointer-events: none;
}

#desc-icon img {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: contain;
}

.ledger-desc {
  margin: 22px 0 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 620px;
}

.ledger-desc__eth {
  display: inline-flex;
  vertical-align: -2px;
  margin: 0 2px;
}

/* ---------------- option rows ---------------- */

.list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 34px;
}

.section-label {
  margin: 30px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.row {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  height: 56px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--row);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.row:hover { background: #ececef; }
.row:active { background: #e4e4e8; }

.row__icon {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
}

.row__icon img { width: 26px; height: 26px; }
.row__icon svg { width: 22px; height: 22px; }

.row__label { flex: 1; min-width: 0; }

.row__chev {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: #a7abb9;
}

/* ---------------- fields ---------------- */

.field { margin-top: 26px; }

.form-roomy .field { margin-top: 40px; }

.form-roomy .field + .field { margin-top: 33px; }

.form-tight .field:first-of-type { margin-top: 11px; }

.field__label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.field__error {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: #e5484d;
}

.field--error .control__input,
.field--error .input {
  border-color: #e5484d;
}

.control { position: relative; }

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--field-border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input {
  height: 56px;
  padding: 0 48px 0 16px;
}

.textarea {
  height: 146px;
  padding: 14px 16px;
  resize: none;
  line-height: 1.45;
}

/* 助记词 / 私钥输入框：字符按密码圆点显示（Chrome / Edge 支持） */
.textarea--masked {
  -webkit-text-security: disc;
  text-security: disc;
}
.textarea--masked.textarea--plain {
  -webkit-text-security: none;
  text-security: none;
}

/* 眼睛切换按钮放在 textarea 右下角（与原截图红框位置对齐） */
.field .control__button--bottom {
  top: auto;
  right: 16px;
  bottom: 14px;
  transform: none;
  width: 28px;
  height: 28px;
}
.field .control__button--bottom svg { width: 16px; height: 16px; }

.input::placeholder,
.textarea::placeholder { color: #aeb2c1; }

.input:focus,
.textarea:focus {
  border-color: #6f66ff;
  box-shadow: 0 0 0 3px rgba(57, 47, 250, 0.1);
}

.input--plain { height: 50px; padding-right: 44px; }

.control__button {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5b6070;
  cursor: pointer;
}

.control__button:hover { background: rgba(11, 12, 25, 0.05); }
.control__button svg { width: 18px; height: 18px; }

.field__hint + .field__hint { margin-top: 0; }

.field__hint {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.32;
  color: var(--muted);
}

/* ---------------- buttons ---------------- */

.btn {
  height: 52px;
  min-width: 322px;
  padding: 0 36px;
  border: 0;
  border-radius: 26px;
  background: var(--pill);
  color: var(--pill-ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn:disabled {
  background: var(--pill);
  color: var(--pill-ink);
  cursor: default;
}

.btn:not(:disabled) {
  background: var(--brand);
  color: #fff;
}

.btn:not(:disabled):hover { background: var(--brand-ink); }

.btn--primary {
  background: var(--brand);
  color: #fff;
}

.btn--primary:not(:disabled):hover { background: var(--brand-ink); }

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
}

.footer {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 40px;
}

/* ============================================================ welcome (step 0) */

.welcome {
  display: grid;
  grid-template-columns: 45% 1fr;
  min-height: 100vh;
  overflow: hidden;
  background: #fcfcfc;
}

.welcome__left { position: relative; overflow: hidden; }

.welcome__ring {
  position: absolute;
  top: 0;
  left: 71.5%;
  width: 165px;
  height: auto;
}

.welcome__globe {
  position: absolute;
  top: 46px;
  left: -38.5%;
  width: 144.3%;
  aspect-ratio: 1 / 1;
}

.welcome__right {
  display: flex;
  flex-direction: column;
  padding: 23.2vh 32px 64px 0;
  min-width: 0;
}

.welcome__brand {
  width: 262px;
  height: auto;
}

.welcome__title {
  margin: 55px 0 0;
  width: 446px;
  max-width: 100%;
  font-size: 28px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: 446px;
  max-width: 100%;
  margin-top: 39px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.2;
  color: var(--ink-soft);
  cursor: pointer;
}

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

.check__box {
  position: relative;
  flex: 0 0 16px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border: 1.5px solid #cdd0dc;
  border-radius: 3.5px;
  background: #fff;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.check__box svg {
  width: 10px;
  height: 10px;
  opacity: 0;
  color: #fff;
}

.check input:checked + .check__box {
  border-color: var(--brand);
  background: var(--brand);
}

.check input:checked + .check__box svg { opacity: 1; }

.check input:focus-visible + .check__box {
  box-shadow: 0 0 0 3px rgba(57, 47, 250, 0.18);
}

.welcome__actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 446px;
  max-width: 100%;
  margin-top: 30px;
}

.choice {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 26px;
  background: var(--pill);
  color: var(--pill-ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.choice:disabled { cursor: default; }

.choice:not(:disabled) {
  background: var(--brand);
  color: #fff;
}

.choice:not(:disabled):hover { background: var(--brand-ink); }

.choice--soft:not(:disabled) {
  background: #EBECEE;
  color: #000;
}

.choice--soft:not(:disabled):hover { background: #E3E4E7; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 446px;
  max-width: 100%;
  margin-top: 49px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.divider > span { white-space: nowrap; }

.divider::before,
.divider::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.divider__icon {
  display: inline-flex;
  vertical-align: -3px;
  margin-left: 7px;
  color: var(--muted);
}

.divider__icon svg { width: 15px; height: 15px; }

.qr-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 29px;
  width: max-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.qr-link svg { width: 17px; height: 17px; }

/* ============================================================ toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 42px;
  transform: translate(-50%, 12px);
  max-width: min(460px, calc(100vw - 48px));
  padding: 13px 22px;
  border-radius: 14px;
  background: rgba(10, 11, 13, 0.92);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

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

/* ============================================================ responsive */

@media (max-width: 1080px) {
  .shell { grid-template-columns: 300px 1fr; }
  .side { padding-left: 32px; }
  .art { width: 235px; height: 235px; margin-left: -40px; }
  .main { padding: 72px 32px 48px; }
  .main__inner > form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.main__inner { max-width: 560px; }
  .main__title, .side__title { font-size: 26px; }
  .btn { min-width: 240px; }
}

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { min-height: 0; padding: 26px 24px 30px; }
  .brand { width: 200px; }
  .step { margin-top: 34px; }
  .side__title { font-size: 24px; margin-top: 16px; }
  .art { display: none; }
  .help { margin: 30px 0 0; }
  .main { padding: 34px 24px 40px; min-height: 0; }
  .main__title { font-size: 24px; margin-top: 18px; }
  .list { margin-top: 24px; }
  .footer { padding-top: 28px; }
  .welcome { grid-template-columns: 1fr; }
  .welcome__left { display: none; }
  .welcome__right { padding: 36px 24px 48px; }
  .welcome__brand { width: 200px; }
  .welcome__title { width: 100%; margin-top: 34px; font-size: 24px; line-height: 1.4; }
  .checks, .welcome__actions, .divider { width: 100%; }
  .welcome__actions { margin-top: 32px; }
  .divider { margin-top: 34px; white-space: normal; }
}
