/* =============================================================================
   Live meme coins zone — scoped under .hf-pretrend-live-zone
   Uses HyperFlow dashboard tokens when parent defines :root (dashboard.css).
   Safe to load standalone: fallbacks mirror dashboard.css :root.
   ============================================================================= */

/* Full-page title bar (pretrend_live_zone_served.html above the widget mount). */
.hf-live-zone-site-header {
    text-align: center;
    margin: 0 0 14px;
    padding: 12px 16px 4px;
}

.hf-live-zone-site-header__title {
    margin: 0;
    font-size: clamp(1.2rem, 2.6vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent-cyan, #00d4ff);
    text-transform: none;
}

.hf-pretrend-live-zone {
    --hf-bg: var(--bg-card, rgba(12, 16, 28, 0.85));
    --hf-border: var(--border-subtle, rgba(0, 212, 255, 0.15));
    --hf-glow: var(--border-glow, rgba(0, 212, 255, 0.4));
    --hf-cyan: var(--accent-cyan, #00d4ff);
    --hf-purple: var(--accent-purple, #a855f7);
    --hf-profit: var(--profit, #00ff88);
    --hf-loss: var(--loss, #ff4757);
    --hf-warn: var(--warn, #fbbf24);
    --hf-text: var(--text-primary, #e2e8f0);
    --hf-muted: var(--text-muted, #64748b);
    --hf-secondary: var(--text-secondary, #94a3b8);
    --hf-font: var(--font-body, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif);
    --hf-row-h: 32px;
    --hf-font-tape: 0.8rem;
    --hf-font-micro: 0.76rem;
    --hf-font-ops: ui-monospace, "Cascadia Code", "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;
    /* One definition: header + body rows stay aligned (slightly tighter mins = less horizontal overflow). */
    --tape-grid: minmax(86px, 1.22fr) 46px minmax(104px, 1.18fr) minmax(66px, 0.88fr) minmax(46px, 0.68fr) minmax(52px, 0.82fr);
    /* ~15 rows in the tape body; rows 16–20 (when present) scroll. */
    --hf-tape-visible-rows: 15;
    /* ~15 rows of scroll body when space allows; shorter viewports cap via svh (tracks main window ratio). */
    --hf-tape-viewport-h: min(
        calc(var(--hf-tape-visible-rows) * (var(--hf-row-h) + 1px)),
        min(52svh, 480px)
    );
    /* Top performers: bounded height, scales down on short viewports */
    --hf-standouts-viewport-h: min(calc(5 * 1.95rem), 26svh);
    /* Copy trading master list: 5 rows visible, up to 15 rows in scroll */
    --hf-copy-masters-viewport-h: min(calc(5 * 1.38rem), 22svh);
    --hf-scroll-size: 5px;
    --hf-scroll-thumb: rgba(148, 163, 184, 0.35);
    --hf-scroll-thumb-hover: rgba(148, 163, 184, 0.58);
    --hf-scroll-thumb-active: rgba(148, 163, 184, 0.72);
    font-family: var(--hf-font);
    color: var(--hf-text);
    max-width: 100%;
    min-width: 0;
}

.hf-pretrend-live-zone h2 {
    font-size: 1.02rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hf-cyan);
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--hf-border);
}

/* ----- Thin scrollbars (desktop + web): avoid heavy OS gutter eating “1st low” etc. ----- */
.hf-pretrend-live-zone .hf-pretrend-live-zone__standouts-scroll,
.hf-pretrend-live-zone .hf-pretrend-live-zone__copy-masters-scroll,
.hf-pretrend-live-zone .hf-pretrend-live-zone__pane--right .hf-pretrend-live-zone__scroller {
    scrollbar-gutter: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--hf-scroll-thumb) transparent;
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__standouts-scroll:hover,
.hf-pretrend-live-zone .hf-pretrend-live-zone__copy-masters-scroll:hover,
.hf-pretrend-live-zone .hf-pretrend-live-zone__pane--right .hf-pretrend-live-zone__scroller:hover {
    scrollbar-color: var(--hf-scroll-thumb-hover) rgba(15, 23, 42, 0.2);
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__standouts-scroll::-webkit-scrollbar,
.hf-pretrend-live-zone .hf-pretrend-live-zone__copy-masters-scroll::-webkit-scrollbar,
.hf-pretrend-live-zone .hf-pretrend-live-zone__pane--right .hf-pretrend-live-zone__scroller::-webkit-scrollbar {
    width: var(--hf-scroll-size);
    height: var(--hf-scroll-size);
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__standouts-scroll::-webkit-scrollbar-track,
.hf-pretrend-live-zone .hf-pretrend-live-zone__copy-masters-scroll::-webkit-scrollbar-track,
.hf-pretrend-live-zone .hf-pretrend-live-zone__pane--right .hf-pretrend-live-zone__scroller::-webkit-scrollbar-track {
    background: transparent;
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__standouts-scroll::-webkit-scrollbar-thumb,
.hf-pretrend-live-zone .hf-pretrend-live-zone__copy-masters-scroll::-webkit-scrollbar-thumb,
.hf-pretrend-live-zone .hf-pretrend-live-zone__pane--right .hf-pretrend-live-zone__scroller::-webkit-scrollbar-thumb {
    background: var(--hf-scroll-thumb);
    border-radius: 100px;
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__standouts-scroll::-webkit-scrollbar-thumb:hover,
.hf-pretrend-live-zone .hf-pretrend-live-zone__copy-masters-scroll::-webkit-scrollbar-thumb:hover,
.hf-pretrend-live-zone .hf-pretrend-live-zone__pane--right .hf-pretrend-live-zone__scroller::-webkit-scrollbar-thumb:hover {
    background: var(--hf-scroll-thumb-hover);
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__standouts-scroll::-webkit-scrollbar-thumb:active,
.hf-pretrend-live-zone .hf-pretrend-live-zone__copy-masters-scroll::-webkit-scrollbar-thumb:active,
.hf-pretrend-live-zone .hf-pretrend-live-zone__pane--right .hf-pretrend-live-zone__scroller::-webkit-scrollbar-thumb:active {
    background: var(--hf-scroll-thumb-active);
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__standouts-scroll::-webkit-scrollbar-corner,
.hf-pretrend-live-zone .hf-pretrend-live-zone__copy-masters-scroll::-webkit-scrollbar-corner,
.hf-pretrend-live-zone .hf-pretrend-live-zone__pane--right .hf-pretrend-live-zone__scroller::-webkit-scrollbar-corner {
    background: transparent;
}

/* Live ops logs: hidden scrollbars (no gutter); thin bars on hover/focus while scrolling still works */
.hf-pretrend-live-zone .hf-pretrend-live-zone__ops-box {
    scrollbar-gutter: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__ops-box:hover,
.hf-pretrend-live-zone .hf-pretrend-live-zone__ops-box:focus-within {
    scrollbar-width: thin;
    scrollbar-color: var(--hf-scroll-thumb) transparent;
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__ops-box::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__ops-box:hover::-webkit-scrollbar,
.hf-pretrend-live-zone .hf-pretrend-live-zone__ops-box:focus-within::-webkit-scrollbar {
    width: var(--hf-scroll-size);
    height: var(--hf-scroll-size);
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__ops-box::-webkit-scrollbar-track {
    background: transparent;
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__ops-box::-webkit-scrollbar-thumb {
    background: var(--hf-scroll-thumb);
    border-radius: 100px;
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__ops-box::-webkit-scrollbar-thumb:hover {
    background: var(--hf-scroll-thumb-hover);
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__ops-box::-webkit-scrollbar-thumb:active {
    background: var(--hf-scroll-thumb-active);
}

.hf-pretrend-live-zone .hf-pretrend-live-zone__ops-box::-webkit-scrollbar-corner {
    background: transparent;
}

/* Two fixed columns on PC/tablet landscape; stack only on narrow phones */
.hf-pretrend-live-zone__grid {
    display: grid;
    grid-template-columns: minmax(240px, 32%) minmax(0, 1fr);
    gap: 14px 16px;
    align-items: stretch;
    min-width: 0;
}

/* Flat right tape; left column uses compact boxed panels below */
.hf-pretrend-live-zone__pane {
    min-width: 0;
    border: none;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    box-shadow: none;
}

.hf-pretrend-live-zone__pane--left {
    padding-right: 4px;
    border-right: 1px solid rgba(148, 163, 184, 0.12);
}

.hf-pretrend-live-zone__pane--right {
    min-width: 0;
    padding-left: 4px;
}

.hf-pretrend-live-zone__pane--right .hf-pretrend-live-zone__toolbar {
    flex-shrink: 0;
}

.hf-pretrend-live-zone__pane--right .hf-pretrend-live-zone__tape-head {
    flex-shrink: 0;
}

/* ~15 tape rows visible on PC (DEFAULT_MAX_ROWS 20 — remaining ~5 via scroll). Narrow stacked: exactly 10 rows, then scroll. */
.hf-pretrend-live-zone__pane--right .hf-pretrend-live-zone__scroller {
    flex: none;
    height: var(--hf-tape-viewport-h);
    min-height: var(--hf-tape-viewport-h);
    max-height: var(--hf-tape-viewport-h);
    min-width: 0;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

@media (max-width: 720px) {
    .hf-pretrend-live-zone {
        /* Wider Pair min + tighter Status/Vol (short chip labels) — room for ≥5-char symbols. */
        --tape-grid: minmax(112px, 1.65fr) 38px minmax(82px, 1fr) minmax(54px, 0.82fr) 40px minmax(44px, 0.72fr);
        /* Always show 10 tape rows before scroll (do not shrink below 10 via svh cap). */
        --hf-tape-visible-rows: 10;
        --hf-tape-viewport-h: calc(10 * (var(--hf-row-h) + 1px));
        /* Fixed 5-row viewport (matches list striping); keeps box height with few items. */
        --hf-standouts-viewport-h: calc(5 * 1.72rem);
        --hf-copy-masters-viewport-h: calc(5 * 1.4rem);
    }

    .hf-pretrend-live-zone__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hf-pretrend-live-zone__pane--left {
        border-right: none;
        padding-right: 0;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    }

    .hf-pretrend-live-zone__pane--right {
        order: -1;
        padding-left: 0;
        /* Space before Zone pulse / Top performers (stacked below LIVE on phones). */
        margin-bottom: 16px;
    }

    .hf-pretrend-row__pair {
        min-width: 0;
        overflow: hidden;
    }

    .hf-pretrend-row__pair .hf-copy-mint {
        width: 18px;
        height: 18px;
    }

    .hf-pretrend-row__sym {
        flex: 1 1 5ch;
        min-width: 5ch;
    }

    .hf-pretrend-row__pct {
        font-size: 0.57rem;
    }

    /* Tape head follows horizontal scroll (synced in JS); fixed min width matches row grid. */
    .hf-pretrend-live-zone {
        --tape-hscroll-min: 400px;
    }

    .hf-pretrend-live-zone__tape-head-track,
    .hf-pretrend-row__inner {
        min-width: var(--tape-hscroll-min);
        width: max(var(--tape-hscroll-min), 100%);
    }

    .hf-pretrend-live-zone__tape-head-track {
        will-change: transform;
    }
}

@media (max-width: 400px) {
    .hf-pretrend-live-zone {
        --tape-grid: minmax(106px, 1.58fr) 34px minmax(76px, 0.95fr) 50px 36px minmax(42px, 0.68fr);
        --tape-hscroll-min: 374px;
    }

    .hf-pretrend-live-zone__standouts > li.hf-standout-item {
        gap: 5px;
        font-size: 0.72rem;
    }

    .hf-copy-mint--standout {
        width: 22px;
        height: 22px;
    }

    .hf-standout-item__copy-spacer {
        width: 22px;
        height: 22px;
    }
}

/* Left column: compact cards (tighter than legacy — clear zones without heavy chrome) */
.hf-pretrend-live-zone__pane--left .hf-pretrend-live-zone__panel {
    background: rgba(11, 15, 24, 0.52);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    padding: 8px 10px;
    margin: 0 0 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.hf-pretrend-live-zone__pane--left .hf-pretrend-live-zone__panel:last-of-type {
    margin-bottom: 0;
}

.hf-pretrend-live-zone__pane--left .hf-pretrend-live-zone__panel-title {
    margin: 0 0 5px;
    font-size: 0.72rem;
    color: var(--hf-secondary);
}

.hf-pretrend-live-zone__pane--left .hf-pretrend-live-zone__statline {
    margin: 0 0 6px;
}

.hf-pretrend-live-zone__pane--left .hf-pretrend-live-zone__statline li {
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hf-pretrend-live-zone__pane--left .hf-pretrend-live-zone__statline li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hf-pretrend-live-zone__pane--left .hf-pretrend-live-zone__placeholder {
    margin: 0;
    line-height: 1.4;
}

.hf-pretrend-live-zone__panel--muted {
    opacity: 0.9;
    flex: 1 1 auto;
    min-height: 10rem;
    display: flex;
    flex-direction: column;
}

.hf-pretrend-live-zone__panel--muted .hf-pretrend-live-zone__placeholder {
    flex: 1 1 auto;
    min-height: 6rem;
}

.hf-pretrend-live-zone__panel-title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hf-muted);
    margin: 0 0 6px;
}

.hf-pretrend-live-zone h3.hf-panel-title--with-emoji {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 0.28em;
    row-gap: 0;
    /* Tight line box so flex cross-axis centers label + emoji together */
    line-height: 1;
    min-height: 1em;
}

.hf-pretrend-live-zone .hf-panel-title__text {
    letter-spacing: inherit;
    text-transform: inherit;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.hf-pretrend-live-zone .hf-panel-title__emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1;
    /* Match label cap height; emoji fonts still sit low in the glyph box */
    font-size: 1em;
    transform: translateY(-0.14em);
}

.hf-pretrend-live-zone__statline {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
    font-size: var(--hf-font-micro);
    color: var(--hf-secondary);
}

.hf-pretrend-live-zone__statline li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
    border-bottom: none;
}

.hf-pretrend-live-zone__statline .hf-k {
    color: var(--hf-muted);
}

.hf-pretrend-live-zone__statline .hf-v {
    font-variant-numeric: tabular-nums;
    color: var(--hf-text);
}

.hf-pretrend-live-zone__statline .hf-v--time {
    font-size: 0.72rem;
    color: var(--hf-cyan);
    white-space: nowrap;
}

.hf-pretrend-live-zone__hint {
    font-size: var(--hf-font-micro);
    color: var(--hf-muted);
    line-height: 1.45;
    margin: 0;
}

.hf-pretrend-live-zone__ops-box {
    font-family: var(--hf-font-ops);
    font-size: calc(var(--hf-font-micro) * 0.84);
    font-weight: 500;
    color: var(--hf-purple);
    line-height: 1.55;
    letter-spacing: 0.02em;
    margin: 6px 0 0;
    padding: 8px 8px 8px 12px;
    min-height: calc(var(--hf-font-micro) * 0.84 * 1.55 * 4 + 16px);
    max-height: min(calc(var(--hf-font-micro) * 0.84 * 1.55 * 4 + 16px), 30svh);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 3px;
    background:
        linear-gradient(180deg, rgba(168, 85, 247, 0.07) 0%, rgba(0, 0, 0, 0.24) 100%),
        rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(168, 85, 247, 0.28);
    border-radius: 6px;
    box-shadow:
        inset 0 1px 0 rgba(168, 85, 247, 0.1),
        0 0 12px rgba(168, 85, 247, 0.06);
    position: relative;
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.hf-pretrend-live-zone__ops-box:focus {
    outline: none;
}

.hf-pretrend-live-zone__ops-box:focus-visible {
    outline: 1px solid rgba(168, 85, 247, 0.35);
    outline-offset: 1px;
}

.hf-pretrend-live-zone__ops-box::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.95), rgba(168, 85, 247, 0.35));
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.35);
    pointer-events: none;
    z-index: 1;
}

.hf-pretrend-live-zone__ops-line {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
    flex: none;
    padding-left: 2px;
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.12);
}

/* ~5 rows visible; up to 10 items scroll inside (matches TOP_PERFORMERS_MAX in zone JS). */
.hf-pretrend-live-zone__standouts-scroll {
    flex: none;
    height: var(--hf-standouts-viewport-h);
    min-height: var(--hf-standouts-viewport-h);
    max-height: var(--hf-standouts-viewport-h);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 2px 2px 3px 2px;
    margin: 0;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background-color: rgba(0, 0, 0, 0.14);
    /* Faint horizontal rules (tape-like rhythm); rows sit on top with their own hover fill. */
    background-image: repeating-linear-gradient(
        180deg,
        transparent 0,
        transparent calc(1.72rem - 1px),
        rgba(148, 163, 184, 0.07) calc(1.72rem - 1px),
        rgba(148, 163, 184, 0.07) 1.72rem
    );
    transition: background-color 0.18s ease;
}

.hf-pretrend-live-zone__standouts-scroll:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.hf-pretrend-live-zone__standouts {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--hf-font-micro);
    color: var(--hf-secondary);
    position: relative;
    z-index: 1;
}

.hf-pretrend-live-zone__standouts > li.hf-standout-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    padding: 5px 4px;
    line-height: 1.35;
    min-width: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 4px;
    transition: background 0.15s ease;
}

.hf-pretrend-live-zone__standouts > li.hf-standout-item:last-child {
    border-bottom: none;
}

.hf-pretrend-live-zone__standouts > li.hf-standout-item--openable {
    cursor: pointer;
}

.hf-pretrend-live-zone__standouts > li.hf-standout-item--openable:hover {
    background: var(--bg-card-hover, rgba(18, 24, 43, 0.35));
}

.hf-pretrend-live-zone__standouts > li.hf-standout-item--openable:active {
    background: rgba(18, 24, 43, 0.48);
}

.hf-pretrend-live-zone__standouts > li.hf-standout-item--openable:focus-visible {
    outline: 1px solid rgba(0, 212, 255, 0.45);
    outline-offset: 1px;
}

.hf-pretrend-live-zone__standouts > li.hf-standout-item--openable:hover .hf-standout-item__main strong {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ----- Copy trading: master list (username · PnL SOL · win %) — 5 rows visible, up to 15 in list ----- */
.hf-pretrend-live-zone__copy-masters-scroll {
    flex: none;
    height: var(--hf-copy-masters-viewport-h);
    min-height: var(--hf-copy-masters-viewport-h);
    max-height: var(--hf-copy-masters-viewport-h);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 2px 2px 3px 2px;
    margin: 0;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background-color: rgba(0, 0, 0, 0.12);
    background-image: repeating-linear-gradient(
        180deg,
        transparent 0,
        transparent calc(1.4rem - 1px),
        rgba(148, 163, 184, 0.06) calc(1.4rem - 1px),
        rgba(148, 163, 184, 0.06) 1.4rem
    );
    transition: background-color 0.18s ease;
}

.hf-pretrend-live-zone__copy-masters-scroll:hover {
    background-color: rgba(0, 0, 0, 0.18);
}

.hf-pretrend-live-zone__copy-masters {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: calc(var(--hf-font-micro) * 0.98);
    color: var(--hf-secondary);
    position: relative;
    z-index: 1;
}

.hf-pretrend-live-zone__copy-masters > li.hf-copy-master-item {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 3px;
    row-gap: 0;
    margin: 0;
    padding: 2px 3px;
    line-height: 1.35;
    min-width: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
    font-size: clamp(0.625rem, 2.15vw, 0.74rem);
}

.hf-pretrend-live-zone__copy-masters > li.hf-copy-master-item:last-child {
    border-bottom: none;
}

.hf-copy-master-item__name {
    min-width: 0;
    font-weight: 600;
    color: var(--hf-cyan);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hf-copy-master-item__stats {
    justify-self: end;
    text-align: right;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--hf-text);
}

.hf-copy-master-item__sep {
    display: inline-block;
    padding: 0 1px;
    opacity: 0.55;
    font-weight: 400;
    color: var(--hf-muted);
}

.hf-copy-master-item__copy-btn {
    margin: 0;
    padding: 1px 5px;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.25;
    text-transform: uppercase;
    color: var(--hf-cyan);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
    white-space: nowrap;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.hf-copy-master-item__copy-btn:hover {
    border-color: var(--hf-cyan);
    background: rgba(0, 212, 255, 0.1);
}

.hf-copy-master-item__copy-btn:focus-visible {
    outline: 1px solid rgba(0, 212, 255, 0.45);
    outline-offset: 1px;
}

.hf-copy-master-item__copy-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: rgba(148, 163, 184, 0.22);
    color: var(--hf-muted);
}

.hf-copy-master-item__copy-btn:disabled:hover {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.6);
}

.hf-pretrend-live-zone__copy-allow-btn {
    display: block;
    width: 100%;
    margin: 8px 0 0;
    padding: 7px 10px;
    box-sizing: border-box;
    font-size: clamp(0.62rem, 1.95vw, 0.72rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(4, 10, 22, 0.94);
    border: 1px solid rgba(0, 212, 255, 0.42);
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(
        108deg,
        #0090b8 0%,
        var(--hf-cyan) 32%,
        #7c3aed 68%,
        var(--hf-purple) 100%
    );
    background-size: 140% 100%;
    background-position: 0% 50%;
    box-shadow:
        0 0 0 1px rgba(0, 212, 255, 0.12) inset,
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 6px 22px rgba(0, 212, 255, 0.12),
        0 4px 18px rgba(168, 85, 247, 0.14);
    transition:
        background-position 0.35s ease,
        filter 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.hf-pretrend-live-zone__copy-allow-btn:hover {
    color: rgba(2, 6, 16, 0.98);
    border-color: rgba(168, 85, 247, 0.55);
    background-position: 100% 50%;
    filter: brightness(1.06) saturate(1.05);
    box-shadow:
        0 0 0 1px rgba(168, 85, 247, 0.22) inset,
        0 1px 0 rgba(255, 255, 255, 0.18) inset,
        0 8px 28px rgba(0, 212, 255, 0.18),
        0 6px 24px rgba(168, 85, 247, 0.22);
}

.hf-pretrend-live-zone__copy-allow-btn:focus-visible {
    outline: 2px solid var(--hf-cyan);
    outline-offset: 2px;
    box-shadow:
        0 0 0 2px rgba(168, 85, 247, 0.35),
        0 0 0 1px rgba(0, 212, 255, 0.12) inset,
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 6px 22px rgba(0, 212, 255, 0.12),
        0 4px 18px rgba(168, 85, 247, 0.14);
}

.hf-copy-master-item__pnl--up {
    color: var(--hf-profit);
    font-weight: 600;
}

.hf-copy-master-item__pnl--down {
    color: var(--hf-loss);
    font-weight: 600;
}

.hf-copy-master-item__pnl--flat {
    color: var(--hf-muted);
}

@media (prefers-reduced-motion: reduce) {
    .hf-pretrend-live-zone__standouts-scroll,
    .hf-pretrend-live-zone__copy-masters-scroll,
    .hf-pretrend-live-zone__standouts > li.hf-standout-item {
        transition: none;
    }
}

.hf-standout-item__copy {
    flex-shrink: 0;
    padding-top: 1px;
}

.hf-standout-item__copy-spacer {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.hf-standout-item__main {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.hf-pretrend-live-zone__standouts .hf-standout-item__main strong {
    color: var(--hf-cyan);
    font-weight: 600;
}

.hf-standout-pct--up {
    color: var(--hf-profit);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.hf-standout-pct--flat {
    color: var(--hf-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.hf-standout-pct--down {
    color: var(--hf-loss);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* Tracked peak-vs-low % on Live zone (see live_zone_ath_pct); italic cyan accent */
.hf-standout-ath {
    font-size: calc(var(--hf-font-micro) * 0.88);
    color: var(--hf-cyan);
    font-style: italic;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    opacity: 0.92;
    white-space: nowrap;
}

.hf-pretrend-live-zone__standouts-empty {
    list-style: none;
    margin: 0;
    padding: 2px 0;
    color: var(--hf-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.hf-pretrend-live-zone__placeholder {
    font-size: var(--hf-font-micro);
    color: var(--hf-muted);
    line-height: 1.45;
    margin: 0;
}

/* ----- Tape (exchange-style rows) ----- */
.hf-pretrend-live-zone__toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
    font-size: var(--hf-font-micro);
    row-gap: 4px;
}

.hf-pretrend-live-zone__toolbar-meta {
    color: var(--hf-muted);
}

.hf-pretrend-live-zone__toolbar-meta--right {
    margin-left: auto;
}

.hf-pretrend-live-zone__toolbar-meta--right[data-poll-state]:empty {
    display: none;
}

.hf-pretrend-live-zone__badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.hf-pretrend-live-zone__badge--live {
    color: #022;
    background: linear-gradient(90deg, var(--hf-profit), #34d399);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.35);
    animation: hf-live-badge-blink 2.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .hf-pretrend-live-zone__badge--live {
        animation: none;
        opacity: 1;
    }
}

@keyframes hf-live-badge-blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.hf-pretrend-live-zone__tape-head {
    min-width: 0;
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: transparent;
}

.hf-pretrend-live-zone__tape-head-track {
    display: grid;
    grid-template-columns: var(--tape-grid);
    column-gap: 8px;
    row-gap: 0;
    align-items: end;
    padding: 6px 4px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hf-muted);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.hf-th {
    min-width: 0;
}

.hf-th--pair {
    text-align: left;
}

.hf-th--num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.hf-th--status {
    text-align: left;
}

.hf-pretrend-live-zone__scroller {
    border: none;
    border-radius: 0;
    background: transparent;
}

.hf-pretrend-row {
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    min-height: var(--hf-row-h);
    transition: background 0.15s ease;
}

.hf-pretrend-row:hover {
    background: var(--bg-card-hover, rgba(18, 24, 43, 0.35));
}

.hf-pretrend-row__inner {
    display: grid;
    grid-template-columns: var(--tape-grid);
    column-gap: 8px;
    row-gap: 0;
    align-items: center;
    padding: 5px 4px;
    font-size: var(--hf-font-tape);
    line-height: 1.25;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    cursor: pointer;
}

@media (max-width: 520px) {
    .hf-pretrend-live-zone {
        --hf-font-tape: 0.74rem;
        --hf-row-h: 34px;
    }

    .hf-pretrend-live-zone__tape-head-track,
    .hf-pretrend-row__inner {
        padding-left: 2px;
        padding-right: 2px;
        column-gap: 6px;
    }
}

.hf-pretrend-row__pair {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    min-width: 0;
    max-width: 100%;
}

.hf-copy-mint {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(0, 212, 255, 0.28);
    border-radius: 4px;
    background: rgba(0, 212, 255, 0.08);
    color: var(--hf-cyan);
    cursor: pointer;
    font-size: 0;
    line-height: 0;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.1s ease;
}

.hf-copy-mint:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.55);
}

.hf-copy-mint:active {
    transform: scale(0.96);
}

.hf-copy-mint--done {
    border-color: rgba(0, 255, 136, 0.5);
    background: rgba(0, 255, 136, 0.15);
    color: var(--hf-profit);
}

.hf-copy-mint__icon {
    pointer-events: none;
    display: block;
    flex-shrink: 0;
}

/* Standouts: class matches tape control; size tweaked in narrow @media above. */
.hf-copy-mint--standout {
    width: 20px;
    height: 20px;
}

.hf-copy-mint--modal {
    width: 26px;
    height: 26px;
    border-radius: 6px;
}

.hf-pretrend-row__sym {
    font-weight: 700;
    color: var(--hf-text);
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 0 1 auto;
}

.hf-pretrend-row__pct {
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.hf-pretrend-row__pct.hf-pct--up {
    color: var(--hf-profit);
}

.hf-pretrend-row__pct.hf-pct--flat {
    color: var(--hf-muted);
}

.hf-pretrend-row__pct.hf-pct--down {
    color: var(--hf-loss);
}

.hf-pretrend-row__age {
    font-variant-numeric: tabular-nums;
    color: var(--hf-secondary);
    white-space: nowrap;
}

.hf-pretrend-row__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    max-width: 100%;
}

.hf-chip {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.59rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.25;
}

.hf-chip--pending {
    color: var(--hf-cyan);
    border-color: rgba(0, 212, 255, 0.35);
    background: rgba(0, 212, 255, 0.08);
}

/* Status text tones (tape chips): strong / caution / go / unknown-new */
.hf-chip--tone-blue {
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.48);
    background: rgba(14, 116, 144, 0.22);
}

.hf-chip--tone-orange {
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.52);
    background: rgba(234, 88, 12, 0.14);
}

.hf-chip--tone-green {
    color: #6ee7b7;
    border-color: rgba(52, 211, 153, 0.55);
    background: rgba(16, 185, 129, 0.16);
}

.hf-chip--tone-white {
    color: #f1f5f9;
    border-color: rgba(226, 232, 240, 0.32);
    background: rgba(248, 250, 252, 0.07);
}

.hf-chip--tone-blue,
.hf-chip--tone-orange,
.hf-chip--tone-green,
.hf-chip--tone-white {
    font-size: 0.59rem;
    letter-spacing: 0.03em;
}

.hf-chip--blocked {
    color: var(--hf-loss);
    border-color: rgba(255, 71, 87, 0.35);
    background: rgba(255, 71, 87, 0.08);
}

.hf-chip--early {
    color: var(--hf-purple);
    border-color: rgba(168, 85, 247, 0.4);
    background: rgba(168, 85, 247, 0.1);
}

.hf-chip--mom {
    color: #7cfcdf;
    border-color: rgba(0, 255, 200, 0.35);
    background: rgba(0, 255, 200, 0.07);
    animation: hf-chip-glow 2.5s ease-in-out infinite;
    text-transform: none;
    font-size: 0.74rem;
    font-weight: 400;
    letter-spacing: 0;
    padding: 1px 4px;
    line-height: 1.1;
}

.hf-chip--cold {
    color: var(--hf-muted);
    border-color: rgba(100, 116, 139, 0.4);
    background: rgba(100, 116, 139, 0.12);
    text-transform: none;
    font-size: 0.74rem;
    font-weight: 400;
    letter-spacing: 0;
    padding: 1px 4px;
    line-height: 1.1;
}

.hf-chip--vol {
    color: #7dd3fc;
    border-color: rgba(125, 211, 252, 0.35);
    background: rgba(56, 189, 248, 0.08);
    text-transform: none;
    font-size: 0.74rem;
    font-weight: 400;
    letter-spacing: 0;
    padding: 1px 4px;
    line-height: 1.1;
}

.hf-chip--weak {
    color: var(--hf-warn);
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.08);
    text-transform: none;
    font-size: 0.74rem;
    font-weight: 400;
    letter-spacing: 0;
    padding: 1px 4px;
    line-height: 1.1;
}

.hf-chip--dump {
    color: #fda4af;
    border-color: rgba(251, 113, 133, 0.45);
    background: rgba(244, 63, 94, 0.12);
}

.hf-chip--h24 {
    color: var(--hf-warn);
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.1);
}

.hf-chip--time {
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.45);
    background: rgba(139, 92, 246, 0.12);
    text-transform: none;
    font-size: 0.74rem;
    font-weight: 400;
    letter-spacing: 0;
    padding: 1px 4px;
    line-height: 1.1;
}

.hf-chip--entry {
    color: #6ee7b7;
    border-color: rgba(52, 211, 153, 0.45);
    background: rgba(16, 185, 129, 0.1);
    text-transform: none;
    font-size: 0.74rem;
    font-weight: 400;
    letter-spacing: 0;
    padding: 1px 4px;
    line-height: 1.1;
}

@keyframes hf-chip-glow {
    0%,
    100% {
        box-shadow: 0 0 0 rgba(0, 255, 200, 0);
    }
    50% {
        box-shadow: 0 0 10px rgba(0, 255, 200, 0.15);
    }
}

.hf-pretrend-cell {
    font-variant-numeric: tabular-nums;
    color: var(--hf-secondary);
    white-space: nowrap;
}

.hf-pretrend-cell--num {
    text-align: right;
}

.hf-pretrend-cell--mono {
    font-size: 0.72rem;
    letter-spacing: 0.01em;
}

/* Field flash when value changes (live “talking”) */
.hf-pretrend-cell.hf-flash-up {
    animation: hf-cell-flash-up 0.65s ease-out;
}

.hf-pretrend-cell.hf-flash-down {
    animation: hf-cell-flash-down 0.65s ease-out;
}

.hf-pretrend-cell.hf-flash-warn {
    animation: hf-cell-flash-warn 0.65s ease-out;
}

.hf-pretrend-row__pct.hf-flash-up {
    animation: hf-cell-flash-up 0.65s ease-out;
}

.hf-pretrend-row__pct.hf-flash-down {
    animation: hf-cell-flash-down 0.65s ease-out;
}

.hf-pretrend-row__pct.hf-flash-warn {
    animation: hf-cell-flash-warn 0.65s ease-out;
}

.hf-pretrend-row.hf-row-pulse-mom {
    animation: hf-row-mom 0.9s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .hf-chip--mom {
        animation: none;
    }

    .hf-pretrend-cell.hf-flash-up,
    .hf-pretrend-cell.hf-flash-down,
    .hf-pretrend-cell.hf-flash-warn,
    .hf-pretrend-row__pct.hf-flash-up,
    .hf-pretrend-row__pct.hf-flash-down,
    .hf-pretrend-row__pct.hf-flash-warn,
    .hf-pretrend-row.hf-row-pulse-mom {
        animation: none !important;
    }
}

@keyframes hf-cell-flash-up {
    0% {
        color: var(--hf-profit);
        text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
    }
    100% {
        color: var(--hf-secondary);
        text-shadow: none;
    }
}

@keyframes hf-cell-flash-down {
    0% {
        color: var(--hf-loss);
        text-shadow: 0 0 8px rgba(255, 71, 87, 0.45);
    }
    100% {
        color: var(--hf-secondary);
        text-shadow: none;
    }
}

@keyframes hf-cell-flash-warn {
    0% {
        color: var(--hf-warn);
    }
    100% {
        color: var(--hf-secondary);
    }
}

@keyframes hf-row-mom {
    0% {
        box-shadow: inset 0 0 0 1px rgba(0, 255, 200, 0.45);
        background: rgba(0, 255, 200, 0.06);
    }
    100% {
        box-shadow: inset 0 0 0 0 transparent;
        background: transparent;
    }
}

/* ----- Token detail modal (tape / standouts row click; copy mint unchanged) ----- */
.hf-token-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(12px, 2vh) 12px 24px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.hf-token-detail-modal[hidden] {
    display: none !important;
}

.hf-token-detail-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 18, 0.72);
    backdrop-filter: blur(4px);
}

.hf-token-detail-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(92vh, 900px);
    overflow: hidden auto;
    margin-top: min(4vh, 32px);
    border-radius: 12px;
    border: 1px solid var(--hf-border);
    background: var(--hf-bg);
    box-shadow:
        0 0 0 1px rgba(0, 212, 255, 0.12),
        0 24px 48px rgba(0, 0, 0, 0.45);
    padding: 18px 18px 20px;
    box-sizing: border-box;
}

.hf-token-detail-modal__x {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.65);
    color: var(--hf-text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.hf-token-detail-modal__x:hover {
    border-color: var(--hf-cyan);
    color: var(--hf-cyan);
    background: rgba(0, 212, 255, 0.12);
}

.hf-token-detail-modal__title {
    margin: 0 44px 6px 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hf-cyan);
}

.hf-token-detail-modal__sub {
    margin: 0 44px 10px 0;
    font-size: 0.82rem;
    color: var(--hf-secondary);
    line-height: 1.4;
}

.hf-token-detail-modal__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin: 0 44px 14px 0;
    min-height: 0;
}

.hf-token-detail-modal__chips:empty {
    display: none !important;
}

.hf-token-detail-modal__dl {
    display: grid;
    grid-template-columns: minmax(100px, 34%) 1fr;
    gap: 6px 12px;
    margin: 0 0 16px;
    font-size: 0.82rem;
}

.hf-token-detail-modal__dl dt {
    margin: 0;
    color: var(--hf-muted);
    font-weight: 500;
}

.hf-token-detail-modal__dl dd {
    margin: 0;
    color: var(--hf-text);
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.hf-token-detail-modal__contract {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hf-token-detail-modal__contract code,
.hf-token-detail-modal__mono {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
    font-size: 0.78rem;
    color: var(--hf-secondary);
    background: rgba(15, 23, 42, 0.55);
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.hf-token-detail-modal__muted {
    color: var(--hf-muted);
    font-weight: 400;
    font-size: 0.76rem;
}

.hf-token-detail-modal__price-line {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15em 0.45em;
}

.hf-token-detail-modal__price-num {
    font-variant-numeric: tabular-nums;
}

.hf-token-detail-modal .hf-modal-pct {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hf-token-detail-modal .hf-modal-pct--up {
    color: var(--hf-profit);
}

.hf-token-detail-modal .hf-modal-pct--down {
    color: var(--hf-loss);
}

.hf-token-detail-modal .hf-modal-pct--flat {
    color: var(--hf-muted);
}

.hf-token-detail-modal__ath {
    color: var(--hf-cyan);
    font-style: italic;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    font-size: 0.92em;
    opacity: 0.95;
}

.hf-token-detail-modal__chart-block {
    margin-top: 4px;
    margin-bottom: 14px;
}

.hf-token-detail-modal__chart-block:last-child {
    margin-bottom: 0;
}

.hf-token-detail-modal__chart-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 8px;
}

.hf-token-detail-modal__chart-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hf-purple);
}

.hf-token-detail-modal__dex-link {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--hf-cyan);
    text-decoration: none;
    white-space: nowrap;
}

.hf-token-detail-modal__dex-link:hover {
    text-decoration: underline;
}

.hf-token-detail-modal__tv-frame {
    display: block;
    width: 100%;
    height: min(480px, 54vh);
    min-height: 300px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    background: #0b0e14;
}

@media (max-width: 520px) {
    .hf-token-detail-modal__dialog {
        padding: 14px 12px 16px;
    }

    .hf-token-detail-modal__tv-frame {
        height: min(360px, 48vh);
        min-height: 250px;
    }
}

/* ----- Copy trade modal (master row · Copy) — same shell pattern as token modal, compact body ----- */
.hf-copy-trade-modal {
    position: fixed;
    inset: 0;
    z-index: 10051;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(12px, 2vh) max(12px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px))
        max(12px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.hf-copy-trade-modal[hidden] {
    display: none !important;
}

.hf-copy-trade-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 18, 0.72);
    backdrop-filter: blur(4px);
}

.hf-copy-trade-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 20px));
    max-height: min(90vh, 720px);
    overflow: hidden auto;
    margin-top: min(4vh, 28px);
    border-radius: 12px;
    border: 1px solid var(--hf-border);
    background: var(--hf-bg);
    box-shadow:
        0 0 0 1px rgba(0, 212, 255, 0.12),
        0 24px 48px rgba(0, 0, 0, 0.45);
    padding: 16px 16px 18px;
    box-sizing: border-box;
}

.hf-copy-trade-modal__x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.65);
    color: var(--hf-text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.hf-copy-trade-modal__x:hover {
    border-color: var(--hf-cyan);
    color: var(--hf-cyan);
    background: rgba(0, 212, 255, 0.12);
}

.hf-copy-trade-modal__title {
    margin: 0 44px 8px 0;
    font-size: clamp(0.92rem, 3.2vw, 1.08rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--hf-cyan);
    line-height: 1.25;
    word-break: break-word;
}

.hf-copy-trade-modal__stats {
    margin: 0 44px 14px 0;
    padding: 0;
    font-size: clamp(0.72rem, 2.6vw, 0.9rem);
    font-variant-numeric: tabular-nums;
    white-space: normal;
    color: var(--hf-text);
    line-height: 1.4;
}

.hf-copy-trade-modal__sep {
    opacity: 0.5;
    padding: 0 0.2em;
    font-weight: 400;
    color: var(--hf-muted);
}

.hf-copy-trade-modal__last-trade {
    color: var(--hf-muted);
    font-weight: 500;
    font-size: 0.92em;
}

.hf-copy-trade-modal__last-trade-label {
    color: var(--hf-purple);
    font-weight: 600;
}

.hf-copy-trade-modal__hint {
    margin: 0;
    font-size: clamp(0.76rem, 2.4vw, 0.85rem);
    line-height: 1.45;
    color: var(--hf-muted);
}

.hf-copy-trade-modal__dl {
    display: grid;
    grid-template-columns: minmax(0, 38%) 1fr;
    gap: 6px 12px;
    margin: 0 44px 14px 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.45);
    font-size: clamp(0.72rem, 2.5vw, 0.86rem);
    line-height: 1.35;
}

.hf-copy-trade-modal__dl dt {
    margin: 0;
    color: var(--hf-muted);
    font-weight: 600;
}

.hf-copy-trade-modal__dl dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
    color: var(--hf-text);
    text-align: right;
    word-break: break-word;
}

.hf-copy-trade-modal__dd-sub {
    font-weight: 400;
    color: var(--hf-muted);
    font-size: 0.92em;
}

.hf-copy-trade-modal__subhd {
    margin: 0 0 6px;
    font-size: clamp(0.78rem, 2.5vw, 0.88rem);
    font-weight: 600;
    color: var(--hf-text);
}

.hf-copy-trade-modal__req {
    margin: 0 44px 12px 0;
}

.hf-copy-trade-modal__reqlist {
    margin: 0;
    padding-left: 1.15rem;
    font-size: clamp(0.74rem, 2.4vw, 0.86rem);
    line-height: 1.45;
    color: var(--hf-muted);
}

.hf-copy-trade-modal__reqlist li {
    margin-bottom: 4px;
}

.hf-copy-trade-modal__platform-fee {
    margin: 10px 0 0;
    font-size: clamp(0.7rem, 2.2vw, 0.8rem);
    line-height: 1.5;
    color: var(--hf-secondary);
    word-break: break-word;
}

.hf-copy-trade-modal__platform-fee .hf-copy-trade-modal__fee-code {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
    font-size: 0.92em;
    color: var(--hf-text);
}

.hf-copy-trade-modal__note {
    margin: 0 44px 14px 0;
    font-size: clamp(0.74rem, 2.4vw, 0.86rem);
    line-height: 1.45;
    color: var(--hf-muted);
}

.hf-copy-trade-modal__wallet-block {
    margin: 0 44px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hf-copy-trade-modal__wallet-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hf-copy-trade-modal__wallet-picker-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hf-copy-trade-modal__wallet-picker-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.hf-copy-trade-modal__faq {
    flex-shrink: 0;
    padding: 5px 10px;
    font-size: clamp(0.64rem, 2vw, 0.74rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 42%, #2563eb 72%, #0891b2 100%);
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
}

.hf-copy-trade-modal__faq:hover {
    filter: brightness(1.08);
}

.hf-copy-trade-modal__faq:focus-visible {
    outline: 2px solid rgba(167, 139, 250, 0.85);
    outline-offset: 2px;
}

.hf-copy-trade-modal__picker-label {
    font-size: clamp(0.72rem, 2.3vw, 0.82rem);
    font-weight: 600;
    color: var(--hf-muted);
}

.hf-copy-trade-modal__wallet-select {
    width: 100%;
    max-width: 100%;
    min-height: 38px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.75);
    color: var(--hf-text);
    font-size: clamp(0.76rem, 2.4vw, 0.88rem);
}

.hf-copy-trade-modal__mobile-links {
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.35);
}

.hf-copy-trade-modal__mobile-links-legend {
    margin: 0 0 6px;
    font-size: clamp(0.7rem, 2.3vw, 0.82rem);
    color: var(--hf-muted);
    line-height: 1.35;
}

.hf-copy-trade-modal__mobile-links-row {
    margin: 0;
    font-size: clamp(0.74rem, 2.4vw, 0.86rem);
}

.hf-copy-trade-modal__mobile-link {
    color: var(--hf-cyan);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hf-copy-trade-modal__mobile-link:hover {
    color: #7ee8ff;
}

.hf-copy-trade-modal__mobile-sep {
    padding: 0 0.25em;
    color: var(--hf-muted);
    user-select: none;
}

.hf-copy-trade-modal__wallet-label {
    font-size: clamp(0.74rem, 2.4vw, 0.86rem);
    color: var(--hf-text);
    font-variant-numeric: tabular-nums;
    min-width: 0;
    flex: 1;
}

.hf-copy-trade-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: clamp(0.78rem, 2.5vw, 0.9rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.55);
    color: var(--hf-text);
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.hf-copy-trade-modal__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.hf-copy-trade-modal__btn--ghost:hover:not(:disabled) {
    border-color: var(--hf-cyan);
    color: var(--hf-cyan);
}

.hf-copy-trade-modal__btn--primary {
    border-color: rgba(0, 212, 255, 0.45);
    background: linear-gradient(165deg, rgba(0, 212, 255, 0.22), rgba(15, 23, 42, 0.9));
    color: #e8f7ff;
}

.hf-copy-trade-modal__btn--primary:hover:not(:disabled) {
    border-color: var(--hf-cyan);
    background: linear-gradient(165deg, rgba(0, 212, 255, 0.32), rgba(15, 23, 42, 0.85));
}

.hf-copy-trade-modal__btn--stop {
    border-color: rgba(248, 113, 113, 0.45);
    background: linear-gradient(165deg, rgba(248, 113, 113, 0.18), rgba(15, 23, 42, 0.92));
    color: #ffecec;
}

.hf-copy-trade-modal__btn--stop:hover:not(:disabled) {
    border-color: #f87171;
}

.hf-copy-trade-modal__btn--fund {
    border-color: rgba(250, 204, 21, 0.5);
    background: linear-gradient(165deg, rgba(250, 204, 21, 0.2), rgba(15, 23, 42, 0.92));
    color: #fff8e1;
}

.hf-copy-trade-modal__btn--fund:hover:not(:disabled) {
    border-color: #facc15;
    background: linear-gradient(165deg, rgba(250, 204, 21, 0.32), rgba(15, 23, 42, 0.88));
}

.hf-copy-trade-modal__btn--connected {
    border-color: rgba(52, 211, 153, 0.55);
    background: rgba(16, 185, 129, 0.14);
    color: #bbf7d0;
}

.hf-copy-trade-modal__btn--connected:hover:not(:disabled) {
    border-color: #34d399;
    color: #ecfdf5;
}

.hf-copy-trade-modal__btn--pnl {
    font-weight: 600;
}

.hf-copy-trade-modal__footmsg {
    margin: 0;
    font-size: clamp(0.72rem, 2.4vw, 0.84rem);
    line-height: 1.4;
    color: var(--hf-cyan);
}

.hf-copy-trade-modal__footmsg[data-hf-err="1"] {
    color: #fca5a5;
}

@media (max-width: 520px) {
    .hf-copy-trade-modal__dl,
    .hf-copy-trade-modal__req,
    .hf-copy-trade-modal__note,
    .hf-copy-trade-modal__wallet-block,
    .hf-copy-trade-modal__wallet-picker-wrap,
    .hf-copy-trade-modal__mobile-links {
        margin-right: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hf-copy-trade-modal__x {
        transition: none;
    }
}

@media (max-width: 520px) {
    .hf-copy-trade-modal__dialog {
        width: calc(100vw - 16px);
        padding: 14px 12px 16px;
    }

    .hf-copy-trade-modal__title {
        margin-right: 40px;
    }

    .hf-copy-trade-modal__stats {
        margin-right: 40px;
    }
}

@media (max-width: 360px) {
    .hf-pretrend-live-zone__copy-masters > li.hf-copy-master-item {
        column-gap: 2px;
        padding: 2px 2px;
    }

    .hf-copy-master-item__copy-btn {
        padding: 1px 4px;
        letter-spacing: 0.03em;
    }
}

/* ----- Auto-copy grant (centered, above copy trade modal) ----- */
.hf-copy-grant-modal {
    position: fixed;
    inset: 0;
    z-index: 10070;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, 3vh) max(16px, env(safe-area-inset-right, 0px))
        max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
}

.hf-copy-grant-modal[hidden] {
    display: none !important;
}

.hf-copy-grant-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 18, 0.82);
    backdrop-filter: blur(6px);
}

.hf-copy-grant-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(440px, calc(100vw - 24px));
    max-height: min(88vh, 560px);
    overflow: auto;
    border-radius: 14px;
    border: 1px solid rgba(0, 212, 255, 0.28);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(8, 12, 24, 0.99) 100%);
    box-shadow:
        0 0 0 1px rgba(0, 212, 255, 0.1),
        0 28px 56px rgba(0, 0, 0, 0.55);
    padding: 22px 20px 20px;
    box-sizing: border-box;
}

.hf-copy-grant-modal__title {
    margin: 0 0 12px;
    font-size: clamp(1.05rem, 3.2vw, 1.2rem);
    font-weight: 700;
    color: var(--hf-cyan);
    letter-spacing: 0.02em;
}

.hf-copy-grant-modal__lead {
    margin: 0 0 14px;
    font-size: clamp(0.82rem, 2.6vw, 0.92rem);
    line-height: 1.5;
    color: var(--hf-text);
}

.hf-copy-grant-modal__list {
    margin: 0 0 14px;
    padding-left: 1.15rem;
    font-size: clamp(0.78rem, 2.4vw, 0.88rem);
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.92);
}

.hf-copy-grant-modal__list li + li {
    margin-top: 6px;
}

.hf-copy-grant-modal__fund {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.22);
    background: rgba(0, 212, 255, 0.06);
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--hf-cyan);
}

.hf-copy-grant-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.hf-copy-grant-modal__btn {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 9px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        opacity 0.15s ease;
}

.hf-copy-grant-modal__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.hf-copy-grant-modal__btn--ghost {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--hf-text);
}

.hf-copy-grant-modal__btn--ghost:hover:not(:disabled) {
    background: rgba(30, 41, 59, 0.85);
}

.hf-copy-grant-modal__btn--primary {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.35), rgba(56, 189, 248, 0.22));
    border-color: rgba(0, 212, 255, 0.55);
    color: #e0f7ff;
}

.hf-copy-grant-modal__btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.48), rgba(56, 189, 248, 0.32));
}

/* ----- My PnL info (stacked above copy trade modal) ----- */
.hf-copy-pnl-modal {
    position: fixed;
    inset: 0;
    z-index: 10053;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(12px, 2vh) max(12px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px))
        max(12px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.hf-copy-pnl-modal[hidden] {
    display: none !important;
}

.hf-copy-pnl-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 18, 0.78);
    backdrop-filter: blur(5px);
}

.hf-copy-pnl-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 20px));
    max-height: min(88vh, 680px);
    overflow: hidden auto;
    margin-top: min(3vh, 22px);
    border-radius: 14px;
    border: 1px solid rgba(0, 212, 255, 0.22);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.98), rgba(8, 12, 28, 0.99));
    box-shadow:
        0 0 0 1px rgba(0, 212, 255, 0.14),
        0 28px 56px rgba(0, 0, 0, 0.5);
    padding: 16px 16px 18px;
    box-sizing: border-box;
}

.hf-copy-pnl-modal__x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.65);
    color: var(--hf-text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.hf-copy-pnl-modal__x:hover {
    border-color: var(--hf-cyan);
    color: var(--hf-cyan);
}

.hf-copy-pnl-modal__title {
    margin: 0 44px 6px 0;
    font-size: clamp(1rem, 3.2vw, 1.12rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--hf-cyan);
}

.hf-copy-pnl-modal__sub {
    margin: 0 44px 14px 0;
    font-size: clamp(0.72rem, 2.4vw, 0.84rem);
    color: var(--hf-muted);
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

.hf-copy-pnl-modal__exec-note {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.35);
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--hf-muted);
}

.hf-copy-pnl-modal__exec-note[data-hf-warn="1"] {
    border-color: rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.1);
    color: #fde68a;
}

.hf-copy-pnl-modal__session {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--hf-text, #e8e8ec);
}

.hf-copy-pnl-modal__session[data-hf-inactive="1"] {
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.08);
}

.hf-copy-pnl-modal__session strong {
    font-weight: 600;
}

.hf-copy-pnl-modal__wallets {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.22);
    background: rgba(0, 212, 255, 0.05);
    font-size: 0.84rem;
}

.hf-copy-pnl-modal__wallets[hidden] {
    display: none !important;
}

.hf-copy-pnl-modal__wallet-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.hf-copy-pnl-modal__wallet-row--total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    font-weight: 600;
}

.hf-copy-pnl-modal__wallet-k {
    color: var(--hf-muted);
}

.hf-copy-pnl-modal__wallet-v {
    color: var(--hf-cyan);
    font-variant-numeric: tabular-nums;
}

.hf-copy-pnl-modal__wallet-addr {
    margin: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hf-copy-pnl-modal__wallet-code {
    font-size: 0.72rem;
    word-break: break-all;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.65);
    padding: 6px 8px;
    border-radius: 6px;
}

.hf-copy-pnl-modal__actions {
    margin: 0 0 12px;
}

.hf-copy-pnl-modal__actions[hidden] {
    display: none !important;
}

.hf-copy-pnl-modal__balance-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--hf-muted);
    line-height: 1.35;
}

.hf-copy-pnl-modal__balance-hint[hidden] {
    display: none !important;
}

.hf-copy-pnl-modal__session-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    font-size: 0.82rem;
    cursor: pointer;
}

.hf-copy-pnl-modal__session-btn:hover {
    background: rgba(239, 68, 68, 0.22);
}

.hf-copy-pnl-modal__refresh-btn {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.14);
    color: #bbf7d0;
}

.hf-copy-pnl-modal__refresh-btn:hover {
    background: rgba(34, 197, 94, 0.24);
    border-color: rgba(74, 222, 128, 0.55);
    color: #dcfce7;
}

.hf-copy-pnl-modal__loading {
    margin: 12px 0;
    font-size: 0.9rem;
    color: var(--hf-muted);
}

.hf-copy-pnl-modal__body {
    margin-top: 4px;
}

.hf-copy-pnl-modal__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.hf-copy-pnl-modal__card {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 72px;
    box-sizing: border-box;
}

.hf-copy-pnl-modal__card--wide {
    grid-column: 1 / -1;
}

.hf-copy-pnl-modal__k {
    font-size: clamp(0.68rem, 2.2vw, 0.78rem);
    font-weight: 600;
    color: var(--hf-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hf-copy-pnl-modal__v {
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--hf-text);
    line-height: 1.2;
}

.hf-copy-pnl-modal__v--wrap {
    font-size: clamp(0.85rem, 2.6vw, 1rem);
    font-weight: 600;
    white-space: normal;
    word-break: break-word;
}

.hf-copy-pnl-modal__v.hf-copy-pnl-modal__v--up {
    color: #6ee7b7;
}

.hf-copy-pnl-modal__v.hf-copy-pnl-modal__v--down {
    color: #fca5a5;
}

.hf-copy-pnl-modal__hd {
    margin: 0 0 8px;
    font-size: clamp(0.82rem, 2.5vw, 0.92rem);
    font-weight: 600;
    color: var(--hf-text);
}

.hf-copy-pnl-modal__history-scroll {
    max-height: min(220px, 32vh);
    overflow: auto;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 18, 0.45);
}

.hf-copy-pnl-modal__history {
    list-style: none;
    margin: 0;
    padding: 8px 10px;
}

.hf-copy-pnl-modal__history li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 12px;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    font-size: clamp(0.72rem, 2.3vw, 0.84rem);
    color: var(--hf-text);
}

.hf-copy-pnl-modal__history li:last-child {
    border-bottom: none;
}

.hf-copy-pnl-modal__history-empty {
    margin: 0;
    padding: 16px 8px;
    text-align: center;
    color: var(--hf-muted);
    font-size: 0.85rem;
}

.hf-copy-pnl-modal__open-list {
    margin: 6px 0 12px;
    padding: 0;
    list-style: none;
}

.hf-copy-pnl-modal__open-list li {
    margin: 0 0 6px;
    font-size: 0.82rem;
}

.hf-copy-pnl-modal__open-mint {
    font-weight: 600;
}

.hf-copy-pnl-modal__open-qty {
    color: var(--hf-muted);
}

.hf-copy-pnl-modal__ledger-list {
    margin: 6px 0 12px;
    padding: 0;
    list-style: none;
    max-height: 280px;
    overflow-y: auto;
}

.hf-copy-pnl-modal__ledger-item {
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
}

.hf-copy-pnl-modal__ledger-head {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.hf-copy-pnl-modal__ledger-desc {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
    font-size: 0.65rem;
    color: var(--hf-muted);
    word-break: break-all;
    margin-bottom: 6px;
}

.hf-copy-pnl-modal__ledger-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    font-size: 0.72rem;
    color: var(--hf-secondary);
}

.hf-copy-pnl-modal__ledger-grid span:nth-child(odd) {
    color: var(--hf-muted);
}

.hf-ledger-pnl--up {
    color: #6ee7b7;
    font-weight: 600;
}

.hf-ledger-pnl--down {
    color: #fca5a5;
    font-weight: 600;
}

.hf-copy-pnl-modal__hist-right.hf-ledger-pnl--up,
.hf-copy-pnl-modal__hist-right.hf-ledger-pnl--down {
    font-weight: 600;
}

.hf-copy-pnl-modal__err {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: #fca5a5;
}

.hf-copy-pnl-modal__err.hf-copy-pnl-modal__err--info {
    color: var(--hf-muted, #94a3b8);
}

.hf-copy-withdraw-modal {
    z-index: 10075;
}

.hf-copy-pnl-modal__withdraw-status {
    margin: 10px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.28);
    background: rgba(0, 212, 255, 0.07);
    font-size: 0.84rem;
    line-height: 1.5;
    color: #e2e8f0;
}

.hf-copy-pnl-modal__withdraw-status[data-hf-pending="1"] {
    border-color: rgba(250, 204, 21, 0.45);
    background: rgba(250, 204, 21, 0.08);
    color: #fef9c3;
}

.hf-copy-pnl-modal__withdraw-status[data-hf-success="1"] {
    border-color: rgba(52, 211, 153, 0.45);
    background: rgba(52, 211, 153, 0.1);
    color: #d1fae5;
}

.hf-copy-pnl-modal__withdraw-status[data-hf-error="1"] {
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(248, 113, 113, 0.1);
    color: #fecaca;
}

.hf-copy-pnl-modal__withdraw-status a {
    color: var(--hf-cyan);
    text-decoration: underline;
}

.hf-copy-pnl-modal__session-btn[data-hf-withdraw-busy="1"] {
    opacity: 0.65;
    cursor: wait;
}

@media (max-width: 520px) {
    .hf-copy-pnl-modal__grid {
        grid-template-columns: 1fr;
    }

    .hf-copy-pnl-modal__card--wide {
        grid-column: auto;
    }
}

/* ----- Copy master request modal (allow others to copy) ----- */
.hf-copy-master-request-modal {
    position: fixed;
    inset: 0;
    z-index: 10052;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(12px, 2vh) max(12px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px))
        max(12px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.hf-copy-master-request-modal[hidden] {
    display: none !important;
}

.hf-copy-master-request-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 18, 0.72);
    backdrop-filter: blur(4px);
}

.hf-copy-master-request-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(480px, calc(100vw - 20px));
    max-height: min(92vh, 820px);
    overflow: hidden auto;
    margin-top: min(4vh, 28px);
    border-radius: 12px;
    border: 1px solid var(--hf-border);
    background: var(--hf-bg);
    box-shadow:
        0 0 0 1px rgba(0, 212, 255, 0.12),
        0 24px 48px rgba(0, 0, 0, 0.45);
    padding: 16px 16px 18px;
    box-sizing: border-box;
}

.hf-copy-master-request-modal__x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.65);
    color: var(--hf-text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.hf-copy-master-request-modal__x:hover {
    border-color: var(--hf-cyan);
    color: var(--hf-cyan);
    background: rgba(0, 212, 255, 0.12);
}

.hf-copy-master-request-modal__title {
    margin: 0 44px 8px 0;
    font-size: clamp(0.92rem, 3vw, 1.05rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--hf-cyan);
    line-height: 1.25;
}

.hf-copy-master-request-modal__intro {
    margin: 0 44px 14px 0;
    font-size: clamp(0.76rem, 2.4vw, 0.85rem);
    line-height: 1.45;
    color: var(--hf-secondary);
}

.hf-copy-master-request-modal__skip-intro {
    margin: 0 44px 10px 0;
    font-size: clamp(0.72rem, 2.2vw, 0.8rem);
    line-height: 1.4;
    color: var(--hf-muted);
}

.hf-copy-master-request-modal__tabs {
    display: flex;
    gap: 6px;
    margin: 0 44px 12px 0;
    flex-wrap: wrap;
}

.hf-copy-master-request-modal__tab {
    flex: 1 1 auto;
    min-width: 0;
    padding: 7px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hf-secondary);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        color 0.15s ease,
        background 0.15s ease;
}

.hf-copy-master-request-modal__tab:hover {
    border-color: rgba(0, 212, 255, 0.35);
    color: var(--hf-text);
}

.hf-copy-master-request-modal__tab--active {
    border-color: rgba(0, 212, 255, 0.55);
    color: var(--hf-cyan);
    background: rgba(0, 212, 255, 0.1);
}

.hf-copy-master-request-modal__panes {
    margin: 0;
}

.hf-copy-master-request-modal__pane[hidden] {
    display: none !important;
}

.hf-copy-master-request-modal__pane .hf-copy-master-request-modal__intro {
    margin-top: 0;
}

.hf-copy-master-request-modal__progress-actions {
    margin: 0 0 12px;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: stretch;
}

.hf-copy-master-request-modal__progress-actions > .hf-copy-master-request-modal__submit,
.hf-copy-master-request-modal__progress-actions > .hf-copy-master-request-modal__faq,
.hf-copy-master-request-modal__progress-actions > .hf-copy-master-force-close-btn {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
}

.hf-copy-master-request-modal__progress-actions > .hf-copy-master-request-modal__submit {
    padding: 10px 8px;
    font-size: clamp(0.66rem, 2.1vw, 0.78rem);
}

.hf-copy-master-request-modal__progress-actions > .hf-copy-master-request-modal__faq {
    padding: 10px 6px;
}

.hf-copy-master-request-modal__progress-actions > .hf-copy-master-force-close-btn {
    padding: 10px 8px;
    font-size: clamp(0.66rem, 2.1vw, 0.78rem);
}

.hf-copy-master-force-close-btn {
    appearance: none;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 55%, #06b6d4 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.hf-copy-master-force-close-btn:hover {
    filter: brightness(1.06);
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
}

.hf-copy-master-force-close-btn[aria-busy="true"] {
    opacity: 0.88;
    cursor: wait;
    pointer-events: none;
}

.hf-copy-master-request-modal__msg--info {
    color: #93c5fd;
}

.hf-copy-master-progress__force-close-hint {
    margin: 10px 0 0;
    font-size: 0.72rem;
    color: rgba(148, 163, 184, 0.95);
}

.hf-copy-master-progress__force-close-hint strong {
    color: #c4b5fd;
}

/* ----- Force close confirm / alert dialog ----- */
.hf-force-close-dialog {
    position: fixed;
    inset: 0;
    z-index: 10075;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, 3vh) max(16px, env(safe-area-inset-right, 0px))
        max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
}

.hf-force-close-dialog[hidden] {
    display: none !important;
}

.hf-force-close-dialog__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 18, 0.82);
    backdrop-filter: blur(6px);
}

.hf-force-close-dialog__panel {
    position: relative;
    z-index: 1;
    width: min(460px, calc(100vw - 24px));
    max-height: min(88vh, 520px);
    overflow: auto;
    border-radius: 14px;
    border: 1px solid rgba(124, 58, 237, 0.35);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(8, 12, 24, 0.99) 100%);
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.14),
        0 28px 56px rgba(0, 0, 0, 0.55);
    padding: 22px 20px 18px;
    box-sizing: border-box;
}

.hf-force-close-dialog--ok .hf-force-close-dialog__panel {
    border-color: rgba(34, 197, 94, 0.35);
}

.hf-force-close-dialog--info .hf-force-close-dialog__panel {
    border-color: rgba(96, 165, 250, 0.35);
}

.hf-force-close-dialog--err .hf-force-close-dialog__panel {
    border-color: rgba(248, 113, 113, 0.4);
}

.hf-force-close-dialog__title {
    margin: 0 0 12px;
    font-size: clamp(1.02rem, 3.2vw, 1.15rem);
    font-weight: 700;
    color: #c4b5fd;
    letter-spacing: 0.02em;
}

.hf-force-close-dialog--ok .hf-force-close-dialog__title {
    color: #86efac;
}

.hf-force-close-dialog--info .hf-force-close-dialog__title {
    color: #93c5fd;
}

.hf-force-close-dialog--err .hf-force-close-dialog__title {
    color: #fca5a5;
}

.hf-force-close-dialog__body {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--hf-text);
}

.hf-force-close-dialog__lead {
    margin: 0 0 12px;
    color: rgba(226, 232, 240, 0.95);
}

.hf-force-close-dialog__list {
    margin: 0 0 12px;
    padding-left: 1.15rem;
    color: rgba(203, 213, 225, 0.95);
}

.hf-force-close-dialog__list li + li {
    margin-top: 6px;
}

.hf-force-close-dialog__note {
    margin: 0;
    font-size: 0.76rem;
    color: rgba(148, 163, 184, 0.95);
}

.hf-force-close-dialog__tokens {
    margin: 10px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(124, 58, 237, 0.22);
    background: rgba(15, 23, 42, 0.55);
    font-size: 0.78rem;
    color: #e2e8f0;
}

.hf-force-close-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

.hf-force-close-dialog__btn {
    appearance: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        opacity 0.15s ease;
}

.hf-force-close-dialog__btn--ghost {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.65);
    color: var(--hf-text);
}

.hf-force-close-dialog__btn--ghost:hover {
    border-color: var(--hf-cyan);
    color: var(--hf-cyan);
}

.hf-force-close-dialog__btn--primary {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 55%, #06b6d4 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.hf-force-close-dialog__btn--primary:hover {
    filter: brightness(1.06);
}

.hf-force-close-dialog__btn[hidden] {
    display: none !important;
}

.hf-copy-master-request-modal__progress-out {
    margin-top: 10px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.4);
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--hf-text);
}

.hf-copy-master-progress {
    margin-top: 10px;
}

.hf-copy-master-progress__label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--hf-muted);
}

.hf-copy-master-progress__pct {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--hf-text);
}

.hf-copy-master-progress__track {
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    overflow: hidden;
}

.hf-copy-master-progress__fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.35s ease;
}

.hf-copy-master-progress--tier-red .hf-copy-master-progress__fill {
    background: linear-gradient(90deg, #f87171, #ef4444);
}

.hf-copy-master-progress--tier-orange .hf-copy-master-progress__fill {
    background: linear-gradient(90deg, #fb923c, #f97316);
}

.hf-copy-master-progress--tier-yellow .hf-copy-master-progress__fill {
    background: linear-gradient(90deg, #facc15, #eab308);
}

.hf-copy-master-progress--tier-green .hf-copy-master-progress__fill {
    background: linear-gradient(90deg, #4ade80, #22c55e);
}

.hf-copy-master-progress--tier-done .hf-copy-master-progress__fill {
    background: linear-gradient(90deg, #34d399, #10b981);
}

.hf-copy-master-progress--tier-failed .hf-copy-master-progress__fill {
    background: linear-gradient(90deg, #64748b, #475569);
}

.hf-copy-master-progress__stats {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px 12px;
}

.hf-copy-master-progress__stat {
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(2, 6, 18, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.hf-copy-master-progress__stat-k {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hf-muted);
    margin-bottom: 2px;
}

.hf-copy-master-progress__stat-v {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--hf-text);
}

.hf-copy-master-progress__note {
    margin-top: 12px;
    font-size: 0.76rem;
    color: var(--hf-secondary);
    line-height: 1.45;
}

.hf-copy-master-progress__note--rpc {
    color: #fbbf24;
}

.hf-copy-master-progress__banner {
    margin: 0 0 10px 0;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    line-height: 1.45;
}

.hf-copy-master-progress__banner--failed {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: var(--hf-text);
}

.hf-copy-master-progress__note--failed {
    color: var(--hf-text);
    border-left: 3px solid #f87171;
    padding-left: 10px;
}

.hf-copy-master-progress__opens {
    grid-column: 1 / -1;
    margin-top: 2px;
}

.hf-copy-master-progress__open-list {
    margin: 6px 0 0 1rem;
    padding: 0;
    font-size: 0.74rem;
    color: var(--hf-secondary);
    line-height: 1.5;
}

.hf-copy-master-progress__open-mint {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
}

.hf-copy-master-progress__open-qty {
    color: var(--hf-muted);
}

.hf-copy-master-progress__ledger {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.hf-copy-master-progress__ledger-list {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.hf-copy-master-progress__ledger-item {
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
}

.hf-copy-master-progress__ledger-head {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.hf-copy-master-progress__ledger-desc {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
    font-size: 0.65rem;
    color: var(--hf-muted);
    word-break: break-all;
    margin-bottom: 6px;
}

.hf-copy-master-progress__ledger-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    font-size: 0.72rem;
    color: var(--hf-secondary);
}

.hf-copy-master-progress__ledger-grid span:nth-child(odd) {
    color: var(--hf-muted);
}

.hf-copy-master-progress__ledger-grid .hf-ledger-pnl--up,
.hf-copy-master-progress__ledger-grid .hf-ledger-pnl--down {
    font-weight: 600;
}

.hf-copy-master-request-modal__form {
    margin: 0;
}

.hf-copy-master-request-modal__label {
    display: block;
    margin: 0 0 6px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
}

.hf-copy-master-request-modal__input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 10px;
    padding: 8px 10px;
    font-size: clamp(0.78rem, 2.4vw, 0.88rem);
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
    color: var(--hf-text);
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 6px;
}

.hf-copy-master-request-modal__input::placeholder {
    color: var(--hf-muted);
    font-family: inherit;
}

.hf-copy-master-request-modal__input:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.45);
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.2);
}

.hf-copy-master-request-modal__input[aria-invalid="true"] {
    border-color: rgba(248, 113, 113, 0.55);
}

.hf-copy-master-request-modal__msg {
    margin: 0 0 10px;
    font-size: 0.78rem;
    line-height: 1.4;
}

.hf-copy-master-request-modal__msg--err {
    color: var(--hf-loss);
}

.hf-copy-master-request-modal__msg--ok {
    color: var(--hf-profit);
}

.hf-copy-master-request-modal__actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: stretch;
    margin-top: 4px;
}

.hf-copy-master-request-modal__actions > .hf-copy-master-request-modal__submit,
.hf-copy-master-request-modal__actions > .hf-copy-master-request-modal__faq,
.hf-copy-master-request-modal__actions > .hf-copy-master-request-modal__cancel {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
}

.hf-copy-master-request-modal__submit {
    padding: 7px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #022;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: linear-gradient(90deg, var(--hf-profit), #34d399);
}

.hf-copy-master-request-modal__submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.hf-copy-master-request-modal__cancel {
    padding: 7px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--hf-secondary);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
}

.hf-copy-master-request-modal__cancel:hover {
    border-color: var(--hf-cyan);
    color: var(--hf-cyan);
}

.hf-copy-master-request-modal__faq {
    padding: 7px 10px;
    font-size: clamp(0.68rem, 2.2vw, 0.78rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 42%, #2563eb 72%, #0891b2 100%);
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
}

.hf-copy-master-request-modal__faq:hover {
    filter: brightness(1.08);
}

.hf-copy-master-request-modal__faq:focus-visible {
    outline: 2px solid rgba(167, 139, 250, 0.85);
    outline-offset: 2px;
}

.hf-copy-master-request-modal__faq--solid {
    background: #7c3aed;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
}

.hf-copy-master-request-modal__faq--solid:hover {
    background: #6d28d9;
    filter: none;
}

/* ----- Copy master applicant FAQ modal ----- */
.hf-copy-master-faq-modal {
    position: fixed;
    inset: 0;
    z-index: 10056;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(12px, 2vh) max(12px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px))
        max(12px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
}

.hf-copy-master-faq-modal[hidden] {
    display: none !important;
}

.hf-copy-master-faq-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 18, 0.78);
    backdrop-filter: blur(5px);
}

.hf-copy-master-faq-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 16px));
    max-height: min(88vh, 780px);
    display: flex;
    flex-direction: column;
    margin-top: min(3vh, 24px);
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: var(--hf-bg);
    box-shadow:
        0 0 0 1px rgba(124, 58, 237, 0.15),
        0 16px 48px rgba(0, 0, 0, 0.45);
    padding: 16px 14px 14px;
    box-sizing: border-box;
}

.hf-copy-master-faq-modal__x {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--hf-secondary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.hf-copy-master-faq-modal__x:hover {
    color: var(--hf-cyan);
    background: rgba(0, 212, 255, 0.1);
}

.hf-copy-master-faq-modal__title {
    margin: 0 36px 6px 0;
    font-size: clamp(1rem, 3.2vw, 1.15rem);
    font-weight: 700;
    color: var(--hf-text);
}

.hf-copy-master-faq-modal__lead {
    margin: 0 0 10px;
    font-size: 0.82rem;
    color: var(--hf-muted);
    line-height: 1.45;
}

.hf-copy-master-faq-modal__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
}

.hf-copy-master-faq-modal__item {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.45);
}

.hf-copy-master-faq-modal__q {
    margin: 0 0 6px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--hf-text);
    line-height: 1.35;
}

.hf-copy-master-faq-modal__a {
    margin: 0;
    font-size: 0.78rem;
    color: var(--hf-secondary);
    line-height: 1.5;
}

.hf-copy-master-faq-modal__terms {
    margin: 14px 0 0;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: rgba(127, 29, 29, 0.12);
}

.hf-copy-master-faq-modal__terms h4 {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fecaca;
}

.hf-copy-master-faq-modal__terms p {
    margin: 0 0 8px;
    font-size: 0.76rem;
    line-height: 1.5;
    color: #fca5a5;
}

.hf-copy-master-faq-modal__terms p:last-child {
    margin-bottom: 0;
}

.hf-copy-master-faq-modal__terms--soft {
    margin: 16px -2px 0;
    padding: 14px 16px;
    border: 1px solid rgba(167, 139, 250, 0.32);
    background: rgba(76, 29, 149, 0.14);
}

.hf-copy-master-faq-modal__terms--soft h4 {
    color: #ddd6fe;
}

.hf-copy-master-faq-modal__terms--soft p {
    color: #c4b5fd;
}

@media (max-width: 520px) {
    .hf-copy-master-request-modal__submit,
    .hf-copy-master-request-modal__cancel {
        font-size: 0.68rem;
        padding: 7px 8px;
    }

    .hf-copy-master-faq-modal__dialog {
        width: calc(100vw - 12px);
        max-height: min(90vh, 820px);
        padding: 14px 10px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hf-copy-master-request-modal__x,
    .hf-pretrend-live-zone__copy-allow-btn {
        transition: none;
    }

    .hf-pretrend-live-zone__copy-allow-btn {
        background-position: 0% 50%;
    }

    .hf-pretrend-live-zone__copy-allow-btn:hover {
        filter: none;
    }
}

@media (max-width: 520px) {
    .hf-copy-master-request-modal__dialog {
        width: calc(100vw - 16px);
        padding: 14px 12px 16px;
    }

    .hf-copy-master-request-modal__title,
    .hf-copy-master-request-modal__intro {
        margin-right: 40px;
    }
}
