/* ═══════════════════════════════════════════════════════════════
   یک‌ریال — صفحهٔ صرافی شهری  (/exchanges/{slug})
   هم‌زبان با بقیهٔ سایت: زمینهٔ #060d1a، کارت سرمه‌ای، لهجهٔ #38bdf8
   ═══════════════════════════════════════════════════════════════ */

.detail-wrapper {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: #e2e8f0;
    min-height: 100vh;
    padding: 1.4rem 1rem 3rem;
}

.city-shell {
    max-width: 1120px;
    margin: 0 auto;
}

/* ── حالت‌های بارگذاری و خطا ──────────────────────────────── */
.cp-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    padding: 5rem 1rem;
    color: #94a3b8;
    text-align: center;
}

.cp-state--error { color: #f87171; }

.cp-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(56, 189, 248, 0.18);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: cp-spin 0.85s linear infinite;
}

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

/* ── بردکرامب ─────────────────────────────────────────────── */
.cp-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.75rem;
    color: #475569;
    margin-bottom: 1rem;
}

.cp-crumb a { color: #64748b; text-decoration: none; }
.cp-crumb a:hover { color: #38bdf8; }
.cp-crumb-here { color: #94a3b8; }

/* ── سربرگ ────────────────────────────────────────────────── */
.cp-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cp-kicker {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #38bdf8;
}

.cp-head h1 {
    margin: 0.25rem 0 0.4rem;
    font-size: clamp(1.4rem, 3.6vw, 2.05rem);
    font-weight: 800;
    line-height: 1.45;
    color: #f8fafc;
    text-wrap: balance;
}

.cp-lede {
    margin: 0;
    max-width: 58ch;
    font-size: 0.88rem;
    font-weight: 300;
    line-height: 1.95;
    color: #94a3b8;
}

.cp-live {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 50px;
    padding: 0.3rem 0.75rem;
    white-space: nowrap;
}

.cp-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
    animation: cp-pulse 2.2s infinite;
}

@keyframes cp-pulse {
    70%  { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ── شبکهٔ دوستونی ────────────────────────────────────────── */
.cp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
}

@media (min-width: 1024px) {
    .cp-grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
    .cp-side { position: sticky; top: 74px; }
}

.cp-main, .cp-side {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    min-width: 0;
}

/* ── کارت نرخ ─────────────────────────────────────────────── */
.cp-rate {
    background: linear-gradient(145deg, rgba(11, 20, 40, 0.95) 0%, rgba(18, 30, 58, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 1.3rem;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

.cp-rate-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}

.cp-rate-id { display: flex; align-items: center; gap: 0.7rem; }
.cp-rate-flag { font-size: 1.9rem; line-height: 1; }
.cp-rate-name { margin: 0; font-size: 1.05rem; font-weight: 700; color: #f1f5f9; }
.cp-rate-code {
    font-family: ui-monospace, monospace;
    font-size: 0.68rem;
    color: #64748b;
    letter-spacing: 0.06em;
}

.cp-trend {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.28rem 0.7rem;
    border-radius: 50px;
    white-space: nowrap;
}

.cp-trend--up      { color: #4ade80; background: rgba(74, 222, 128, 0.09); }
.cp-trend--down    { color: #f87171; background: rgba(248, 113, 113, 0.09); }
.cp-trend--neutral { color: #94a3b8; background: rgba(255, 255, 255, 0.05); }

/* نرخ دوطرفه */
.cp-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.cp-dual-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 0.9rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.055);
}

.cp-dual-cell--buy  { border-color: rgba(74, 222, 128, 0.18); }
.cp-dual-cell--sell { border-color: rgba(248, 113, 113, 0.18); }

.cp-dual-label { font-size: 0.68rem; color: #94a3b8; }
.cp-dual-val {
    font-size: clamp(1.4rem, 4.5vw, 1.95rem);
    font-weight: 800;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}
.cp-dual-cell--buy  .cp-dual-val { color: #4ade80; }
.cp-dual-cell--sell .cp-dual-val { color: #f87171; }
.cp-dual-val--call  { font-size: 1.05rem !important; color: #fbbf24 !important; }
.cp-dual-unit { font-size: 0.63rem; color: #64748b; line-height: 1.7; }

/* نرخ تک */
.cp-single {
    padding: 1.1rem 1rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.055);
}
.cp-single-label { font-size: 0.68rem; color: #94a3b8; }
.cp-single-row { display: flex; align-items: baseline; gap: 0.45rem; margin-top: 0.2rem; }
.cp-single-val {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #f8fafc;
}
.cp-single-unit { font-size: 0.78rem; color: #64748b; }

/* آمار */
.cp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.cp-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.022);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cp-stat-l { font-size: 0.63rem; color: #64748b; }
.cp-stat-v {
    font-size: 0.92rem;
    font-weight: 700;
    color: #cbd5e1;
    font-variant-numeric: tabular-nums;
}

/* مبدل */
.cp-conv {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.9rem;
    padding: 0.7rem;
    border-radius: 15px;
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.14);
}

.cp-conv-field {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(2, 8, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 11px;
    padding: 0.5rem 0.7rem;
}

.cp-conv-input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    color: #f1f5f9;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    direction: ltr;
    text-align: left;
}

.cp-conv-input::-webkit-outer-spin-button,
.cp-conv-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cp-conv-input { -moz-appearance: textfield; }

.cp-conv-sym {
    flex: none;
    font-family: ui-monospace, monospace;
    font-size: 0.68rem;
    color: #64748b;
}

.cp-conv-eq { flex: none; color: #475569; font-weight: 700; }

.cp-conv-out {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.3rem;
    padding: 0.5rem 0.7rem;
}

.cp-conv-out span {
    font-size: 1.05rem;
    font-weight: 800;
    color: #38bdf8;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-conv-out small { font-size: 0.65rem; color: #64748b; }

.cp-note {
    margin: 0.9rem 0 0;
    font-size: 0.7rem;
    line-height: 1.95;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.7rem;
}

/* ── بلوک‌های محتوا ───────────────────────────────────────── */
.cp-block {
    background: rgba(11, 20, 40, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 1.2rem;
}

.cp-block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.35rem;
}

.cp-block-head h2 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #f1f5f9; }

.cp-count {
    font-size: 0.66rem;
    color: #64748b;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50px;
    padding: 0.15rem 0.6rem;
    white-space: nowrap;
}

.cp-block-sub { margin: 0 0 1rem; font-size: 0.76rem; line-height: 1.9; color: #64748b; }

/* ── کارت صرافی ───────────────────────────────────────────── */
.cp-ex-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 0.75rem;
    margin-top: 0.8rem;
}

.cp-ex {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(15, 26, 48, 0.9) 0%, rgba(20, 33, 60, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1), border-color 0.28s;
}

.cp-ex:hover { transform: translateY(-3px); border-color: rgba(56, 189, 248, 0.25); }

.cp-ex.is-vip {
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.08), 0 10px 26px rgba(0, 0, 0, 0.3);
}

.cp-ex-vip {
    position: absolute;
    top: 0.75rem;
    inset-inline-start: 0.75rem;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 50px;
    padding: 0.1rem 0.5rem;
}

.cp-ex-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
    padding-inline-end: 3.2rem;
}

.cp-ex-tick { color: #4ade80; font-size: 0.8rem; }

.cp-ex-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: #38bdf8;
}

.cp-ex-addr {
    margin: 0;
    flex: 1;
    font-size: 0.73rem;
    line-height: 1.85;
    color: #94a3b8;
}

.cp-ex-actions { display: flex; gap: 0.45rem; margin-top: 0.35rem; }

/* ── دکمه‌ها ──────────────────────────────────────────────── */
.cp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 1;
    padding: 0.5rem 0.8rem;
    border-radius: 11px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.cp-btn:active { transform: scale(0.96); }
.cp-btn:focus-visible { outline: 2px solid #38bdf8; outline-offset: 2px; }

.cp-btn--wa      { color: #4ade80; background: rgba(74, 222, 128, 0.1);  border-color: rgba(74, 222, 128, 0.22); }
.cp-btn--wa:hover{ background: rgba(74, 222, 128, 0.18); }

.cp-btn--call      { color: #0b1220; background: linear-gradient(135deg, #7dd3fc, #38bdf8); }
.cp-btn--call:hover{ filter: brightness(1.07); }

.cp-btn--locked      { color: #64748b; background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.07); }
.cp-btn--locked:hover{ color: #94a3b8; background: rgba(255, 255, 255, 0.07); }

.cp-btn--ghost {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.2);
    width: 100%;
}
.cp-btn--ghost:hover { background: rgba(56, 189, 248, 0.15); }

.cp-btn--primary { color: #0b1220; background: linear-gradient(135deg, #7dd3fc, #38bdf8); flex: none; padding: 0.6rem 1.4rem; }

/* ── سؤالات متداول ────────────────────────────────────────── */
.cp-faq { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.8rem; }

.cp-faq-item {
    background: rgba(255, 255, 255, 0.022);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 13px;
    padding: 0.75rem 0.95rem;
}

.cp-faq-item summary {
    cursor: pointer;
    list-style: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.cp-faq-item summary::-webkit-details-marker { display: none; }

.cp-faq-item summary::after {
    content: '+';
    flex: none;
    color: #38bdf8;
    font-weight: 700;
    transition: transform 0.25s;
}

.cp-faq-item[open] summary::after { content: '−'; }

.cp-faq-item p {
    margin: 0.6rem 0 0;
    font-size: 0.78rem;
    font-weight: 300;
    line-height: 2;
    color: #94a3b8;
}

/* ── ستون کناری ───────────────────────────────────────────── */
.cp-card {
    background: rgba(11, 20, 40, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 1.1rem;
}

.cp-card-h { margin: 0 0 0.75rem; font-size: 0.95rem; font-weight: 700; color: #f1f5f9; }
.cp-card-p { margin: 0 0 0.8rem; font-size: 0.76rem; font-weight: 300; line-height: 1.95; color: #94a3b8; }

.cp-card-more {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #38bdf8;
    text-decoration: none;
}
.cp-card-more:hover { color: #7dd3fc; }

/* اخبار */
.cp-news { display: flex; flex-direction: column; gap: 0.6rem; }

.cp-news-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.55rem;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s;
}

.cp-news-item:hover { background: rgba(255, 255, 255, 0.04); }

.cp-news-thumb {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.cp-news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cp-news-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.cp-news-body strong {
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.75;
    color: #cbd5e1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cp-news-item:hover .cp-news-body strong { color: #f1f5f9; }
.cp-news-date { font-size: 0.63rem; color: #475569; }

/* شهرهای دیگر */
.cp-cities { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.cp-cities a {
    font-size: 0.73rem;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50px;
    padding: 0.33rem 0.8rem;
    transition: color 0.2s, border-color 0.2s;
}

.cp-cities a:hover { color: #38bdf8; border-color: rgba(56, 189, 248, 0.28); }

/* ── موبایل ───────────────────────────────────────────────── */
@media (max-width: 560px) {
    .detail-wrapper { padding: 1rem 0.7rem 2.5rem; }
    .cp-rate, .cp-block, .cp-card { padding: 1rem; border-radius: 16px; }
    .cp-dual { grid-template-columns: 1fr; }
    .cp-conv { flex-wrap: wrap; }
    .cp-conv-eq { display: none; }
    .cp-conv-field, .cp-conv-out { flex: 1 1 100%; }
    .cp-conv-out { justify-content: center; }
    .cp-ex-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .cp-ex, .cp-btn { transition: none; }
    .cp-ex:hover { transform: none; }
    .cp-spinner, .cp-live-dot { animation: none; }
}

/* ── کلاس‌های رنگی که کد صفحه تولید می‌کند ─────────────────── */
/* قبلاً به Tailwind تکیه داشتند؛ حالا مستقل‌اند. */
.badge-positive { color: #4ade80 !important; }
.badge-negative { color: #f87171 !important; }
.text-white     { color: #f8fafc !important; }

/* فلاش لحظهٔ تغییر نرخ */
.cp-rate.flash-green { animation: cp-flash-g 0.8s ease-out; }
.cp-rate.flash-red   { animation: cp-flash-r 0.8s ease-out; }

@keyframes cp-flash-g {
    0%   { box-shadow: 0 12px 34px rgba(0,0,0,.3), inset 0 0 0 1px rgba(74, 222, 128, .45); }
    100% { box-shadow: 0 12px 34px rgba(0,0,0,.3), inset 0 0 0 1px rgba(74, 222, 128, 0); }
}

@keyframes cp-flash-r {
    0%   { box-shadow: 0 12px 34px rgba(0,0,0,.3), inset 0 0 0 1px rgba(248, 113, 113, .45); }
    100% { box-shadow: 0 12px 34px rgba(0,0,0,.3), inset 0 0 0 1px rgba(248, 113, 113, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .cp-rate.flash-green, .cp-rate.flash-red { animation: none; }
}

/* ── بازار بسته (فقط وقتی نرخ شهری در دست نیست) ────────────── */
.cp-closed {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.4rem 1.3rem;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(23, 20, 12, 0.92) 0%, rgba(14, 16, 26, 0.9) 100%);
    border: 1px solid rgba(245, 158, 11, 0.22);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

.cp-closed-icon {
    flex: none;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.cp-closed-body { flex: 1; min-width: 0; }

.cp-closed-body h2 {
    margin: 0 0 0.4rem;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.6;
    color: #fde68a;
}

.cp-closed-body p {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 300;
    line-height: 2;
    color: #94a3b8;
}

.cp-closed-cta {
    width: auto !important;
    margin-top: 0.9rem;
}

@media (max-width: 560px) {
    .cp-closed { padding: 1.1rem 1rem; gap: 0.8rem; border-radius: 16px; }
    .cp-closed-icon { width: 38px; height: 38px; border-radius: 11px; }
    .cp-closed-body h2 { font-size: 0.92rem; }
    .cp-closed-cta { width: 100% !important; }
}

/* ── تابلوی ارز (فقط تورنتو) ───────────────────────────────── */
.cp-board {
    --cp-cols: minmax(0, 1fr) 5.2rem 5.2rem 5.2rem;
    margin-top: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 15px;
    overflow: hidden;
    background: rgba(2, 8, 20, 0.35);
}

.cp-board-head {
    display: grid;
    grid-template-columns: var(--cp-cols);
    gap: 0.5rem;
    padding: 0.55rem 0.95rem;
    background: rgba(255, 255, 255, 0.035);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #64748b;
}

.cp-board-head span:not(:first-child) { text-align: center; }

.cp-board-row {
    display: grid;
    grid-template-columns: var(--cp-cols);
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    transition: background 0.18s;
}

.cp-board-row:last-child { border-bottom: none; }
.cp-board-row:hover { background: rgba(56, 189, 248, 0.035); }

/* جفت ارز — پرچم‌ها روی هم می‌افتند */
.cp-board-pair {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.cp-fx-stack {
    flex: none;
    display: inline-flex;
    align-items: center;
}

.cp-fx-flag {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    background: #0d1628;
    /* حلقهٔ هم‌رنگ زمینه، تا دو پرچم روی هم از هم جدا دیده شوند */
    box-shadow: 0 0 0 2px #0a1220, 0 0 0 3px rgba(255, 255, 255, 0.07);
}

.cp-fx-stack .cp-fx-flag:first-child { position: relative; z-index: 2; }

.cp-fx-stack .cp-fx-flag + .cp-fx-flag {
    margin-inline-start: -10px;
    z-index: 1;
}

.cp-board-row:hover .cp-fx-stack .cp-fx-flag + .cp-fx-flag {
    margin-inline-start: -6px;
}

.cp-fx-stack .cp-fx-flag {
    transition: margin 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.cp-fx-names {
    display: flex;
    align-items: baseline;
    gap: 0.32rem;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}

.cp-fx-from {
    font-size: 0.83rem;
    font-weight: 600;
    color: #f1f5f9;
}

.cp-fx-slash {
    font-size: 0.8rem;
    color: #334155;
}

.cp-fx-to {
    font-size: 0.78rem;
    font-weight: 400;
    color: #8496b0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ستون‌های عددی */
.cp-board-val {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 0;
}

.cp-board-k {
    display: none;             /* روی دسکتاپ سرستون کافی است */
    font-size: 0.58rem;
    color: #64748b;
}

.cp-board-n {
    font-size: 0.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.cp-board-val--buy  .cp-board-n { color: #4ade80; }
.cp-board-val--sell .cp-board-n { color: #f87171; }
.cp-board-val--mid  .cp-board-n { color: #94a3b8; }

/* ── موبایل: هر ردیف دو طبقه می‌شود ─────────────────────────── */
@media (max-width: 620px) {
    .cp-board-head { display: none; }

    .cp-board-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem 0.5rem;
        padding: 0.8rem 0.8rem 0.7rem;
    }

    .cp-board-pair {
        grid-column: 1 / -1;
        margin-bottom: 0.15rem;
    }

    .cp-board-k { display: block; }

    .cp-board-val {
        padding: 0.4rem 0.2rem;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.045);
    }

    .cp-board-n  { font-size: 0.84rem; }
    .cp-fx-from  { font-size: 0.79rem; }
    .cp-fx-to    { font-size: 0.74rem; }
}

@media (max-width: 380px) {
    .cp-fx-from { font-size: 0.73rem; }
    .cp-fx-to   { font-size: 0.68rem; }
    .cp-fx-flag { width: 22px; height: 22px; }
    .cp-board-n { font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
    .cp-board-row { transition: none; }
}
