/* Phase 2 — shared mobile layout overrides. Desktop stays as-is. */

html {
  -webkit-text-size-adjust: 100%;
}

img,
svg,
video {
  max-width: 100%;
}

.bg-image img {
  max-width: none;
}

.face-match-form {
  text-align: center;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.fm-title {
  color: #EB8153;
  font-weight: 700;
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.fm-copy {
  color: #A3A3A3;
  font-size: 0.95rem;
  margin: 0 0 1.15rem;
  line-height: 1.55;
}

.fm-alert {
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  text-align: left;
}

.fm-alert-warn {
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.35);
  color: #ffd27a;
}

.fm-alert-error {
  background: rgba(255, 80, 80, 0.15);
  border: 1px solid rgba(255, 80, 80, 0.45);
  color: #ffb4b4;
}

.fm-link-btn {
  display: block;
  width: 100%;
  background: #EB8153;
  color: #fff !important;
  font-weight: 600;
  padding: 0.85rem;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  margin-bottom: 0.85rem;
}

.fm-hint {
  color: #A3A3A3;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.fm-fields {
  margin: 0;
}

.fm-dropzone {
  display: block;
  background: #3B3363;
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1.75rem 1rem;
  cursor: pointer;
  margin-bottom: 0.85rem;
}

.fm-dropzone-sm {
  padding: 1.15rem 1rem;
}

.fm-dropzone-status {
  color: #EB8153;
  font-weight: 600;
}

.fm-dropzone-ok {
  color: #8aff9e;
  font-weight: 600;
}

.fm-dropzone-title {
  color: #fff;
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.fm-dropzone-sub {
  color: #A3A3A3;
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

.fm-submit {
  width: 100%;
  background: #EB8153;
  color: #fff;
  padding: 0.8rem;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  min-height: 48px;
}

.fm-submit.is-disabled,
.fm-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fm-preview-wrap {
  margin: 0 0 0.85rem;
}

.fm-preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(138, 255, 158, 0.45);
  margin-bottom: 0.5rem;
}

.fm-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0.85;
  pointer-events: none;
}

.live-rates-section {
  position: relative;
  z-index: 10;
  isolation: isolate;
}

.live-rates-section .section-subtitle {
  color: #EB8153 !important;
  opacity: 1 !important;
}

.live-rates-section .section-title {
  color: #ffffff !important;
  opacity: 1 !important;
}

.live-rates-section .trade-tab-wrap {
  position: relative;
  z-index: 2;
}

.live-rates-section .trade-tab-bar {
  background: #2c254a;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.live-rates-section .trade-tab-btn {
  color: #ffffff;
  opacity: 1;
}

.live-rates-section .trade-tab-btn.active {
  background: #EB8153;
  color: #ffffff;
}

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

.guest-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px 8px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.guest-nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

@media (max-width: 991.98px) {
  .header .dropdown-menu {
    max-width: min(320px, calc(100vw - 24px));
  }

  .header .header-info {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  #dashboard-adjust {
    margin-top: 0 !important;
  }

  .content-body {
    padding-left: 10px;
    padding-right: 10px;
  }

  .content-body.order-trade-page {
    padding-bottom: 96px;
  }

  .order-trade-page .form-head {
    margin-bottom: 10px !important;
  }

  .order-trade-page .container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
  }

  .order-trade-page .main-form,
  .order-trade-page .summary-wrapper {
    flex: 1 1 100%;
    max-width: 100% !important;
    width: 100%;
    margin-top: 0 !important;
  }

  .order-trade-page #from-to,
  .order-trade-page .form-section label {
    display: block;
    overflow: visible;
    line-height: 1.4;
    margin-bottom: 8px;
  }

  .order-trade-page .input-row {
    width: 100%;
    box-sizing: border-box;
  }

  .order-trade-page .public-address-card input.address {
    width: 100%;
    min-height: 48px;
    color: #fff;
    box-sizing: border-box;
  }

  .order-page {
    padding-bottom: 88px;
  }

  .order-page .container-fluid {
    padding-left: 8px;
    padding-right: 8px;
  }

  .order-page-head {
    margin-bottom: 10px !important;
  }

  .order-page-title {
    font-size: 0.98rem !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .form-head h2,
  .form-head .title,
  #dashboard-adjust-size,
  #by-crypto-adjust {
    font-size: 1.25rem;
    line-height: 1.35;
  }

  /* Guest landing nav: restore links behind hamburger */
  .fixed-nav {
    padding: 10px 16px;
  }

  .guest-nav-toggle {
    display: flex;
  }

  .nav-content {
    gap: 12px;
    position: relative;
  }

  .fixed-nav.is-open .nav-links {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: min(280px, calc(100vw - 32px));
    padding: 8px 0;
    background: rgba(20, 16, 40, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    z-index: 1100;
  }

  .fixed-nav.is-open .nav-links a {
    display: block;
    padding: 12px 16px;
    min-height: 44px;
  }

  .login-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Order chat */
  .chat-card {
    height: min(52dvh, 420px);
    min-height: 320px;
  }

  .order-chat-layout {
    margin-left: 0;
    margin-right: 0;
  }

  .order-chat-side {
    min-height: 0 !important;
    margin-bottom: 8px !important;
  }

  .order-chat-main {
    margin-bottom: 0 !important;
  }

  .order-chat-layout .payment-card {
    padding: 0.85rem !important;
    border-radius: 12px;
  }

  .order-chat-layout .payment-card > div {
    padding: 0.85rem !important;
  }

  .order-chat-layout .payment-card h4 {
    font-size: 0.95rem !important;
    margin-bottom: 0.7rem !important;
  }

  .order-chat-layout .chat-card {
    height: min(52dvh, 420px);
    min-height: 320px;
  }

  .order-chat-head {
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px;
    padding: 0.6rem 0.75rem !important;
  }

  .order-chat-head-text {
    min-width: 0;
    flex: 1 1 auto;
  }

  .order-chat-head h5 {
    font-size: 0.9rem !important;
    margin-bottom: 2px !important;
  }

  .order-chat-meta {
    display: block;
    font-size: 0.68rem !important;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .order-chat-status {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.62rem !important;
    padding: 0.18rem 0.45rem !important;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .order-chat-layout .chat-messages {
    padding: 0.65rem !important;
    gap: 0.55rem !important;
  }

  .order-chat-layout .chat-bubble {
    max-width: 100% !important;
    width: 100%;
    padding: 0.65rem 0.75rem !important;
    font-size: 0.86rem !important;
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: normal;
    border-radius: 10px;
  }

  .order-chat-layout .chat-bubble .payment-section-adjust,
  .order-chat-layout .chat-bubble .payment-section,
  .order-chat-layout .chat-bubble .bank-details,
  .order-chat-layout .chat-bubble .left,
  .order-chat-layout .chat-bubble .right {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    gap: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
  }

  .order-chat-layout .chat-bubble .payment-section-adjust,
  .order-chat-layout .chat-bubble .payment-section {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
  }

  .order-chat-layout .chat-bubble .section-title {
    font-size: 0.92rem !important;
    margin-bottom: 0.3rem !important;
    line-height: 1.3;
  }

  .order-chat-layout .chat-bubble p,
  .order-chat-layout .chat-bubble .payment-instruction,
  .order-chat-layout .chat-bubble #bank-detail-adjust {
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
    margin: 0.2rem 0 !important;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .order-chat-layout .chat-bubble svg {
    width: 16px !important;
    height: 16px !important;
    vertical-align: middle;
  }

  .order-chat-layout .chat-attachment {
    margin-top: 0.45rem !important;
    padding-top: 0.4rem !important;
  }

  .order-chat-layout .chat-attachment-image,
  .order-chat-layout .chat-bubble img:not(.upi-qr-image):not(.payout-qr-image) {
    max-width: 100% !important;
    max-height: 180px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    border-radius: 8px;
  }

  .order-chat-layout .chat-bubble img[alt*="QR" i],
  .order-chat-layout .chat-bubble img[src*="qrserver"],
  .order-chat-layout .chat-bubble img[src*="qr"] {
    width: min(200px, 100%) !important;
    max-width: 100% !important;
    max-height: none !important;
    height: auto !important;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    display: block;
    margin: 8px auto 0;
  }

  .order-chat-layout .chat-input-area {
    padding: 0.55rem 0.65rem !important;
    gap: 0.45rem !important;
  }

  .order-chat-layout .chat-time {
    font-size: 0.65rem !important;
  }

  .chat-messages {
    padding: 1rem;
  }

  .chat-bubble {
    max-width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

  .chat-input-area {
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
  }

  .chat-input-wrapper {
    padding: 0.45rem 0.9rem;
  }

  .chat-btn-send {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  .glass-panel {
    padding: 1rem 0.9rem;
    overflow: visible;
  }

  .face-match-overlay {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 1050;
    padding: 12px 12px calc(108px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
    background: rgba(15, 11, 33, 0.97);
  }

  .face-match-overlay .glass-panel,
  .face-match-panel {
    max-width: 100% !important;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 0.9rem 1.1rem !important;
    border-radius: 14px;
    overflow: visible !important;
    box-shadow: none;
    box-sizing: border-box;
  }

  .face-match-form {
    padding-bottom: 4px;
  }

  .fm-title {
    font-size: 1.05rem !important;
    margin-bottom: 0.5rem !important;
    padding: 2px 2px 0;
  }

  .fm-copy {
    font-size: 0.88rem !important;
    margin-bottom: 0.9rem !important;
  }

  .fm-dropzone {
    padding: 0.95rem 0.75rem !important;
  }

  .fm-dropzone-sm {
    padding: 0.8rem 0.75rem !important;
  }

  .fm-submit {
    position: relative;
    z-index: 2;
  }

  .kyc-warning-card {
    padding: 1.15rem;
  }

  .order-chat-side,
  .order-chat-layout .payment-card,
  .order-bank-details,
  .upi-qr-wrap {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .payment-card {
    padding: 1rem;
  }

  .order-bank-details {
    padding: 0.9rem !important;
    margin-bottom: 0.9rem !important;
  }

  .order-bank-details h5 {
    font-size: 0.92rem !important;
    margin-bottom: 0.65rem !important;
  }

  .bank-detail-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .bank-detail-row:last-of-type {
    border-bottom: none;
  }

  .bank-detail-label {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
  }

  .bank-detail-value {
    font-size: 0.92rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .order-bank-details p {
    font-size: 0.95rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .upi-qr-wrap {
    margin-bottom: 1rem;
    padding: 0.75rem 0.5rem;
  }

  .upi-qr-wrap h5 {
    font-size: 0.9rem !important;
  }

  .upi-qr-image,
  img[alt="UPI QR Code"] {
    width: min(200px, 100%) !important;
    max-width: 100% !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
  }

  .payout-qr-image,
  img[alt="Payout QR"] {
    width: min(200px, 100%) !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 8px auto 0;
  }

  .upi-pay-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 12px;
    background: #EB8153;
    color: #fff !important;
    text-decoration: none;
    text-align: center;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
  }

  .upi-pay-hint {
    margin: 8px 0 0;
    color: #aaa;
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .chat-bubble .payment-section-adjust,
  .chat-bubble .payment-section,
  .chat-bubble .bank-details {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 8px;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .chat-bubble .bank-details,
  .chat-bubble .left,
  .chat-bubble .right {
    display: block;
    min-width: 0;
    flex: none;
  }

  .chat-bubble #bank-detail-adjust,
  .chat-bubble .payment-instruction {
    font-size: 0.9rem !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .chat-bubble.received {
    max-width: 100%;
  }

  /* Hide decorative coin overlays that sit on top of headings */
  .decorative-coins {
    display: none !important;
  }

  .title-normal {
    font-size: 28px !important;
    line-height: 1.25 !important;
  }

  .title-highlight {
    font-size: 30px !important;
    line-height: 1.2 !important;
  }

  .live-rates-section {
    padding: 40px 16px 8px !important;
  }

  .live-rates-section .section-header {
    margin-bottom: 1.25rem !important;
  }

  .live-rates-section .section-subtitle {
    font-size: 0.8rem !important;
    letter-spacing: 1.5px !important;
  }

  .live-rates-section .section-title {
    font-size: 1.45rem !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .live-rates-section .trade-tab-wrap {
    overflow: visible;
    margin-bottom: 1.25rem;
  }

  .live-rates-section .trade-tab-bar {
    display: flex;
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    gap: 4px;
  }

  .live-rates-section .trade-tab-btn {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
    padding: 0.6rem 0.4rem;
    font-size: 0.85rem;
  }

  .currencies-header h1 {
    font-size: 1.55rem !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .currencies-header p {
    font-size: 0.95rem !important;
    padding: 0 8px;
  }

  /* Buy / Sell / Swap forms — keep coin picker inline, shrink cards */
  .main-form,
  .summary-wrapper {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .main-form {
    gap: 14px;
  }

  .input-row {
    flex-wrap: nowrap;
    align-items: center;
    padding: 6px 8px;
  }

  .input-row input {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 14px;
  }

  .crypto-dropdown-wrapper.custom-dropdown-bg {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    margin-left: 6px;
    margin-top: 0;
    padding: 0 8px;
  }

  .crypto-dropdown-btn {
    padding: 6px 0;
    font-size: 0.85rem;
  }

  .crypto-icon-img {
    width: 18px;
    height: 18px;
    margin-right: 4px;
  }

  .crypto-symbol {
    font-size: 0.8rem;
  }

  .summary-card,
  .public-address-card,
  .button-card {
    padding: 12px;
    margin-bottom: 10px;
  }

  .summary-card h3 {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .summary-card li,
  .total-row {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .price-info,
  .span1,
  .span2 {
    font-size: 12px;
  }

  .public-address-card .address {
    word-break: break-word;
  }

  .order-btn,
  .btn-confirm-action,
  .btn-option {
    min-height: 44px;
  }

  .action-group {
    width: 100%;
    flex-wrap: wrap;
  }

  .tabs-main {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  /* Dashboard conversation */
  .content-body .chat-container {
    padding: 1.15rem;
  }

  .chat-bubble-sys,
  .chat-bubble-user {
    max-width: 100%;
  }

  .service-cards-container {
    grid-template-columns: 1fr;
  }

  .option-button-group {
    flex-direction: column;
  }

  .option-button-group .btn-option,
  .option-button-group .btn-confirm-action {
    width: 100%;
    text-align: center;
  }

  /* OTP / login card */
  .glass-card {
    padding: 1.5rem 1.15rem;
    max-width: 100%;
  }

  .input-wrapper,
  .btn-primary {
    min-height: 44px;
  }

  /* KYC header */
  .logout-button {
    min-height: 44px;
  }
}

@media (max-width: 768px) {
  .trade-tab-wrap {
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .live-rates-section .trade-tab-wrap {
    overflow: visible;
  }

  .currencies-section .trade-tab-wrap,
  .chat-container .trade-tab-wrap {
    overflow: visible;
    margin-bottom: 0.75rem;
  }

  .currencies-section .trade-tab-bar,
  .chat-container .trade-tab-bar {
    display: flex;
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    gap: 4px;
    padding: 4px;
  }

  .currencies-section .trade-tab-btn,
  .chat-container .trade-tab-btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
    padding: 0.4rem 0.3rem;
    font-size: 0.75rem;
    min-height: 36px;
    gap: 4px;
  }

  .currencies-section .trade-tab-btn svg,
  .chat-container .trade-tab-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
  }

  .how-it-works-section {
    margin-top: 1.25rem !important;
  }

  .exchange-cards-grid.is-mobile-scroll {
    padding: 1.75rem 4px 0 !important;
    margin-bottom: 0;
  }

  .live-rates-section .exchange-currency-card {
    margin-top: 0.75rem;
  }

  .trade-tab-bar {
    display: inline-flex;
    width: max-content;
    min-width: 100%;
    box-sizing: border-box;
  }

  .trade-tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 44px;
    padding: 0.65rem 1rem;
  }

  .coin-logo-wrapper {
    width: 52px !important;
    height: 52px !important;
    border-width: 3px !important;
    background: #ffffff !important;
  }

  .coin-logo-wrapper img {
    width: 82% !important;
    height: 82% !important;
    object-fit: contain !important;
  }

  .exchange-currency-card {
    padding: 2.15rem 0.7rem 0.8rem !important;
    margin-top: 1rem;
    border-radius: 14px !important;
  }

  .exchange-currency-card:hover {
    transform: none !important;
  }

  .coin-title {
    font-size: 0.88rem;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card-hero-price {
    font-size: 0.82rem;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .card-trend {
    font-size: 0.68rem;
    margin-bottom: 0.45rem;
    flex-wrap: nowrap;
  }

  .card-trend-time {
    display: none;
  }

  .js-kyc-block {
    padding-top: 0.45rem;
  }

  .js-kyc-block label {
    gap: 5px;
    margin-bottom: 0.35rem;
    min-width: 0;
  }

  .js-kyc-block label > div {
    min-width: 0;
    overflow: hidden;
  }

  .kyc-option-title {
    font-size: 0.6rem;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    font-weight: 600;
  }

  .kyc-option-rate {
    font-size: 0.58rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .js-kyc-price,
  .js-nokyc-price {
    white-space: nowrap;
  }

  .soon-badge {
    font-size: 0.5rem;
    margin-left: 2px;
  }

  /* Landing: swipeable cards */
  .exchange-cards-grid.is-mobile-scroll {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding: 2rem 4px 1rem;
    scrollbar-width: thin;
  }

  .exchange-cards-grid.is-mobile-scroll .exchange-currency-card {
    flex: 0 0 min(240px, 78vw);
    width: min(240px, 78vw);
    max-width: min(240px, 78vw);
    scroll-snap-align: start;
  }

  /* Currencies / dashboard: two cards per row, logo overlapping top-center */
  .exchange-cards-grid.is-mobile-two-col {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2.15rem 0.7rem !important;
    padding-top: 1.6rem;
  }

  .exchange-cards-grid.is-mobile-two-col .exchange-currency-card {
    margin-top: 0.85rem;
    padding: 1.7rem 0.55rem 0.65rem !important;
    min-width: 0;
    overflow: visible !important;
  }

  .exchange-cards-grid.is-mobile-two-col .coin-logo-wrapper {
    position: absolute !important;
    left: 50% !important;
    top: 0 !important;
    transform: translate(-50%, -50%) !important;
    margin: 0;
    width: 46px !important;
    height: 46px !important;
    border-width: 2px !important;
  }

  .exchange-cards-grid.is-mobile-two-col .coin-title {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
  }

  .exchange-cards-grid.is-mobile-two-col .card-hero-price {
    font-size: 0.78rem;
  }

  .exchange-cards-grid.is-mobile-two-col .card-trend {
    margin-bottom: 0.3rem;
  }

  .exchange-cards-grid.is-mobile-two-col .kyc-option-title {
    font-size: 0.55rem;
  }

  .exchange-cards-grid.is-mobile-two-col .kyc-option-rate {
    font-size: 0.52rem;
  }

  .exchange-cards-grid.is-mobile-two-col .js-kyc-block input[type="radio"] {
    width: 12px;
    height: 12px;
    margin-top: 2px;
  }
}

@media (max-width: 576px) {
  .crypto-dropdown-list {
    min-width: 160px;
    max-width: 220px;
    right: 0;
    left: auto;
  }

  .attachment-preview {
    flex-wrap: wrap;
  }

  #by-crypto-adjust {
    font-size: 1.15rem;
  }
}

/* Trade wizard overlay (Onramp-style, no full page reload) */
.trade-wizard-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 6, 18, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body:has(.trade-wizard-overlay) {
  overflow: hidden;
}

.trade-wizard-card {
  width: min(420px, 100%);
  max-height: min(92dvh, 720px);
  overflow: auto;
  background: #1a1529;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  color: #fff;
  box-sizing: border-box;
  position: relative;
}

.trade-wizard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  background: #1a1529;
  z-index: 2;
}

.trade-wizard-brand {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.trade-wizard-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.trade-wizard-body {
  padding: 18px 16px 22px;
}

.trade-wizard-title {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #ffffff !important;
}

.trade-wizard-sub {
  color: #a3a3a3;
  font-size: 0.9rem;
  margin: 0 0 1rem;
  line-height: 1.45;
}

.trade-wizard-field {
  margin-bottom: 1rem;
}

.trade-wizard-label {
  display: block;
  font-size: 0.85rem;
  color: #cfcfcf;
  margin-bottom: 0.45rem;
}

.trade-wizard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #12101c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
}

.trade-wizard-amount,
.trade-wizard-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 600;
}

.trade-wizard-input {
  font-size: 1rem;
  font-weight: 500;
  background: #12101c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}

.trade-wizard-asset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2a2340;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 0.9rem;
  flex: 0 0 auto;
}

.trade-wizard-asset img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
}

.trade-wizard-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 0.45rem;
  color: #9a9a9a;
  font-size: 0.75rem;
}

.trade-wizard-summary,
.trade-wizard-summary-mini {
  background: #12101c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin: 0.75rem 0 1rem;
  font-weight: 600;
}

.trade-wizard-primary {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, #EB8153, #f0a07a);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.trade-wizard-error {
  display: block;
  color: #ff858d;
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.tw-req {
  color: #ff858d;
}

.tw-select {
  appearance: auto;
  font-size: 1rem !important;
  font-weight: 500 !important;
  color: #fff !important;
}

.fm-camera-wrap {
  position: relative;
  width: 100%;
  min-height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.fm-camera-wrap video {
  display: block;
  width: 100%;
  min-height: 220px;
  max-height: 280px;
  object-fit: cover;
  background: #111;
}

.fm-capture {
  width: 100%;
  min-height: 42px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(235, 129, 83, 0.6);
  border-radius: 10px;
  background: transparent;
  color: #EB8153;
  font-weight: 700;
  cursor: pointer;
}

.fm-capture-primary {
  background: #EB8153;
  color: #fff;
  border-color: #EB8153;
}

.tw-otp-on-page {
  margin: 0 0 0.85rem;
  color: #9ecbff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tw-email-resend {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  text-align: center;
  background: none;
  border: none;
  color: #EB8153;
  cursor: pointer;
}

.trade-wizard-radio {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #fff;
  font-size: 0.9rem;
  margin: 0.4rem 0;
}

.trade-wizard-saved {
  color: #a3a3a3;
  font-size: 0.8rem;
  word-break: break-all;
  margin: 0 0 0.65rem 1.4rem;
}

.trade-wizard-legal {
  color: #8a8a8a;
  font-size: 0.75rem;
  margin: 0.85rem 0 0;
  line-height: 1.4;
}

.trade-wizard-trust {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #9ecbff;
  font-size: 0.85rem;
}

.trade-wizard-gate {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  max-width: none !important;
}

.tw-summary-label {
  text-align: center;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: #9a9a9a;
  font-weight: 700;
  margin-bottom: 1rem;
}

.tw-summary-block {
  background: #12101c;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.tw-muted {
  color: #9a9a9a;
  font-size: 0.8rem;
  margin-bottom: 0.45rem;
}

.tw-summary-main {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}

.tw-summary-main img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
}

.tw-link-btn {
  margin-top: 0.55rem;
  border: none;
  background: transparent;
  color: #EB8153;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.tw-fee-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
}

.tw-fee-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #cfcfcf;
  font-size: 0.85rem;
  padding: 0.25rem 0;
}

.tw-fee-note {
  margin: 0.5rem 0 0;
  color: #8a8a8a;
  font-size: 0.72rem;
}

.tw-address-row,
.tw-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 600;
  word-break: break-all;
}

.tw-network-pill {
  flex: 0 0 auto;
  background: #2a2340;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: #d7d7d7;
}

.tw-verify-cta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0.85rem 0 1rem;
}

.tw-verify-cta p {
  margin: 0;
  color: #cfcfcf;
  font-size: 0.88rem;
  line-height: 1.4;
}

.tw-time-pill {
  flex: 0 0 auto;
  background: rgba(235, 129, 83, 0.15);
  color: #EB8153;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tw-verify-head {
  margin-bottom: 0.75rem;
}

.tw-verify-track {
  display: flex;
  gap: 12px;
  margin-bottom: 1rem;
}

.tw-verify-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 18px;
}

.tw-verify-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #6b6680;
  background: transparent;
}

.tw-verify-dot.is-active {
  background: #28a745;
  border-color: #28a745;
}

.tw-verify-dot.is-done {
  background: #28a745;
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

.tw-verify-card.is-complete {
  border-color: rgba(40, 167, 69, 0.35);
}

.tw-done-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #28a745;
  background: rgba(40, 167, 69, 0.12);
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: middle;
}

.tw-verify-line {
  width: 2px;
  flex: 1;
  min-height: 36px;
  background: rgba(255, 255, 255, 0.12);
  margin: 4px 0;
}

.tw-verify-cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tw-verify-card {
  background: #12101c;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
}

.tw-verify-card.is-open {
  border-color: rgba(235, 129, 83, 0.35);
  box-shadow: 0 0 0 1px rgba(235, 129, 83, 0.12);
}

.tw-verify-card-head {
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  padding: 0.9rem 1rem;
  cursor: pointer;
}

.tw-verify-card-title {
  font-weight: 700;
  font-size: 0.98rem;
}

.tw-verify-meta {
  color: #28a745;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.tw-verify-limit {
  color: #9a9a9a;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.tw-verify-card-body {
  padding: 0 1rem 0.95rem;
}

.tw-required {
  color: #8a8a8a;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
}

.tw-req-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tw-req-list li {
  color: #d7d7d7;
  font-size: 0.88rem;
  padding: 0.3rem 0;
}

.tw-req-list em {
  color: #EB8153;
  font-style: normal;
  font-size: 0.78rem;
}

.tw-secure-note {
  color: #9ecbff;
  font-size: 0.8rem;
  margin: 0.25rem 0 1rem;
  line-height: 1.4;
}

.tw-status-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.tw-status-ok {
  background: rgba(40, 167, 69, 0.12);
  color: #7ddea0;
  border: 1px solid rgba(40, 167, 69, 0.25);
}

.tw-swap-flip {
  display: flex;
  justify-content: center;
  margin: 0.25rem 0 0.75rem;
}

.tw-swap-to-select {
  padding-right: 6px;
}

.tw-to-select {
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  max-width: 88px;
}

.tw-exit-confirm {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 6, 18, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: inherit;
}

.trade-wizard-card.is-confirming-exit {
  overflow: hidden;
}

.tw-exit-confirm-card {
  width: min(320px, 100%);
  background: #2a2340;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.5rem 1.25rem 1.25rem;
  text-align: center;
}

.tw-exit-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.tw-exit-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 1.25rem;
}

.tw-exit-stay {
  width: 100%;
  min-height: 46px;
  border: none;
  border-radius: 12px;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 0.65rem;
}

.tw-exit-leave {
  width: 100%;
  min-height: 46px;
  border: none;
  border-radius: 12px;
  background: #f8e8ea;
  color: #c62828;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .trade-wizard-overlay {
    padding: 0;
    align-items: stretch;
  }

  .trade-wizard-card {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
    border: none;
  }

  .trade-wizard-body {
    padding: 16px 14px 28px;
  }

  .content-body.order-trade-page {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .order-trade-page .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .order-trade-page .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    gap: 10px !important;
  }

  .order-trade-page .main-form,
  .order-trade-page .summary-wrapper {
    max-width: 100% !important;
    width: 100% !important;
  }

  .order-trade-page .summary-card,
  .order-trade-page .public-address-card,
  .order-trade-page .button-card,
  .order-trade-page .input-row {
    width: 100%;
    box-sizing: border-box;
  }

  .order-trade-page #from-to {
    margin-bottom: 6px !important;
  }
}

#toast-container > .toast-success,
.toast-success {
  background-color: #28a745 !important;
}

#toast-container > .toast-error,
.toast-error {
  background-color: #dc3545 !important;
}

#toast-container > .toast-warning,
.toast-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

#toast-container > .toast-info,
.toast-info {
  background-color: #ffc107 !important;
  color: #212529 !important;
}
