.trade-popup {
  position: fixed;
  z-index: 60;
  inset-inline-end: max(24px, env(safe-area-inset-right));
  inset-block-end: max(24px, env(safe-area-inset-bottom));
  inline-size: min(400px, calc(100% - 32px));
  display: none;
}
.trade-popup.is-visible {
  display: block;
  animation: tp-in .24s ease-out;
}
@keyframes tp-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.trade-popup-card {
  position: relative;
  padding: 20px 20px 16px;
  border: 1px solid #2d625a;
  border-radius: 18px;
  background: radial-gradient(ellipse at top right, #21544a, transparent 64%), #102a27;
  color: #f3fff9;
  box-shadow: 0 18px 48px rgba(9, 34, 30, .32);
}
.trade-popup-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 40px;
}
.trade-popup-logo {
  display: block;
  border-radius: 7px;
  flex: none;
}
.trade-popup-badge {
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #a9c6bd;
  line-height: 1.3;
}
.trade-popup-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.trade-popup-link:hover {
  text-decoration: none;
}
.trade-popup-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  border-radius: 10px;
}
.trade-popup h2 {
  margin: 12px 0 7px;
  font-size: 22px;
  line-height: 1.24;
  letter-spacing: -.2px;
  overflow-wrap: anywhere;
}
.trade-popup p {
  margin: 0 0 14px;
  color: #d4e9e3;
  font-size: 13.5px;
  line-height: 1.55;
}
.trade-popup-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #9af4d8;
  color: #102a27;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}
.trade-popup-link:hover .trade-popup-action,
.trade-popup-link:focus-visible .trade-popup-action {
  background: #c0ffe9;
}
.trade-popup-note {
  display: block;
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #a9c6bd;
}
.trade-popup-secondary {
  display: inline-block;
  margin-top: 7px;
  font-size: 11.5px;
  color: #c0ffe9;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.trade-popup-secondary:hover {
  color: #fff;
}
.trade-popup-close {
  position: absolute;
  z-index: 1;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  inline-size: 34px;
  block-size: 34px;
  border: 1px solid #679187;
  border-radius: 50%;
  background: #183a34;
  color: #f3fff9;
  font: 20px/1 sans-serif;
  cursor: pointer;
}
.trade-popup-close:hover {
  background: #28524a;
}
.trade-popup-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .trade-popup {
    inset-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right));
    inset-block-end: max(8px, env(safe-area-inset-bottom));
    inline-size: auto;
  }
  .trade-popup-card {
    padding: 12px 12px 10px;
    border-radius: 14px;
  }
  .trade-popup-top {
    padding-right: 36px;
  }
  .trade-popup h2 {
    margin: 7px 0 4px;
    font-size: 17px;
    line-height: 1.25;
  }
  .trade-popup p {
    display: none;
  }
  .trade-popup-action {
    min-height: 44px;
    font-size: 14px;
    padding: 8px 12px;
  }
  .trade-popup-note {
    font-size: 10px;
    margin-top: 7px;
  }
  .trade-popup-secondary {
    display: block;
    font-size: 10.5px;
    margin-top: 6px;
  }
  .trade-popup-close {
    inline-size: 30px;
    block-size: 30px;
    font-size: 18px;
    top: 8px;
    right: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .trade-popup.is-visible { animation: none; }
}
