@font-face {
  font-family: "World Pro";
  src: url("/fonts/WorldProMVP.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --text: #0c0c0c;
  --muted: #8e8e93;
  --line: #e5e5ea;
  --back: #f2f2f7;
  --green: #22c55e;
  --stage: #f9f9f9;
  --safe-top: max(12px, env(safe-area-inset-top));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
  --font: "World Pro", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--stage);
  color: var(--text);
  font-family: var(--font);
  font-weight: 350;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.stage {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 24px;
  gap: 18px;
}

.brand {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: #111;
}

.hint {
  font-size: 13px;
  color: var(--muted);
}
.hint a:hover { color: #111; }

.device {
  position: relative;
  width: min(393px, 100%);
  height: min(852px, calc(100svh - 96px));
  min-height: 700px;
  background: var(--bg);
  border-radius: 54px;
  box-shadow:
    0 0 0 12px #f4f4f4,
    0 0 0 13px #e8e8e8,
    0 24px 60px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.statusbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  height: 54px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  padding: 0 28px 8px;
  pointer-events: none;
}

.statusbar .time {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  padding-bottom: 2px;
}

.status-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #111;
  padding-bottom: 3px;
}

.island {
  width: 118px;
  height: 34px;
  background: #0a0a0a;
  border-radius: 20px;
}

.app {
  position: relative;
  height: 100%;
}

.screen {
  display: none !important;
  height: 100%;
  padding: 62px 24px 34px;
  flex-direction: column;
  overflow: auto;
}

.screen.is-active {
  display: flex !important;
  animation: screen-in 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop-in {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes tap-pop {
  0% { transform: scale(1); }
  40% { transform: scale(0.94); }
  100% { transform: scale(1); }
}

@keyframes amt-tick {
  0% { transform: scale(1); }
  45% { transform: scale(1.035); }
  100% { transform: scale(1); }
}

.anim-rise {
  animation: rise-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--d, 0ms);
}

.anim-fade {
  animation: fade-in 0.4s ease both;
}

.anim-pop {
  animation: pop-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.buy-asset-btn {
  margin-top: 8px;
  width: fit-content;
  color: var(--muted);
  font-size: 15px;
  font-weight: 350;
  text-align: left;
}

.buy-asset-btn:active {
  opacity: 0.7;
}

.buy-asset-row {
  margin-top: 18px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--back);
  text-align: left;
}

.buy-asset-row .icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.buy-asset-row span:not(.buy-asset-chev) {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.buy-asset-row strong {
  font-size: 16px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.buy-asset-row small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 450;
}

.buy-asset-chev {
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.buy-asset-row:active {
  transform: scale(0.985);
}

.dir-toggle {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: var(--back);
  width: 100%;
}

.dir-toggle button {
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 550;
  letter-spacing: -0.02em;
  color: #8a8a8e;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.dir-toggle button.is-on {
  background: #111;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.14);
}

.keypad button {
  transition: transform 0.15s ease;
  background: transparent;
}

.keypad button.is-tap {
  animation: tap-flash 0.2s ease;
}

@keyframes tap-flash {
  0% { transform: scale(1); background: transparent; }
  35% { transform: scale(0.94); background: #ececef; }
  100% { transform: scale(1); background: transparent; }
}

.amount-display.is-tick #buy-amount,
.amount-display.is-tick #swap-amount-view {
  display: inline-block;
  animation: amt-tick 0.18s ease;
}

.actions button,
.asset,
.net-row,
.act-row {
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.actions button:active,
.asset:active,
.net-row:active {
  transform: scale(0.98);
}

.btn {
  transition: transform 0.14s ease, opacity 0.14s ease, box-shadow 0.2s ease;
}

.assets .asset {
  animation: rise-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.assets .asset:nth-child(1) { animation-delay: 20ms; }
.assets .asset:nth-child(2) { animation-delay: 45ms; }
.assets .asset:nth-child(3) { animation-delay: 70ms; }
.assets .asset:nth-child(4) { animation-delay: 95ms; }
.assets .asset:nth-child(5) { animation-delay: 120ms; }
.assets .asset:nth-child(6) { animation-delay: 145ms; }
.assets .asset:nth-child(7) { animation-delay: 170ms; }
.assets .asset:nth-child(8) { animation-delay: 195ms; }
.security-card {
  margin-top: 28px;
  text-align: left;
}

.security-card .btn {
  margin-top: 14px;
  width: 100%;
}

.security-card p {
  margin-top: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .screen.is-active,
  .anim-rise,
  .anim-fade,
  .anim-pop,
  .assets .asset,
  .keypad button.is-tap,
  .amount-display.is-tick #buy-amount,
  .amount-display.is-tick #swap-amount-view {
    animation: none !important;
  }
}

.screen.has-tabs {
  padding-bottom: 88px;
}

.back {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--back);
  color: #000;
  align-self: flex-start;
}

.back svg {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.title {
  margin-top: 18px;
  flex: 0 0 auto;
  font-size: 34px;
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.flow {
  position: relative;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.flow::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 44px;
  bottom: 44px;
  width: 1px;
  background: var(--line);
}

.leg {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  position: relative;
}

.icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  background: transparent;
}

.icon[src*="usdt"] {
  object-fit: cover;
  padding: 0;
  background: transparent;
}

.icon svg {
  display: block;
  width: 44px;
  height: 44px;
  overflow: visible;
  shape-rendering: geometricPrecision;
}

.leg-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.leg-copy strong {
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.leg-copy span {
  font-size: 15px;
  font-weight: 350;
  color: var(--muted);
  letter-spacing: 0;
  line-height: 1.3;
}

.leg-amt {
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -0.01em;
  white-space: nowrap;
  line-height: 1.2;
}

.meta {
  margin-top: 20px;
  padding-top: 22px;
  border-top: 1px solid #ebecf0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fade-in 0.45s ease both;
  animation-delay: 120ms;
}

.meta > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.meta dt {
  font-size: 15px;
  font-weight: 350;
  color: var(--muted);
  line-height: 1.3;
}

.meta dd {
  font-size: 15px;
  font-weight: 450;
  letter-spacing: 0;
  text-align: right;
  line-height: 1.2;
}

.provider {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.uni {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.footer {
  margin-top: auto;
  padding-top: 24px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  border-radius: 28px;
  background: #000;
  color: #fff;
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1.2;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:hover { opacity: 0.92; }
.btn:active { transform: scale(0.985); }

.buy-asset {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.amount-wrap {
  position: relative;
  margin-top: 28px;
  width: 100%;
}

.amount-wrap .amount-display {
  margin-top: 0;
  padding-right: 72px;
  box-sizing: border-box;
}

.amount-display {
  margin-top: 28px;
  width: 100%;
  text-align: left;
  font-size: clamp(26px, 8.2vw, 52px);
  font-weight: 550;
  letter-spacing: -0.04em;
  line-height: 1.05;
  overflow: hidden;
}

#screen-swap .amount-display {
  margin-top: 18px;
}

#buy-amount,
#swap-amount-view {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buy-fiat {
  margin-top: 8px;
  color: var(--muted);
  font-size: 18px;
}

.keypad {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 8px;
  padding: 8px 0 18px;
}

.keypad button {
  height: 52px;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 500;
  background: transparent;
}

.keypad button:active {
  background: #ececef;
}

.done {
  margin-top: 48px;
}

.done-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
}
.done-icon svg { width: 56px; height: 56px; display: block; }

.done-copy {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  max-width: 16em;
}

.done-amt {
  margin-top: 18px;
  font-size: 16px;
  font-weight: 550;
}

.home-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.home-mark {
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0.22em;
}

.home-hello {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 550;
  letter-spacing: -0.03em;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 550;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.login-hero {
  width: 88px;
  height: 88px;
  margin: 56px auto 0;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
}

.login-error {
  margin-top: 28px;
  font-size: 15px;
  font-weight: 450;
  color: #d21f3c;
  line-height: 1.4;
}

.btn-ico {
  display: block;
  flex-shrink: 0;
}

.btn-ghost {
  background: var(--back);
  color: #111;
}

.account-card {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.account-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 24px;
  font-weight: 550;
  margin-bottom: 10px;
}

.account-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.account-card strong {
  font-size: 22px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.account-card span {
  font-size: 15px;
  color: var(--muted);
}

.field-label {
  margin-top: 22px;
  font-size: 13px;
  font-weight: 450;
  color: var(--muted);
}

.field-wrap {
  position: relative;
  margin-top: 8px;
  width: 100%;
}

.field-wrap .field {
  margin-top: 0;
  padding-right: 72px;
}

.field {
  margin-top: 8px;
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 16px;
  background: var(--back);
  padding: 0 16px;
  font: inherit;
  font-size: 17px;
  font-weight: 450;
  letter-spacing: -0.02em;
}

.field:focus { outline: 2px solid #111; outline-offset: 0; }

.avail {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.max-btn {
  flex: 0 0 auto;
  height: 28px;
  min-width: 52px;
  padding: 0 12px;
  border-radius: 999px;
  background: #111 !important;
  color: #fff !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  z-index: 2;
}

.max-btn.in-field {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.max-btn.in-amount {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.max-btn:disabled {
  opacity: 0.45;
}

.max-btn:active {
  opacity: 0.85;
}

.max-btn.in-field:active,
.max-btn.in-amount:active {
  transform: translateY(-50%) scale(0.96);
}

.pick {
  margin-top: 18px;
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  border-bottom: 1px solid #f0f0f2;
}

.quote {
  margin-top: 18px;
  padding: 16px 0;
  border-radius: 0;
  background: transparent;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.letter {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f2f2f7;
  color: #111;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 550;
}

.btn[disabled] { opacity: 0.45; pointer-events: none; }

.balance-label {
  margin-top: 36px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 350;
  cursor: pointer;
  user-select: none;
}

body.is-bal-refreshing .balance,
body.is-bal-refreshing .balance-krw,
body.is-bal-refreshing .krw-cash {
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.balance {
  margin-top: 2px;
  font-size: 44px;
  font-weight: 550;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.balance-krw {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 350;
  letter-spacing: -0.01em;
}

.krw-cash {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 450;
  color: #111;
}

.net-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
}

.net-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 16px 56px 16px 0;
  text-align: left;
  border-bottom: 1px solid #f0f0f2;
}

.net-row:last-child { border-bottom: 0; }

.net-row strong {
  font-size: 16px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.net-row small {
  font-size: 13px;
  color: var(--muted);
}

.net-row .net-std {
  display: inline-block;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f2f2f7;
  color: #111;
  font-size: 11px;
  font-weight: 450;
  width: fit-content;
}

.net-row.is-on {
  background: transparent;
}

.net-row.is-on strong {
  color: #111;
}

.net-row.is-on::after {
  content: "SELECTED";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #111;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.04em;
  display: block;
  place-items: unset;
}

.selected-card {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f2f2f7;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.selected-label {
  font-size: 11px;
  font-weight: 450;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.selected-card strong {
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.selected-card small {
  font-size: 13px;
  color: var(--muted);
}

.section-head {
  margin-top: 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-head .assets-title {
  margin-top: 0;
}

.linkish {
  font-size: 13px;
  font-weight: 450;
  color: var(--muted);
}

.activity {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
}

.act-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 0;
  text-align: left;
  border-bottom: 1px solid #f0f0f2;
}

.act-row:last-child { border-bottom: 0; }

.act-ico-wrap {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f2f2f7;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 550;
}

.act-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.act-copy strong {
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.act-copy small {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.act-amt {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  font-weight: 450;
}

.act-amt small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 350;
}

.activity-empty {
  padding: 18px 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.actions {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.actions button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 0 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 450;
  color: #111;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.act-ico {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f2f2f7;
  color: #111;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 400;
}

.assets-title {
  margin-top: 36px;
  margin-bottom: 4px;
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.assets-head { display: none; }

.assets {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
}

.asset {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  text-align: left;
  border-bottom: 1px solid #f0f0f2;
}

.asset.is-muted {
  opacity: 0.42;
}

.asset:last-child { border-bottom: 0; }

.asset-copy,
.asset-amt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.asset-amt {
  text-align: right;
}

.asset strong {
  font-size: 16px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.asset small {
  font-size: 13px;
  font-weight: 350;
  color: var(--muted);
}

.recv-assets {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 6px;
}

.recv-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 450;
  color: var(--muted);
}

.recv-chip .icon,
.recv-chip .letter {
  width: 40px;
  height: 40px;
}

.recv-chip.is-on {
  outline: none;
  color: #111;
  font-weight: 550;
}

.recv-chip.is-on .icon {
  box-shadow: 0 0 0 2px #111;
}

.recv-name {
  margin-top: 28px;
  font-size: 20px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.addr-card { display: none; }

.addr {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 450;
  line-height: 1.5;
  word-break: break-all;
  text-align: left;
  letter-spacing: -0.01em;
}

.tabbar {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 7;
  margin: 0 16px;
  padding: 6px;
  border-radius: 24px;
  background: rgba(242, 242, 247, 0.92);
  backdrop-filter: blur(12px);
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.tab-pill {
  position: absolute;
  top: 6px;
  left: 0;
  height: calc(100% - 12px);
  width: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), width 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 0;
}

.tabbar.is-on {
  display: grid;
}

.tabbar button {
  position: relative;
  z-index: 1;
  height: 40px;
  border-radius: 22px;
  font-size: 12px;
  font-weight: 450;
  color: var(--muted);
  background: transparent;
  transition: color 0.2s ease;
}

.tabbar button.is-on {
  background: transparent;
  color: #111;
  font-weight: 550;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  z-index: 40;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(17, 17, 17, 0.92);
  color: #fff;
  font-size: 14px;
  font-weight: 450;
  letter-spacing: -0.01em;
  line-height: 1.35;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.toast.is-err {
  background: rgba(176, 0, 32, 0.94);
}

.alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.alert-overlay.is-on {
  opacity: 1;
  pointer-events: auto;
}

.alert-card {
  width: min(340px, 100%);
  padding: 22px 20px 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  text-align: left;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.alert-overlay.is-on .alert-card {
  transform: translateY(0) scale(1);
}

.alert-card strong {
  display: block;
  font-size: 18px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.alert-card p {
  margin-top: 10px;
  color: #3a3a3c;
  font-size: 15px;
  font-weight: 350;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.alert-card .btn {
  margin-top: 18px;
  width: 100%;
}

.install-banner {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 35;
  width: min(393px, calc(100vw - 24px));
  transform: translateX(-50%) translateY(120%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.install-banner.is-on {
  transform: translateX(-50%) translateY(0);
}

.install-banner strong {
  display: block;
  font-size: 14px;
  font-weight: 550;
}

.install-banner p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.install-banner .btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 72px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

.install-x {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

@media (max-width: 480px) {
  body { background: var(--bg); }
  .stage { padding: 0; gap: 0; min-height: 100svh; }
  .brand, .hint { display: none; }
  .device {
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    border-radius: 0;
    box-shadow: none;
  }
  .statusbar { display: none; }
  .screen { padding-top: calc(18px + var(--safe-top)); }
  .tabbar { bottom: calc(10px + var(--safe-bottom)); }
}

.shell-lead {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 350;
  color: var(--muted);
  line-height: 1.45;
}

.flow .leg {
  transition: transform 0.2s ease, background 0.2s ease;
}

.flow .leg:hover {
  transform: translateX(2px);
}

.btn.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

.shell-card {
  margin-top: 28px;
  padding: 22px;
  border-radius: 24px;
  background: var(--back);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.shell-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.shell-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 20px;
}

.shell-card strong {
  display: block;
  font-size: 17px;
  font-weight: 550;
}

.shell-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}

/* —— Coin detail —— */
.coin-top {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin-bottom: 8px;
}

.coin-top .back {
  position: static;
  margin: 0;
}

.coin-top-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.coin-top-mid .icon,
.coin-top-mid .letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.coin-top-mid strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.net-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 10px 0 18px;
}

.net-pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: #f2f2f7;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.net-pill.is-on {
  background: #111;
  color: #fff;
}

.coin-bal {
  text-align: center;
  font-size: 40px;
  font-weight: 550;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.coin-fiat {
  text-align: center;
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
}

.coin-actions {
  margin-top: 22px;
  grid-template-columns: repeat(3, 1fr);
}

.coin-addr-block {
  margin-top: 28px;
  padding-top: 4px;
}

.coin-addr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.coin-addr-head strong {
  font-size: 15px;
  font-weight: 600;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
}

.icon-btn:active {
  background: #f2f2f7;
}

.coin-addr {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

.explorer-btn {
  display: block;
  width: 100%;
  margin: 16px 0 8px;
  padding: 14px;
  border-radius: 14px;
  background: #f2f2f7;
  font-size: 14px;
  font-weight: 550;
  text-align: center;
}

.hist-date {
  margin: 14px 0 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.act-amt.is-in {
  color: var(--green);
}

.act-row {
  cursor: pointer;
}

/* —— Tx detail —— */
.txd-top {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin-bottom: 18px;
}

.txd-top .back {
  position: static;
  margin: 0;
}

.txd-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 550;
}

.txd-status span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.txd-status.is-fail span {
  background: #ef4444;
}

.txd-status.is-pend span {
  background: #f59e0b;
}

.txd-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.txd-hero .icon,
.txd-hero .letter {
  width: 44px;
  height: 44px;
}

.txd-hero strong {
  font-size: 28px;
  font-weight: 550;
  letter-spacing: -0.03em;
}

.txd-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.txd-row {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 10px;
  align-items: start;
}

.txd-row > span:first-child {
  font-size: 14px;
  color: var(--muted);
  padding-top: 2px;
}

.txd-val {
  min-width: 0;
}

.txd-val-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.txd-val-line p {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 450;
  word-break: break-all;
  line-height: 1.4;
}

.txd-val-line a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.txd-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f2f2f7;
  font-size: 11px;
  font-weight: 500;
  color: #444;
}

.txd-copy {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
