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

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #0f1218;
    color: #e8eaed;
}

/* ── Brand link in topbar ────────────────────────────────────────────── */
.brand {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1rem;
    font-weight: 700;
    color: #00ff9d;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.brand svg { opacity: 0.85; }
.brand:hover { color: #33ffb0; }

/* Active nav link */
.topbar-active {
    color: #00ff9d !important;
}

/* ── Topbar ──────────────────────────────────────────────────────────── */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    background: #1a1f28;
    border-bottom: 1px solid #2d3544;
}

.topbar h1 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ── Hero section ────────────────────────────────────────────────────── */
.hero-section {
    position: relative;
    padding: 5rem 1.5rem 3.5rem;
    overflow: hidden;
    text-align: center;
}

.hero-glow {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(0,255,157,0.10) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.9rem;
    background: rgba(0,255,157,0.08);
    border: 1px solid rgba(0,255,157,0.22);
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #00ff9d;
    text-transform: uppercase;
    margin-bottom: 1.6rem;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00ff9d;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #f0f4f8;
    margin: 0 0 1.2rem;
}

.hero-accent {
    background: linear-gradient(135deg, #00ff9d 0%, #00c8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #9ca3af;
    max-width: 620px;
    margin: 0 auto 2.2rem;
}

.hero-sub strong { color: #e8eaed; }

.hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 2.2rem;
}

/* Feature pills row */
.feature-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    max-width: 680px;
    margin: 0 auto;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    background: #1a1f28;
    border: 1px solid #2d3544;
    border-radius: 99px;
    font-size: 0.78rem;
    color: #9ca3af;
}

.pill svg { color: #00ff9d; flex-shrink: 0; }

/* Feature cards */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
    max-width: 960px;
    margin: 3.5rem auto 0;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.fcard {
    background: #151a23;
    border: 1px solid #2d3544;
    border-radius: 14px;
    padding: 1.5rem 1.35rem;
    text-align: left;
    transition: border-color 0.2s, transform 0.2s;
}

.fcard:hover {
    border-color: rgba(0,255,157,0.3);
    transform: translateY(-3px);
}

.fcard-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(0,255,157,0.08);
    border: 1px solid rgba(0,255,157,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00ff9d;
    margin-bottom: 1rem;
}

.fcard h3 {
    margin: 0 0 0.55rem;
    font-size: 0.97rem;
    font-weight: 700;
    color: #e8eaed;
}

.fcard p {
    margin: 0;
    font-size: 0.83rem;
    line-height: 1.65;
    color: #6b7280;
}

/* Commission notice */
.commission-notice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 2.5rem auto 0;
    padding: 0.55rem 1.1rem;
    background: rgba(255,180,50,0.07);
    border: 1px solid rgba(255,180,50,0.2);
    border-radius: 8px;
    font-size: 0.83rem;
    color: #d1b375;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.commission-notice svg { flex-shrink: 0; color: #f0b429; }
.commission-notice strong { color: #f0b429; }

/* Larger button variant */
.btn.lg, .btn.primary.lg {
    padding: 0.7rem 1.45rem;
    font-size: 0.95rem;
    gap: 0.5rem;
    display: inline-flex;
    align-items: center;
}

/* Split submit button */
.split-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

/* Site footer */
.site-footer {
    text-align: center;
    padding: 1.5rem 1.5rem 2.5rem;
    font-size: 0.78rem;
    color: #374151;
    border-top: 1px solid #1a1f28;
    margin-top: 2rem;
}

.site-footer strong { color: #4b5563; }

.footer-support {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.55rem;
}

.footer-support-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #29b6f6;
    text-decoration: none;
    font-weight: 600;
}

.footer-support-link:hover {
    color: #4fc3f7;
    text-decoration: underline;
}

.footer-support-link svg {
    flex-shrink: 0;
}

/* Responsive feature cards */
@media (max-width: 760px) {
    .feature-cards {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    .hero-section { padding: 3.5rem 1rem 2.5rem; }
}

@media (min-width: 761px) and (max-width: 900px) {
    .feature-cards { grid-template-columns: repeat(2, 1fr); }
    .fcard:last-child { grid-column: span 2; max-width: 50%; margin: 0 auto; }
}

.announcement-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.announcement-overlay[hidden] {
    display: none;
}

.announcement {
    width: min(700px, 100%);
    max-height: min(92vh, 820px);
    overflow-y: auto;
    background: #171c24;
    border: 1px solid #3d4f6f;
    border-radius: 14px;
    padding: 1.35rem 1.5rem 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.announcement-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.announcement-head h2 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.35;
}

.btn-close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 8px;
    background: #2d3544;
    color: #e8eaed;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.btn-close:hover {
    background: #3d4656;
}

.how-steps {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    line-height: 1.55;
    font-size: 0.92rem;
    color: #c9cdd3;
}

.how-steps li {
    margin-bottom: 0.65rem;
}

.how-steps strong {
    color: #e8eaed;
}

.announcement-note {
    margin: 0 0 1.15rem;
    padding: 0.75rem 0.85rem;
    background: rgba(37, 99, 235, 0.12);
    border-left: 3px solid #2563eb;
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    color: #9aa0a6;
}

.announcement .btn.primary {
    width: 100%;
}

/* ════════════════════════════════════════════════════════════
   Flow Diagram  (fd-*)
═══════════════════════════════════════════════════════════════ */
.fd-wrap {
    margin: 0.2rem 0 1.2rem;
    font-size: 0.8rem;
}

/* Phase row */
.fd-phase-row {
    background: #0f1420;
    border: 1px solid #2a3347;
    border-radius: 12px;
    padding: 0.85rem 0.9rem 0.9rem;
    margin-bottom: 0;
}

.fd-phase-tag {
    display: inline-block;
    padding: 0.18rem 0.7rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.fd-tag-blue   { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3);  color: #60a5fa; }
.fd-tag-green  { background: rgba(0,255,157,0.08);  border: 1px solid rgba(0,255,157,0.25);  color: #00ff9d; }
.fd-tag-orange { background: rgba(251,146,60,0.1);  border: 1px solid rgba(251,146,60,0.28); color: #fb923c; }

/* Lane (horizontal row of nodes + edges) */
.fd-lane {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
}

/* Node */
.fd-node {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 9px;
    border: 1px solid transparent;
    flex-shrink: 0;
    min-width: 0;
}

.fd-node-blue   { background: rgba(59,130,246,0.1);  border-color: rgba(59,130,246,0.3);  }
.fd-node-amber  { background: rgba(245,158,11,0.1);  border-color: rgba(245,158,11,0.3);  }
.fd-node-green  { background: rgba(0,255,157,0.07);  border-color: rgba(0,255,157,0.22);  }
.fd-node-orange { background: rgba(251,146,60,0.1);  border-color: rgba(251,146,60,0.28); }
.fd-node-purple { background: rgba(167,139,250,0.1); border-color: rgba(167,139,250,0.28);}

.fd-node-letter {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.fd-node-blue   .fd-node-letter { background: rgba(59,130,246,0.25);  color: #93c5fd; }
.fd-node-amber  .fd-node-letter { background: rgba(245,158,11,0.25);  color: #fcd34d; }
.fd-node-green  .fd-node-letter { background: rgba(0,255,157,0.15);   color: #00ff9d; }
.fd-node-orange .fd-node-letter { background: rgba(251,146,60,0.2);   color: #fdba74; }
.fd-node-purple .fd-node-letter { background: rgba(167,139,250,0.2);  color: #c4b5fd; }

.fd-node-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.fd-node-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e8eaed;
    white-space: nowrap;
}

.fd-node-sub {
    font-size: 0.68rem;
    color: #6b7280;
    white-space: nowrap;
}

/* Smaller node variants */
.fd-node-sm { padding: 0.45rem 0.6rem; }
.fd-node-sm .fd-node-letter { width: 24px; height: 24px; font-size: 0.66rem; }
.fd-node-sm .fd-node-title  { font-size: 0.77rem; }

.fd-node-xs { padding: 0.35rem 0.55rem; flex-direction: column; gap: 0.1rem; align-items: flex-start; }
.fd-node-xs .fd-node-letter { width: 22px; height: 22px; font-size: 0.62rem; margin-bottom: 0.1rem; }

/* Edge connector */
.fd-edge {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 0 0.3rem;
    flex-shrink: 0;
    min-width: 50px;
}
.fd-edge-sm { min-width: 32px; padding: 0 0.2rem; }

.fd-edge-label {
    font-size: 0.62rem;
    color: #4b5563;
    white-space: nowrap;
    margin-bottom: 2px;
    letter-spacing: 0.03em;
}

.fd-edge-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, #2d3544, #3d4f6f, #2d3544);
}

.fd-arrowhead {
    font-size: 0.6rem;
    color: #4b5563;
    margin-top: 2px;
    align-self: flex-end;
}

/* Vertical connector between phases */
.fd-phase-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.3rem 0;
    gap: 0;
}

.fd-vline {
    width: 1px;
    height: 10px;
    background: #2d3544;
}

.fd-vline-label {
    font-size: 0.64rem;
    color: #4b5563;
    letter-spacing: 0.03em;
    padding: 2px 0;
}

.fd-down-arrow {
    font-size: 0.65rem;
    color: #4b5563;
}

/* Destination group (stacked wallets) */
.fd-dest-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex-shrink: 0;
}

.fd-node-more {
    opacity: 0.55;
    border-style: dashed;
}

/* Relay / dist lane tweak */
.fd-lane-relay .fd-edge-sm { min-width: 22px; }
.fd-lane-dist               { align-items: flex-start; }

/* Legend */
.fd-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #1f2635;
}

.fd-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    color: #6b7280;
}
.fd-legend-item::before {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 3px;
    flex-shrink: 0;
}
.fd-legend-blue::before   { background: rgba(59,130,246,0.6); }
.fd-legend-amber::before  { background: rgba(245,158,11,0.6); }
.fd-legend-green::before  { background: rgba(0,255,157,0.5);  }
.fd-legend-purple::before { background: rgba(167,139,250,0.6);}

/* Compact step list below diagram */
.how-steps-compact {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0 0 1rem;
}

.hsc-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.84rem;
    color: #9ca3af;
    line-height: 1.5;
}

.hsc-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #1f2a3c;
    border: 1px solid #2d3f5a;
    color: #60a5fa;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.hsc-item strong { color: #d1d5db; }

/* ── End Flow Diagram ── */

.topbar a {
    color: #8ab4ff;
    text-decoration: none;
    font-size: 0.9rem;
}

.topbar a:hover {
    text-decoration: underline;
}

.layout {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.status-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.status-stack .status-box {
    width: 100%;
    min-height: 100px;
}

.status-stack .card-head {
    margin-bottom: 0.65rem;
}

.status-stack .card-head h2 {
    font-size: 0.95rem;
}

.send-footer {
    display: grid;
    grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #2d3544;
}

.send-footer-main {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.send-footer-main .btn.primary {
    width: 100%;
    white-space: nowrap;
}

.send-footer .tx-status {
    margin: 0;
}

@media (max-width: 720px) {
    .send-footer {
        grid-template-columns: 1fr;
    }

    .send-footer-main {
        order: 1;
    }

    .status-stack {
        order: 2;
    }
}

.status-box.status-success {
    border-color: #238636;
    box-shadow: 0 0 0 1px rgba(35, 134, 54, 0.25);
}

.status-box.status-error {
    border-color: #da3633;
    box-shadow: 0 0 0 1px rgba(218, 54, 51, 0.25);
}

.status-box.status-processing {
    border-color: #2563eb;
}

.status-body {
    font-size: 0.9rem;
    color: #c9d1d9;
}

.status-placeholder {
    margin: 0;
    color: #9aa0a6;
}

.status-message {
    margin: 0 0 0.75rem;
}

.tx-id-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tx-id-list li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.55rem 0.65rem;
    background: #0f1218;
    border-radius: 8px;
    border: 1px solid #2d3544;
}

.tx-id-list code {
    font-size: 0.78rem;
    word-break: break-all;
    color: #8ab4ff;
}

.tx-id-list a {
    color: #58a6ff;
    font-size: 0.8rem;
    text-decoration: none;
}

.tx-id-list a:hover {
    text-decoration: underline;
}

.support-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: #8ab4ff;
    font-weight: 600;
    text-decoration: none;
}

.support-link:hover {
    text-decoration: underline;
}

.relay-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.85rem;
    padding: 0.45rem 1rem;
    background: #92400e;
    border: 1px solid #d97706;
    color: #fde68a;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.relay-retry-btn:hover:not(:disabled) {
    background: #b45309;
}

.relay-retry-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.relay-retry-btn .spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.orders-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.orders-list li {
    padding: 0.55rem 0.65rem;
    background: #0f1218;
    border-radius: 8px;
    border: 1px solid #2d3544;
}

.order-row-top {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.order-status {
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #2d3544;
    color: #fbbf24;
}

.order-status.done {
    background: rgba(35, 134, 54, 0.2);
    color: #7ee787;
}

.order-status.failed {
    background: rgba(218, 54, 51, 0.2);
    color: #ff8b8b;
}

.order-status.running {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    animation: pulse-badge 1.4s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

.relay-spinner {
    color: #93c5fd;
    font-size: 0.75rem;
}

.order-error {
    color: #ff8b8b;
    font-size: 0.78rem;
}

.order-meta {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: #9aa0a6;
    word-break: break-all;
}

.card {
    background: #171c24;
    border: 1px solid #2d3544;
    border-radius: 12px;
    padding: 1.25rem;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #2d3544;
    color: #9aa0a6;
}

.badge.connected {
    background: #1e3a2f;
    color: #6dd58c;
}

.hint {
    color: #9aa0a6;
    font-size: 0.85rem;
    margin: 0;
}

.wallet-connect p:first-child {
    margin-top: 0;
}

.btn {
    border: 1px solid #4a5568;
    background: #2d3544;
    color: #e8eaed;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn:hover:not(:disabled) {
    background: #3d4656;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn.primary {
    background: #2563eb;
    border-color: #2563eb;
}

.btn.primary:hover:not(:disabled) {
    background: #1d4ed8;
}

.btn.ghost {
    background: transparent;
}

.btn.sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
}

#wallet-error {
    color: #f87171;
    margin-top: 0.75rem;
}

.address-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.address-row .label {
    color: #9aa0a6;
    font-size: 0.85rem;
}

.address-row code {
    font-size: 0.85rem;
    background: #0f1218;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    word-break: break-all;
}

.balances {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.wallet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

#btn-connect-btc.connected {
    opacity: 0.85;
}

.balance-tile {
    background: #0f1218;
    border: 1px solid #2d3544;
    border-radius: 10px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.balance-tile .coin {
    font-size: 0.8rem;
    color: #9aa0a6;
}

.balance-tile .coin small {
    font-size: 0.7rem;
}

.balance-tile strong {
    font-size: 1.1rem;
}

.balance-tile .usd {
    font-size: 0.8rem;
    color: #6dd58c;
}

.disabled-block {
    opacity: 0.55;
    pointer-events: none;
    user-select: none;
}

.disabled-block.enabled {
    opacity: 1;
    pointer-events: auto;
    user-select: auto;
}

fieldset {
    border: 1px solid #2d3544;
    border-radius: 10px;
    padding: 1rem;
    margin: 0 0 1rem;
}

legend {
    padding: 0 0.35rem;
    font-size: 0.85rem;
    color: #9aa0a6;
}

.row-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #9aa0a6;
}

input,
select {
    padding: 0.55rem 0.65rem;
    border: 1px solid #4a5568;
    border-radius: 8px;
    background: #0f1218;
    color: #e8eaed;
    font-size: 0.9rem;
}

input:focus,
select:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.pct-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.pct-ok {
    color: #6dd58c;
    font-size: 0.8rem;
}

.pct-warn {
    color: #fbbf24;
    margin-left: 0.5rem;
}

.recipient-grid {
    display: grid;
    grid-template-columns: 2rem 1fr 7rem 4.5rem 6rem 6rem;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
}

.recipient-grid.head {
    color: #9aa0a6;
    font-size: 0.75rem;
    margin-bottom: 0.35rem;
    padding: 0 0.15rem;
}

.recipient-grid.row {
    margin-bottom: 0.5rem;
}

.recipient-grid.row.row-active {
    background: rgba(37, 99, 235, 0.06);
    border-radius: 8px;
    padding: 0.15rem 0;
}

.recipient-grid.row.row-incomplete {
    outline: 1px dashed #fbbf24;
    border-radius: 8px;
}

.row-num {
    color: #6b7280;
    text-align: center;
}

.send-amt,
.recv-amt {
    font-size: 0.8rem;
    color: #8ab4ff;
    word-break: break-all;
}

.rates-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #9aa0a6;
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.preview-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #2d3544;
}

.preview-panel h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.preview-panel pre {
    margin: 0;
    padding: 0.75rem;
    background: #0f1218;
    border-radius: 8px;
    font-size: 0.75rem;
    overflow-x: auto;
    white-space: pre-wrap;
}

.split-pool-note,
.btc-treasury-note {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: #9aa3b2;
}

.split-pool-note strong {
    color: #d4dce8;
}

.btc-treasury-note code {
    font-size: 0.75rem;
    word-break: break-all;
}

.tx-status {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: #7ee787;
}

.tx-status.error {
    color: #ff8b8b;
}

#btc-account-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    word-break: break-all;
    color: #9aa3b2;
}

.btc-address-field {
    display: block;
    margin-top: 0.65rem;
}

.btc-address-field .field-label {
    display: block;
    font-size: 0.72rem;
    color: #9aa3b2;
    margin-bottom: 0.35rem;
}

.btc-address-row {
    display: flex;
    gap: 0.35rem;
}

.btc-address-row input {
    flex: 1;
    min-width: 0;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #2d3544;
    background: #0f1218;
    color: #e8eaed;
    font-size: 0.75rem;
}

/* ── Session history card ──────────────────────────────────────────────── */
.history-card {
    margin: 0 auto 2.5rem;
    max-width: 960px;
    width: calc(100% - 2.5rem);
}

.history-card .card-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.history-card .card-head h2 { flex: 1; }

/* Individual order row (collapsible) */
.history-order {
    border: 1px solid #2d3544;
    border-radius: 8px;
    margin-bottom: 0.55rem;
    background: #151a23;
    overflow: hidden;
}

.history-order-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    flex-wrap: wrap;
}

.history-order-head::-webkit-details-marker { display: none; }

.history-order-head::before {
    content: "▶";
    font-size: 0.6rem;
    color: #6b7280;
    transition: transform 0.15s;
    flex-shrink: 0;
}
.history-order[open] > .history-order-head::before { transform: rotate(90deg); }

.history-date {
    font-size: 0.8rem;
    color: #9ca3af;
    min-width: 7rem;
}

.history-amount {
    font-weight: 600;
    font-size: 0.9rem;
    color: #e8eaed;
    min-width: 6rem;
}

.history-uuid {
    font-size: 0.72rem;
    color: #6b7280;
    margin-left: auto;
    font-family: monospace;
}

.history-order-body {
    padding: 0.6rem 0.85rem 0.75rem;
    border-top: 1px solid #2d3544;
}

.history-meta {
    margin: 0.2rem 0;
    font-size: 0.82rem;
    color: #9ca3af;
}

.history-meta .lbl {
    color: #6b7280;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.25rem;
}

.history-recipients {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.history-recipients li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    border-top: 1px solid #1f2635;
    font-size: 0.82rem;
    flex-wrap: wrap;
}

.hist-addr {
    font-size: 0.75rem;
    color: #60a5fa;
    min-width: 8rem;
}

.hist-pct {
    color: #9ca3af;
    min-width: 2.5rem;
    text-align: right;
}

.hist-amt {
    color: #d1d5db;
    flex: 1;
}

/* Nested step details */
.history-substeps {
    margin-top: 0.5rem;
    border: 1px solid #2d3544;
    border-radius: 6px;
    overflow: hidden;
}

.history-substeps > summary {
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: #9ca3af;
    background: #0f1218;
    list-style: none;
}
.history-substeps > summary::-webkit-details-marker { display: none; }
.history-substeps[open] > summary { border-bottom: 1px solid #2d3544; }

.history-substeps .orders-list {
    margin: 0;
    padding: 0.25rem 0;
}

/* ── End session history ───────────────────────────────────────────────── */

/* ── Support page ─────────────────────────────────────────────────────── */
.support-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.support-hero {
    text-align: center;
    margin-bottom: 1.75rem;
}

.support-hero-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.85rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #60a5fa;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.25);
}

.support-hero h1 {
    margin: 0 0 0.75rem;
    font-size: 1.65rem;
    font-weight: 800;
    color: #f0f4f8;
}

.support-hero p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.65;
    color: #9ca3af;
}

.support-card { margin-top: 0.5rem; }

.support-wallet-block {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #2d3544;
}

.support-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.support-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #9ca3af;
}

.support-form textarea {
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #2d3544;
    background: #0f1218;
    color: #e8eaed;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
}

.support-form textarea:focus {
    outline: none;
    border-color: #00ff9d;
    box-shadow: 0 0 0 2px rgba(0,255,157,0.15);
}

.support-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.support-error {
    color: #ff8b8b !important;
    margin-top: 0.5rem;
}

.support-status {
    margin: 0.25rem 0 0;
    font-size: 0.88rem;
    color: #9ca3af;
}

.support-status.error   { color: #ff8b8b; }
.support-status.success { color: #6dd58c; }

@media (max-width: 520px) {
    .support-row-2 { grid-template-columns: 1fr; }
}

/* ── End support page ─────────────────────────────────────────────────── */

@media (max-width: 720px) {
    .recipient-grid {
        grid-template-columns: 1fr;
        gap: 0.35rem;
        padding: 0.75rem;
        background: #0f1218;
        border-radius: 8px;
        margin-bottom: 0.75rem;
    }

    .recipient-grid.head {
        display: none;
    }

    .row-num::before {
        content: "Recipient ";
    }
}
