:root {
  --ink: #f2f2f2;
  --ink-muted: #8a8a8a;
  --ink-faint: #555555;
  --surface: rgba(12, 12, 12, 0.92);
  --surface-solid: #121212;
  --line: transparent;
  --accent: #e8e8e8;
  --accent-dim: #1a1a1a;
  --brand: #1a1a1a;
  --danger: #ff7a6e;
  --warn: #f0c35a;
  --radius: 16px;
  --radius-sm: 12px;
  --font: "Figtree", system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  /* Sudo close/title/menu bar. JS raises this inside the mini-app. */
  --host-h: 0px;
  --tab-h: 64px;
  /* Full bar footprint (pill + outer padding + fade room) */
  --tab-clear: calc(var(--tab-h) + 28px + var(--safe-b));
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: #050505;
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
}

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

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

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}

.bg-orb-a {
  width: 280px;
  height: 280px;
  top: -80px;
  right: -40px;
  background: radial-gradient(circle, #3a3a3a 0%, transparent 70%);
  animation: drift 14s ease-in-out infinite alternate;
}

.bg-orb-b {
  width: 320px;
  height: 320px;
  bottom: 10%;
  left: -100px;
  background: radial-gradient(circle, #1c1c1c 0%, transparent 70%);
  animation: drift 18s ease-in-out infinite alternate-reverse;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-20px, 24px) scale(1.08);
  }
}

.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  height: 100dvh;
  padding: calc(14px + var(--safe-t) + var(--host-h)) 16px calc(var(--tab-clear) + 12px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

body:has(#view-buy.has-results) .app,
body:has(#view-owned.is-active) .app,
body:has(#view-inbox.is-active) .app {
  height: auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 4px 0 2px;
  animation: rise 0.45s ease both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: none;
  background: #1a1a1a;
}

.brand-name {
  margin: 0;
  font-family: var(--display);
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: 0.01em;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.view.is-active {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  animation: rise 0.4s ease both;
}

.shop-panel {
  display: flex;
  flex-direction: column;
}

#view-buy.is-active:not(.has-results) .shop-panel {
  flex: 1 1 auto;
  justify-content: center;
  min-height: 0;
  padding-top: 8px;
  padding-bottom: 12px;
}

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

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

.hero-line-center {
  text-align: center;
}

.hero-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero-line h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.1rem, 8.5vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.hero-line p {
  margin: 10px 0 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 34ch;
}

.hero-line-center p {
  margin-left: auto;
  margin-right: auto;
}

.filters,
.owned-toolbar {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.owned-toolbar {
  flex-direction: row;
  align-items: flex-end;
}

.owned-toolbar .grow {
  flex: 1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

/* Supported platforms — single open row, no card */
.supported {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 2px 0 0;
  padding: 0;
  border: none;
  background: none;
}

.supported-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.supported-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 1px 4px;
  mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
}

.supported-row::-webkit-scrollbar {
  display: none;
}

.plat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.plat img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 5px;
  display: block;
}

.plat-wa img {
  width: 24px;
  height: 24px;
  border-radius: 0;
  filter: drop-shadow(0 0 0.5px rgba(255, 255, 255, 0.15));
}

.plat:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.plat-more {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.plat-plus {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
  opacity: 0.95;
}

.field input,
.field select,
.cpick-btn {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(9, 9, 9, 0.9);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cpick {
  position: relative;
}

.cpick-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.cpick-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  padding-right: 40px;
}

.cpick-btn:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.cpick.is-open .cpick-btn {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.07);
}

.cpick-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cpick-caret {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg);
  pointer-events: none;
  transition: transform 0.15s ease;
}

.cpick.is-open .cpick-caret {
  transform: rotate(225deg);
  margin-top: -2px;
}

.cpick-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: min(52vh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 12, 12, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 6px;
}

.cpick-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.cpick-option:hover,
.cpick-option:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.cpick-option[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.1);
}

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

.flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.06);
}

.flag-globe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 16px;
  font-size: 14px;
  line-height: 1;
  box-shadow: none;
  background: none;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-muted) 50%),
    linear-gradient(135deg, var(--ink-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.field input:focus,
.field select:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.field input::placeholder {
  color: var(--ink-faint);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: #f0f0f0;
  color: #0a0a0a;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn-search {
  margin-top: 4px;
  min-height: 52px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #f0f0f0;
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn-search:hover:not(:disabled) {
  background: linear-gradient(180deg, #222222 0%, #111111 100%);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-search:active:not(:disabled) {
  background: #050505;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-danger {
  background: rgba(255, 122, 110, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 122, 110, 0.3);
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.btn-buy {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.meta {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* last cards fully clear the floating tab bar */
  padding-bottom: 12px;
}

.card {
  background: linear-gradient(165deg, rgba(14, 14, 14, 0.96), rgba(10, 10, 10, 0.94));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 15px 14px;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  animation: rise 0.35s ease both;
  /* keep stack under tab chrome without visual clip */
  position: relative;
  z-index: 1;
  overflow: visible;
}

.card-tap {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.card-tap:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.card-tap:active {
  background: linear-gradient(165deg, rgba(18, 18, 18, 0.98), rgba(12, 12, 12, 0.96));
}

.card-tap:focus-visible {
  outline: 2px solid rgba(134, 245, 176, 0.45);
  outline-offset: 2px;
}

.card-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-footer .pricing {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.card-footer .card-actions {
  margin: 0;
  flex-shrink: 0;
}

.card:nth-child(2) {
  animation-delay: 0.04s;
}
.card:nth-child(3) {
  animation-delay: 0.08s;
}
.card:nth-child(4) {
  animation-delay: 0.12s;
}

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

.msisdn-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.msisdn {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}

.msisdn-expiry {
  margin: 6px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.btn-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-copy:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
}

.btn-copy:active {
  transform: scale(0.94);
  color: var(--accent);
}

.btn-copy:focus-visible {
  outline: 2px solid rgba(134, 245, 176, 0.55);
  outline-offset: 2px;
}

.btn-copy .copy-icon-svg {
  display: block;
  pointer-events: none;
}

.country-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.03);
}

.country-badge .flag {
  width: 18px;
  height: 13px;
}

.country-code {
  line-height: 1;
}

.chip-country {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chip-country .flag {
  width: 14px;
  height: 10px;
}

.card-meta {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-muted);
  border: 1px solid transparent;
}

.chip-feature {
  color: var(--accent);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.pricing {
  margin: 12px 0 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.pricing-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.pricing-main span {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  font-weight: 600;
}

.pricing strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 0;
}

.card-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.empty {
  margin-top: 28px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  padding: 0 12px;
}

.empty strong {
  color: var(--ink);
  font-weight: 600;
}

.empty code {
  font-size: 0.82em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--accent);
}

.empty a {
  color: var(--accent);
}

.setup-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setup-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.setup-copy,
.setup-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.setup-hint a {
  color: var(--accent);
}

.setup-box .btn-primary {
  width: 100%;
}

.msg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.msg-brand-icon {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.msg-brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.msg-brand-logo.is-hidden {
  display: none;
}

.msg-brand-fallback {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.msg-brand-fallback.is-hidden {
  display: none;
}

.msg-brand-text {
  min-width: 0;
}

.msg-from {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.msg-to {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.msg-text {
  margin: 10px 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-time {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: rise 0.45s ease both;
}

.top-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 140px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #1a1a1a;
  flex-shrink: 0;
}

.user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-sub {
  font-size: 0.62rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip[hidden] {
  display: none !important;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 16px 12px calc(10px + var(--safe-b));
  pointer-events: none;
  /* short fade — only just above the pill, not over half a card */
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(5, 5, 5, 0.55) 42%,
    rgba(5, 5, 5, 0.97) 78%
  );
}

.tabbar-inner {
  pointer-events: auto;
  max-width: 480px;
  margin: 0 auto;
  height: var(--tab-h);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 12, 12, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 52px;
  transition: color 0.15s ease, background 0.15s ease;
}

.tab-svg {
  width: 22px;
  height: 22px;
  fill: none !important;
  stroke: currentColor;
  stroke-width: 1.75;
  flex-shrink: 0;
}

.tab-label {
  color: inherit;
}

.tab.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.tab.is-active .tab-svg {
  stroke: #ffffff;
}

.tab:not(.is-active):active {
  background: rgba(255, 255, 255, 0.04);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-clear) + 8px);
  transform: translateX(-50%) translateY(12px);
  z-index: 40;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: 12px;
  background: #1a1a1a;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.is-error {
  border-color: rgba(255, 122, 110, 0.35);
  color: #ffc9c4;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0;
}

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

.modal-sheet {
  width: min(480px, 100%);
  max-height: min(92vh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(165deg, #141414 0%, #0c0c0c 55%, #090909 100%);
  border: none;
  border-radius: 24px 24px 0 0;
  padding: 12px 20px calc(18px + var(--safe-b));
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.5);
  animation: sheet-up 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.modal-sheet::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  margin: 4px auto 14px;
}

.modal-sheet.is-payment {
  text-align: center;
  padding-top: 10px;
}

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-pay-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.token-stack {
  position: relative;
  width: 84px;
  height: 84px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
}

.token-main {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  box-shadow: none;
  border: none;
  position: absolute;
  left: 0;
  top: 4px;
}

.token-badge {
  position: absolute;
  right: -2px;
  bottom: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0c0c0c;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.token-badge img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.pay-chain-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.pay-chip img {
  border-radius: 50%;
  display: block;
}

.pay-chip-usdt {
  background: rgba(255, 255, 255, 0.08);
  color: #e8e8e8;
}

.pay-chip-bsc {
  background: rgba(240, 185, 11, 0.1);
  color: #f0d78a;
}

.modal-sheet h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.modal-amount {
  margin: 10px 0 0 !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #f0f0f0 !important;
  line-height: 1.1 !important;
}

.modal-number {
  margin: 12px auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
}

.modal-number-flag {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.modal-number-flag .flag {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: none;
  border: none;
  background: transparent;
}

.modal-number-text {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}

.modal-sheet p#modal-body {
  margin: 8px 0 0;
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: left;
}

.modal-sheet.is-payment p#modal-body {
  text-align: center;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

.modal-wallet {
  margin: 14px 0 0;
  padding: 12px 4px;
  border-radius: 0;
  text-align: left;
  background: transparent;
  border: none;
}

.modal-wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
}

.modal-wallet-label {
  color: var(--ink-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modal-wallet-addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--ink);
  font-weight: 600;
}

.modal-wallet-bal-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.modal-wallet-bal-row strong {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.modal-wallet-bal-row .bal-unit {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

/* Inline USDT + small BNB pair — stays inside text flow */
.tok-pair {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 15px;
  vertical-align: -3px;
  margin: 0 1px 0 4px;
  flex: 0 0 auto;
  line-height: 0;
}

.tok-pair .tok-usdt,
.tok-pair .tok-bnb {
  border-radius: 50%;
  display: block;
  object-fit: cover;
  position: absolute;
}

.tok-pair .tok-usdt {
  width: 14px;
  height: 14px;
  left: 0;
  top: 0;
  z-index: 1;
}

.tok-pair .tok-bnb {
  width: 10px;
  height: 10px;
  right: 0;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 0 0 1.5px #0c0c0c;
  background: #0c0c0c;
}

.modal-wallet-status {
  margin: 10px 0 0 !important;
  padding: 8px 0 !important;
  border-radius: 0;
  font-size: 0.8rem !important;
  line-height: 1.35 !important;
  text-align: left !important;
  max-width: none !important;
  border: none !important;
  background: transparent !important;
}

.modal-wallet-status[data-level="loading"] {
  color: var(--ink-muted) !important;
}

.modal-wallet-status[data-level="ok"] {
  color: #f0f0f0 !important;
}

.modal-wallet-status[data-level="low"],
.modal-wallet-status[data-level="empty"] {
  color: #f0d48a !important;
}

.modal-wallet-status[data-level="missing"],
.modal-wallet-status[data-level="error"],
.modal-wallet-status[data-level="offline"] {
  color: #ffc0ba !important;
}

.modal-bullets {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.modal-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-muted);
  padding: 7px 0;
  border-radius: 0;
  background: transparent;
  border: none;
}

.modal-bullets li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent);
  box-shadow: none;
  opacity: 0.85;
}

.modal-bullets li .bullet-text {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
}

.modal-bullets li .bullet-text .tok-pair {
  margin-left: 5px;
  margin-right: 2px;
}

.modal-actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: sticky;
  bottom: 0;
  padding-top: 4px;
  background: linear-gradient(180deg, transparent, #090909 30%);
}

.modal-sheet.is-payment .btn-primary,
.modal-sheet.is-payment #modal-confirm.btn-pay {
  background: #f0f0f0;
  color: #0a0a0a;
  font-weight: 700;
  border: none;
  min-height: 50px;
  border-radius: 14px;
  box-shadow: none;
}

.modal-sheet.is-payment .btn-ghost,
.modal-sheet.is-payment .btn-pay-cancel {
  min-height: 50px;
  border-radius: 14px;
  border: none !important;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

#modal-confirm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.country-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0;
  border-radius: 0;
  border: none;
  white-space: nowrap;
  background: transparent;
}

.country-badge .flag {
  width: 18px;
  height: 13px;
  box-shadow: none;
  border: none;
  border-radius: 2px;
}

.country-code {
  line-height: 1;
}

.chip-country {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}

.chip-country .flag {
  width: 14px;
  height: 10px;
  box-shadow: none;
  border: none;
}

/* Borderless UI — fill + spacing only, no outlines */
.plat,
.field input,
.field select,
.cpick-btn,
.cpick-menu,
.btn,
.btn-search,
.btn-ghost,
.btn-danger,
.btn-buy,
.card,
.card-tap,
.country-badge,
.chip,
.chip-feature,
.empty code,
.setup-box,
.user-chip,
.tabbar-inner,
.toast,
.toast.is-error,
.modal-sheet,
.pay-chip,
.token-main,
.token-badge {
  border: none !important;
  border-color: transparent !important;
}

.plat,
.cpick-btn,
.cpick.is-open .cpick-btn,
.field input:focus,
.field select:focus,
.cpick-btn:focus,
.btn-search,
.btn-primary,
.card,
.tabbar-inner,
.toast,
.modal-sheet,
.token-badge,
.token-main,
.brand-logo,
.flag {
  box-shadow: none !important;
}

.card-tap:hover,
.card-tap:focus-visible,
.btn-copy:focus-visible,
.plat:hover,
.plat-more {
  border: none !important;
  outline: none !important;
}

.chip-feature {
  background: rgba(255, 255, 255, 0.06);
}

@media (min-width: 640px) {
  .app {
    padding-top: calc(28px + var(--safe-t) + var(--host-h));
  }
}
