/* CoinFerry 币渡 — 独立品牌样式（非 ff.io 版式） */
:root {
    --paper: #f5f1e8;
    --paper-2: #eee8db;
    --ink: #171b22;
    --muted: #5d6573;
    --line: #dcd4c4;
    --card: #ffffff;
    --menu: #ffffff;
    --field: #fbf9f4;
    --hover: #f4f0e7;
    --soft: #f1ece2;
    --placeholder: #b4ac9d;
    --disclosure: #fbf6f2;
    --on-accent: #ffffff;
    --header-bg: rgba(245, 241, 232, .94);
    --footer-bg: #171b22;
    --footer-text: #d9dde3;
    --footer-muted: #9aa3ae;
    --teal: #0d5c52;
    --teal-dark: #083f38;
    --teal-soft: #e3efec;
    --rust: #b3451f;
    --radius: 18px;
    --shadow: 0 22px 50px rgba(23, 27, 34, .10);
    --wm-image: url('/assets/brand/wm/default.svg');
    --wm-size: 480px;
    --wm-color: var(--teal);
    --wm-opacity: .09;
    --wm-drift: 30s;
    --glow: rgba(13, 92, 82, .14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; }

.cf-wrap {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

.cf-skip {
    position: absolute;
    left: 12px;
    top: -80px;
    background: var(--ink);
    color: var(--paper);
    padding: 10px 16px;
    z-index: 50;
}
.cf-skip:focus { top: 12px; }

.cf-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- header ---------- */
.cf-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.cf-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
}

@font-face {
    font-family: "Space Grotesk";
    src: url("/assets/brand/fonts/space-grotesk-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

.cf-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.cf-brand-mark {
    display: block;
    width: 34px;
    height: 34px;
    flex: none;
    overflow: visible;
}
.cf-brand-mark .cf-mark-c,
.cf-brand-mark .cf-mark-f {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cf-brand-mark .cf-mark-c { stroke: var(--cf-logo-c, #0C5B4F); }
.cf-brand-mark .cf-mark-f { stroke: var(--cf-logo-f, #072B2A); }

/* 深色模式：C 换薄荷、F 换纸白，保证在深底上的对比度 */
html[data-mode="dark"] .cf-brand-mark { --cf-logo-c: #35D0A0; --cf-logo-f: #F6F3EA; }

.cf-brand-text { display: flex; align-items: baseline; gap: 8px; }
.cf-brand-text b {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 600;
    font-size: 19px;
    letter-spacing: -.02em;
}
.cf-brand-text em {
    font-style: normal;
    font-size: 13px;
    color: var(--muted);
    letter-spacing: .16em;
}

.cf-nav { display: flex; align-items: center; gap: 26px; }
.cf-nav a {
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}
.cf-nav a:hover, .cf-nav a:focus-visible { color: var(--ink); border-bottom-color: var(--teal); }
.cf-nav .cf-nav-order {
    color: var(--teal);
    border: 1px solid var(--teal);
    border-radius: 999px;
    padding: 7px 15px;
}
.cf-nav .cf-nav-order:hover { background: var(--teal); color: var(--on-accent); }

/* ---------- hero ---------- */
.cf-hero { padding: 70px 0 58px; }
.cf-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 64px;
    align-items: start;
}

.cf-eyebrow {
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--rust);
    font-weight: 700;
    margin-bottom: 16px;
}

.cf-hero h1 {
    font-family: "Songti SC", "Iowan Old Style", Georgia, "Times New Roman", serif;
    font-size: clamp(40px, 4.4vw, 58px);
    letter-spacing: -.03em;
    font-weight: 700;
}

.cf-lead {
    margin-top: 22px;
    max-width: 33em;
    color: var(--muted);
    font-size: 17px;
}

.cf-points {
    list-style: none;
    margin: 34px 0 0;
    padding: 0;
    display: grid;
    gap: 20px;
}
.cf-points li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.cf-point-index {
    font-size: 12px;
    font-weight: 700;
    color: var(--teal);
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 999px;
    width: 34px; height: 34px;
    display: grid; place-items: center;
}
.cf-points b { font-size: 15px; }
.cf-points p { color: var(--muted); font-size: 14px; margin-top: 2px; }

.cf-hero-note {
    margin-top: 30px;
    font-size: 12.5px;
    color: var(--muted);
    border-left: 2px solid var(--line);
    padding-left: 12px;
}

/* ---------- exchange card ---------- */
.cf-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.cf-field { margin-bottom: 12px; }
.cf-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.cf-field label, .cf-field-head label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--muted);
    text-transform: uppercase;
}
.cf-usd { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.cf-coin-name {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 7px 2px 0;
    font-size: 12px;
    color: var(--muted);
    min-height: 17px;
}

.cf-coin-icon {
    width: 16px;
    height: 16px;
    flex: none;
    border-radius: 50%;
}

.cf-amount-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    background: var(--field);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    gap: 10px;
}
.cf-amount-row:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }

.cf-amount {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 24px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    outline: 0;
    padding: 2px 0;
}
.cf-amount::placeholder { color: var(--placeholder); font-weight: 500; }

.cf-coinsel {
    position: relative;
    border-left: 1px solid var(--line);
    padding-left: 10px;
}

.cf-coinsel-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    padding: 6px 2px;
    cursor: pointer;
    border-radius: 6px;
}
.cf-coinsel-btn:hover { background: var(--soft); }
.cf-coinsel-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.cf-coinsel-icon { width: 20px; height: 20px; flex: none; border-radius: 50%; }
.cf-coinsel-code { font-size: 14px; font-weight: 650; }
.cf-coinsel-caret {
    width: 14px;
    height: 14px;
    flex: none;
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-left: 2px;
}

.cf-coinsel-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.cf-coinsel-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 340px;
    max-width: calc(100vw - 52px);
    background: var(--menu);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(23, 27, 34, .16);
    z-index: 40;
    overflow: hidden;
}
.cf-coinsel-menu[hidden] { display: none; }

.cf-coinsel-search { padding: 10px; border-bottom: 1px solid var(--line); }
.cf-coinsel-search input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--field);
    padding: 8px 10px;
    font-size: 13px;
    color: var(--ink);
    outline: 0;
}
.cf-coinsel-search input:focus { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-soft); }

.cf-coinsel-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 300px;
    overflow: auto;
}
.cf-coinsel-group {
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 8px 10px 4px;
}
.cf-coinsel-option {
    width: 100%;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    padding: 7px 9px;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: var(--ink);
}
.cf-coinsel-option:hover,
.cf-coinsel-option:focus-visible { background: var(--hover); outline: 0; }
.cf-coinsel-option.is-selected { background: var(--teal-soft); }
.cf-coinsel-option[disabled] { opacity: .35; cursor: not-allowed; }

.cf-coinsel-option img { width: 22px; height: 22px; border-radius: 50%; display: block; }
.cf-opt-fallback {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--teal-soft);
    color: var(--teal);
    font-size: 8.5px;
    font-weight: 700;
}
.cf-opt-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cf-opt-code { font-size: 13px; font-weight: 650; }
.cf-opt-name {
    font-size: 11.5px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cf-opt-net {
    font-size: 10px;
    color: var(--muted);
    background: var(--soft);
    border-radius: 999px;
    padding: 2px 6px;
    white-space: nowrap;
}

.cf-swap {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: -6px auto;
    position: relative;
    z-index: 2;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--teal);
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
}
.cf-swap svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cf-swap:hover { background: var(--teal-soft); transform: rotate(180deg); }

.cf-rate-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--muted);
    padding: 12px 2px;
    margin-bottom: 4px;
    border-bottom: 1px dashed var(--line);
    font-variant-numeric: tabular-nums;
}
.cf-rate-line #cf-rate { color: var(--ink); font-weight: 600; }

.cf-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--field);
    padding: 13px 14px;
    font-size: 15px;
    color: var(--ink);
    outline: 0;
}
.cf-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.cf-input::placeholder { color: var(--placeholder); }

.cf-memo[hidden] { display: none; }

.cf-type {
    border: 0;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.cf-type legend {
    grid-column: 1 / -1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
    padding: 0;
}
.cf-type-item { position: relative; display: block; cursor: pointer; }
.cf-type-item input { position: absolute; opacity: 0; inset: 0; }
.cf-type-item span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 13px;
    background: var(--field);
    font-size: 14px;
    transition: border-color .15s ease, background .15s ease;
}
.cf-type-item em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.cf-type-item input:checked + span {
    border-color: var(--teal);
    background: var(--teal-soft);
    box-shadow: inset 0 0 0 1px var(--teal);
}
.cf-type-item input:focus-visible + span { box-shadow: 0 0 0 3px var(--teal-soft), inset 0 0 0 1px var(--teal); }

.cf-type-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

.cf-error {
    min-height: 20px;
    margin: 10px 0 0;
    color: #a3260f;
    font-size: 13px;
    font-weight: 600;
}
.cf-error:empty { min-height: 0; margin: 0; }

.cf-submit {
    width: 100%;
    margin-top: 10px;
    border: 0;
    border-radius: 12px;
    background: var(--teal);
    color: var(--on-accent);
    font-size: 16px;
    font-weight: 700;
    padding: 15px 18px;
    cursor: pointer;
    transition: background .15s ease, opacity .15s ease;
}
.cf-submit:hover:not(:disabled) { background: var(--teal-dark); }
.cf-submit:disabled { opacity: .42; cursor: not-allowed; }
.cf-submit.is-loading { opacity: .7; cursor: wait; }

.cf-disclosure {
    margin-top: 14px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--muted);
    border-left: 3px solid var(--rust);
    padding: 8px 0 8px 10px;
    background: var(--disclosure);
}
.cf-disclosure strong { color: var(--ink); }

.cf-alt-link {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
}
.cf-alt-link a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }

.cf-address-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cf-qr-badge { display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-size: 10px; font-weight: 700; vertical-align: 1px; }
.cf-address-field { position: relative; }
.cf-address-tools { display: inline-flex; align-items: center; gap: 10px; }
.cf-book-toggle { border: 0; background: transparent; padding: 0; color: var(--teal); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cf-address-book {
    position: absolute;
    z-index: 40;
    width: 360px;
    max-height: 430px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    box-shadow: var(--shadow);
}
.cf-address-book.is-left { right: calc(100% + 14px); left: auto; top: -2px; }
.cf-address-book.is-right { left: calc(100% + 14px); right: auto; top: -2px; }
.cf-address-book.is-below { left: 0; right: auto; top: calc(100% + 8px); width: 100%; max-height: 300px; }
.cf-address-book.is-above { left: 0; right: auto; top: auto; bottom: calc(100% + 8px); width: 100%; max-height: 300px; }
.cf-book-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 6px 9px; border-bottom: 1px solid var(--line); }
.cf-book-head span { font-size: 12px; color: var(--muted); font-weight: 650; }
.cf-book-clear { border: 0; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; padding: 2px 0; text-decoration: underline; text-underline-offset: 2px; }
.cf-book-clear:hover { color: var(--rust); }
.cf-book-list { display: grid; gap: 2px; padding-top: 5px; }
.cf-book-item { display: flex; align-items: stretch; gap: 4px; border-radius: 9px; padding: 4px 4px 4px 7px; }
.cf-book-item:hover { background: var(--hover); }
.cf-book-main { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); text-align: left; padding: 5px 2px; cursor: pointer; }
.cf-book-main:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 5px; }
.cf-book-actions { display: flex; flex-direction: column; justify-content: center; gap: 1px; flex: none; }
.cf-book-action { border: 0; background: transparent; color: var(--muted); font-size: 9px; line-height: 1.35; padding: 1px 3px; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.cf-book-action:hover { background: var(--soft); color: var(--ink); }
.cf-book-action.is-pinned { color: var(--rust); font-size: 12px; }
.cf-book-pair { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; }
.cf-book-pair em { font-style: normal; font-size: 10px; font-weight: 600; color: var(--muted); }
.cf-book-amount { display: block; margin-top: 3px; font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
.cf-book-meta { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-book-empty { padding: 14px 8px; font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
    .cf-address-book.is-left, .cf-address-book.is-right { left: 0; right: auto; top: calc(100% + 8px); width: 100%; max-height: 300px; }
}
.cf-qr-upload {
    border: 0;
    background: none;
    padding: 0;
    color: var(--teal);
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cf-qr-hint { margin-top: 7px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.cf-qr-hint.is-ok { color: var(--teal); }
.cf-qr-hint.is-error { color: var(--rust); }
.cf-address-field.is-dragover .cf-input { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }

/* ---------- sections ---------- */
/* 区域文化水印：建筑/自然母题，抽象处理，不使用具体宗教符号 */
.cf-hero,
.cf-section,
.cf-footer,
.cf-history { position: relative; isolation: isolate; }
.cf-hero::before,
.cf-section::before,
.cf-footer::before,
.cf-history::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: var(--wm-color);
    -webkit-mask-image: var(--wm-image);
    mask-image: var(--wm-image);
    -webkit-mask-repeat: repeat;
    mask-repeat: repeat;
    -webkit-mask-size: var(--wm-size) var(--wm-size);
    mask-size: var(--wm-size) var(--wm-size);
    opacity: var(--wm-opacity);
    animation: cf-wm-drift var(--wm-drift) ease-in-out infinite alternate;
}
@keyframes cf-wm-drift {
    from { -webkit-mask-position: 0 0; mask-position: 0 0; }
    to { -webkit-mask-position: 88px -56px; mask-position: 88px -56px; }
}

/* 动态氛围光：只在首屏，独立裁剪层，避免裁掉下拉菜单/卡片阴影 */
.cf-hero-glow {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.cf-hero-glow::before {
    content: "";
    position: absolute;
    width: 560px;
    height: 560px;
    right: -100px;
    top: -180px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow) 0%, transparent 68%);
    filter: blur(28px);
    animation: cf-glow-float 18s ease-in-out infinite alternate;
}
@keyframes cf-glow-float {
    from { transform: translate3d(0, 0, 0) scale(1); opacity: .42; }
    to { transform: translate3d(-70px, 46px, 0) scale(1.16); opacity: .68; }
}
@media (prefers-reduced-motion: reduce) {
    .cf-hero::before,
    .cf-section::before,
    .cf-footer::before,
    .cf-history::before,
    .cf-hero-glow::before { animation: none; }
}
@media (max-width: 720px) {
    .cf-hero-glow { display: none; }
}
.cf-hero > .cf-wrap,
.cf-section > .cf-wrap,
.cf-footer > .cf-wrap,
.cf-history > * { position: relative; z-index: 1; }

.cf-section { padding: 76px 0; }
.cf-section-alt { background: var(--paper-2); }

.cf-section-head { max-width: 640px; margin-bottom: 34px; }
.cf-section h2 {
    font-family: "Songti SC", "Iowan Old Style", Georgia, serif;
    font-size: clamp(28px, 3vw, 38px);
    letter-spacing: -.02em;
}
.cf-section-lead { color: var(--muted); margin-top: 14px; font-size: 16px; }

.cf-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}
.cf-steps li {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}
.cf-step-no {
    display: inline-grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--teal);
    color: var(--on-accent);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}
.cf-steps h3 { font-size: 17px; margin-bottom: 8px; }
.cf-steps p { color: var(--muted); font-size: 14px; }

.cf-fees-grid {
    display: grid;
    grid-template-columns: 1fr .9fr;
    gap: 56px;
    align-items: center;
}
.cf-text-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--teal);
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cf-fee-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 14px;
}
.cf-fee-table th, .cf-fee-table td {
    text-align: left;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}
.cf-fee-table thead th {
    background: var(--field);
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}
.cf-fee-table tbody tr:last-child th, .cf-fee-table tbody tr:last-child td { border-bottom: 0; }
.cf-fee-table tbody th { font-weight: 600; }
.cf-fee-table tbody td { font-variant-numeric: tabular-nums; }

.cf-chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.cf-chips li {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    min-width: 0;
}
.cf-chip-code {
    flex: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--teal);
    background: var(--teal-soft);
    border-radius: 6px;
    padding: 3px 6px;
}
.cf-chip-icon {
    width: 18px;
    height: 18px;
    flex: none;
    border-radius: 50%;
}

.cf-chip-name {
    font-size: 13px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cf-fineprint { margin-top: 16px; font-size: 12px; color: var(--muted); }

.cf-hot-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.cf-hot-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cf-hot-table th, .cf-hot-table td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.cf-hot-table thead th { background: var(--field); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cf-hot-table tbody tr:last-child td { border-bottom: 0; }
.cf-hot-table td:nth-child(2) { font-variant-numeric: tabular-nums; color: var(--muted); }
.cf-hot-table .cf-hot-pair { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); text-decoration: none; }
.cf-hot-table .cf-hot-pair:hover { color: var(--teal); }
.cf-hot-icon { width: 16px; height: 16px; border-radius: 50%; flex: none; }
.cf-hot-table .cf-hot-btn {
    border: 1px solid var(--teal);
    background: transparent;
    color: var(--teal);
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.cf-hot-table .cf-hot-btn:hover { background: var(--teal); color: var(--on-accent); }
.cf-hot-empty { text-align: center; color: var(--muted); }

.cf-faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.cf-faq-list { display: grid; gap: 10px; }
.cf-faq-list details {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 18px;
}
.cf-faq-list summary {
    cursor: pointer;
    padding: 16px 0;
    font-weight: 600;
    font-size: 15px;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cf-faq-list summary::-webkit-details-marker { display: none; }
.cf-faq-list summary::after {
    content: "+";
    color: var(--teal);
    font-size: 18px;
    line-height: 1;
}
.cf-faq-list details[open] summary::after { content: "−"; }
.cf-faq-list details p { color: var(--muted); font-size: 14px; padding: 0 0 16px; }

/* ---------- footer ---------- */
.cf-footer { background: var(--footer-bg); color: var(--footer-text); padding: 56px 0 28px; }
.cf-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 34px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.cf-brand-footer .cf-brand-text b { color: var(--footer-text); }
.cf-brand-footer .cf-brand-text em { color: var(--footer-muted); }
.cf-brand-footer .cf-brand-mark { --cf-logo-c: #35D0A0; --cf-logo-f: #F6F3EA; }
.cf-footer-note { margin-top: 16px; font-size: 12.5px; color: var(--footer-muted); max-width: 34em; line-height: 1.7; }
.cf-footer h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--footer-muted); margin-bottom: 12px; }
.cf-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cf-footer ul a { color: var(--footer-text); text-decoration: none; font-size: 14px; }
.cf-footer ul a:hover { color: var(--footer-text); text-decoration: underline; text-underline-offset: 3px; }
.cf-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 22px;
    font-size: 11.5px;
    color: var(--footer-muted);
}
.cf-noscript {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--rust);
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 13px;
}

/* ---------- order history ---------- */
.cf-history { padding-top: 56px; padding-bottom: 80px; max-width: 1000px; }
.cf-history-head h1 { font-size: clamp(30px, 3vw, 42px); margin: 4px 0 10px; }
.cf-history-table-wrap { margin-top: 30px; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; background: var(--card); }
.cf-history-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.cf-history-table th, .cf-history-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.cf-history-table th { color: var(--muted); font-weight: 600; background: var(--paper-2); }
.cf-history-table tr:last-child td { border-bottom: 0; }
.cf-history-status { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-weight: 600; }
.cf-history-link { color: var(--teal); font-weight: 650; text-decoration: none; }
.cf-history-link:hover { text-decoration: underline; }
.cf-token-copy { margin-left: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 6px; padding: 2px 6px; font-size: 10px; cursor: pointer; }
.cf-token-copy:hover { color: var(--teal); border-color: var(--teal); }
.cf-history-empty { margin-top: 28px; padding: 30px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--card); }
.cf-history-empty .cf-submit { display: inline-block; margin-top: 14px; text-decoration: none; }
.cf-local-orders { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.cf-local-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cf-local-head h2 { margin: 4px 0 0; font-size: 20px; }
.cf-local-clear { border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cf-local-clear:hover { color: var(--rust); }
.cf-local-list { display: grid; gap: 8px; margin-top: 14px; }
.cf-local-order { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-decoration: none; }
a.cf-local-order:hover { border-color: var(--teal); }
.cf-local-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; text-decoration: none; }
a.cf-local-main:hover b { color: var(--teal); }
.cf-local-main b { font-size: 13px; color: var(--ink); }
.cf-local-main span { font-size: 12px; color: var(--muted); }
.cf-local-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 110px; }
.cf-mini-progress { width: 100px; height: 4px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.cf-mini-progress i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.cf-local-actions { display: flex; gap: 8px; margin-top: 2px; }
.cf-local-action, .cf-reorder { border: 1px solid var(--line); background: transparent; color: var(--teal); border-radius: 6px; padding: 2px 7px; font-size: 10px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.cf-local-action:hover, .cf-reorder:hover { border-color: var(--teal); }
.cf-reorder { margin-left: 6px; color: var(--ink); }

/* ---------- order confirm modal ---------- */
body.cf-modal-open { overflow: hidden; }
.cf-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.cf-modal[hidden] { display: none; }
.cf-modal-backdrop { position: absolute; inset: 0; background: rgba(8, 14, 20, .58); backdrop-filter: blur(5px); }
.cf-modal-card {
    position: relative;
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
    animation: cf-modal-in .2s ease-out;
}
@keyframes cf-modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.cf-modal-x { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 4px; }
.cf-modal-x:hover { color: var(--ink); }
.cf-modal-card h2 { margin: 3px 0 8px; font-size: 26px; }
.cf-modal-lead { color: var(--muted); font-size: 13px; }
.cf-confirm-grid { display: grid; gap: 1px; margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
.cf-confirm-grid > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 11px 14px; background: var(--paper-2); }
.cf-confirm-grid > div[hidden] { display: none; }
.cf-confirm-grid span { font-size: 11px; color: var(--muted); }
.cf-confirm-grid b { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cf-confirm-grid .cf-confirm-address { font: 11.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.cf-modal-note { margin-top: 14px; padding: 10px 12px; border-radius: 9px; background: var(--teal-soft); color: var(--teal-dark); font-size: 12px; }
.cf-modal-disclosure { margin-top: 10px; font-size: 10.5px; line-height: 1.5; color: var(--muted); }
.cf-modal-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 18px; }
.cf-btn-ghost { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 10px; padding: 12px 14px; font-size: 13px; font-weight: 650; cursor: pointer; }
.cf-btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.cf-modal-actions .cf-submit { margin: 0; padding: 12px 14px; font-size: 13px; }
.cf-modal-actions .cf-submit:disabled { opacity: .65; cursor: wait; }
@media (max-width: 520px) {
    .cf-modal { padding: 12px; align-items: end; }
    .cf-modal-card { padding: 22px 18px; max-height: calc(100vh - 24px); }
    .cf-modal-actions { grid-template-columns: 1fr; }
    .cf-confirm-grid > div { grid-template-columns: 76px minmax(0, 1fr); }
}

/* ---------- pair landing page ---------- */
.cf-pair-hero { padding-top: 64px; }
.cf-pair-hero h1 {
    font-family: "Songti SC", "Iowan Old Style", Georgia, serif;
    font-size: clamp(34px, 4vw, 52px);
    letter-spacing: -.02em;
    margin-top: 4px;
}
.cf-pair-panel {
    max-width: 720px;
    margin-top: 28px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px;
}
.cf-pair-rate {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 18px;
    border-bottom: 1px dashed var(--line);
}
.cf-pair-unit { font-size: 13px; color: var(--muted); }
.cf-pair-rate strong { font-size: clamp(26px, 3vw, 36px); font-weight: 750; font-variant-numeric: tabular-nums; }
.cf-pair-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    padding: 14px 0;
    font-size: 13px;
    color: var(--muted);
}
.cf-pair-cta { display: block; text-align: center; text-decoration: none; margin-top: 6px; }
.cf-pair-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: start; }
.cf-pair-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cf-pair-links li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}
.cf-pair-links a { color: var(--teal); font-weight: 650; text-decoration: none; }
.cf-pair-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cf-pair-links span { color: var(--muted); font-size: 12px; text-align: right; }
.cf-seo-pairs { padding: 28px 0 8px; border-top: 1px solid var(--line); }
.cf-seo-pair-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; }
.cf-seo-pair-links a { color: var(--footer-text); opacity: .82; font-size: 12.5px; text-decoration: none; }
.cf-seo-pair-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.cf-pair-all-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 28px; }
.cf-pair-all-grid a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-decoration: none; }
.cf-pair-all-grid a:hover { border-color: var(--teal); }
.cf-pair-all-grid b { color: var(--ink); font-size: 13px; }
.cf-pair-all-grid span { color: var(--muted); font-size: 12px; }

/* ---------- theme: 欧美 / EU ---------- */
.cf-theme-eu {
    --wm-image: url('/assets/brand/wm/eu.svg');
    --wm-size: 520px;
    --wm-color: #d6b45c;
    --wm-opacity: .12;
    --wm-drift: 34s;
    --glow: rgba(214, 180, 92, .20);
    --paper: #0c1422;
    --paper-2: #111c2f;
    --ink: #f3eee2;
    --muted: #a7b2c4;
    --line: #2a3850;
    --card: #131f34;
    --menu: #16243b;
    --field: #0f1a2c;
    --hover: #1b2a44;
    --soft: #1f2d47;
    --placeholder: #6f7c92;
    --disclosure: #16243b;
    --teal: #d6b45c;
    --teal-dark: #b8952e;
    --teal-soft: #2a2618;
    --on-accent: #0c1422;
    --rust: #e0b45c;
    --header-bg: rgba(12, 20, 34, .94);
    --footer-bg: #070d18;
    --footer-text: #d9dde3;
    --footer-muted: #8a95a8;
    --shadow: 0 24px 60px rgba(0, 0, 0, .45);
    background-image: radial-gradient(1100px 520px at 78% -8%, #1a2944 0%, transparent 62%);
}
.cf-theme-eu .cf-card { border-top: 2px solid var(--teal); }
.cf-theme-eu .cf-error { color: #ff9a8a; }
.cf-theme-eu .cf-hero h1 { letter-spacing: -.015em; }
.cf-theme-eu .cf-eyebrow { letter-spacing: .24em; }
.cf-theme-eu .cf-submit { letter-spacing: .04em; }
.cf-theme-eu .cf-coinsel-menu { box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.cf-theme-eu .cf-card,
.cf-theme-eu .cf-input,
.cf-theme-eu .cf-amount-row,
.cf-theme-eu .cf-type-item span,
.cf-theme-eu .cf-coinsel-menu,
.cf-theme-eu .cf-coinsel-option,
.cf-theme-eu .cf-coinsel-search input,
.cf-theme-eu .cf-submit,
.cf-theme-eu .cf-steps li,
.cf-theme-eu .cf-faq-list details,
.cf-theme-eu .cf-hot-wrap,
.cf-theme-eu .cf-fee-table { border-radius: 5px; }

/* ---------- layout variants ---------- */
/* 欧美：兑换卡在左、文案在右，章节标题居中，步骤改为分隔线列表 */
.cf-theme-eu .cf-hero-grid { grid-template-columns: .95fr 1.05fr; }
.cf-theme-eu .cf-card { order: -1; }
.cf-theme-eu .cf-hero-copy { text-align: right; }
.cf-theme-eu .cf-lead { margin-left: auto; }
.cf-theme-eu .cf-points li { grid-template-columns: 1fr 40px; text-align: right; }
.cf-theme-eu .cf-point-index { order: 2; }
.cf-theme-eu .cf-hero-note { border-left: 0; border-right: 2px solid var(--line); padding: 0 12px 0 0; }
.cf-theme-eu .cf-section-head { text-align: center; margin: 0 auto 36px; }
.cf-theme-eu .cf-steps li { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 22px 0 0; }
.cf-theme-eu .cf-fees-grid { grid-template-columns: 1fr; max-width: 820px; margin: 0 auto; }
.cf-theme-eu .cf-faq-grid { grid-template-columns: 1fr; }
.cf-theme-eu .cf-faq-list { max-width: 820px; margin: 0; }
.cf-theme-eu .cf-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cf-theme-eu .cf-chips li { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }

/* 巴西：单列居中，兑换卡在文案下方，章节标题居中 */
.cf-theme-br .cf-hero-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 36px; }
.cf-theme-br .cf-hero-copy { max-width: 760px; }
.cf-theme-br .cf-lead { margin-left: auto; margin-right: auto; }
.cf-theme-br .cf-points { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 980px; margin-left: auto; margin-right: auto; text-align: left; gap: 16px; }
.cf-theme-br .cf-card { width: 100%; max-width: 720px; }
.cf-theme-br .cf-hero-note { border: 0; padding: 0; }
.cf-theme-br .cf-section-head { text-align: center; margin: 0 auto 36px; }
.cf-theme-br .cf-steps { gap: 18px; }
.cf-theme-br .cf-steps li { border-top: 6px solid #ffcc00; }
.cf-theme-br .cf-fees-grid { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }
.cf-theme-br .cf-faq-grid { grid-template-columns: 1fr; }
.cf-theme-br .cf-faq-list { max-width: 760px; margin: 0 auto; }

/* 加拿大：左侧栏标题 + 右侧内容，兑换卡更宽 */
.cf-theme-ca .cf-hero-grid { grid-template-columns: .9fr 1.1fr; gap: 48px; }
.cf-theme-ca .cf-hero h1 { border-top: 4px solid var(--rust); padding-top: 22px; }
.cf-theme-ca #how .cf-wrap,
.cf-theme-ca #assets .cf-wrap,
.cf-theme-ca #hot .cf-wrap { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 48px; align-items: start; }
.cf-theme-ca #how .cf-section-head,
.cf-theme-ca #assets .cf-section-head,
.cf-theme-ca #hot .cf-section-head { position: sticky; top: 96px; margin-bottom: 0; }
.cf-theme-ca #how .cf-steps { grid-template-columns: 1fr; }
.cf-theme-ca #how .cf-steps li { border-left: 4px solid var(--rust); }
.cf-theme-ca #faq .cf-wrap { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 48px; align-items: start; }
.cf-theme-ca #faq .cf-section-head { position: sticky; top: 96px; margin-bottom: 0; }
.cf-theme-ca #assets .cf-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cf-theme-ca #assets .cf-fineprint,
.cf-theme-ca #hot .cf-fineprint { grid-column: 2; }

/* ---------- theme: 巴西 / BR ---------- */
.cf-theme-br {
    --wm-image: url('/assets/brand/wm/br.svg');
    --wm-size: 460px;
    --wm-color: #007a2e;
    --wm-opacity: .10;
    --wm-drift: 32s;
    --glow: rgba(255, 204, 0, .22);
    --paper: #f1fbf3;
    --paper-2: #e3f5e8;
    --ink: #0f2419;
    --muted: #4f6b5b;
    --line: #cbe4d3;
    --card: #ffffff;
    --menu: #ffffff;
    --field: #f6fdf7;
    --hover: #e6f7ea;
    --soft: #dff3e5;
    --placeholder: #8bb49a;
    --disclosure: #f2fbf5;
    --teal: #007a2e;
    --teal-dark: #005f24;
    --teal-soft: #dcf3e3;
    --on-accent: #ffffff;
    --rust: #e08a00;
    --header-bg: rgba(241, 251, 243, .94);
    --footer-bg: #07351c;
    --footer-text: #e7f6ec;
    --footer-muted: #9bc7ab;
    background-image: radial-gradient(900px 420px at 82% -10%, #fff2b8 0%, transparent 58%);
}
.cf-theme-br .cf-card { border-top: 4px solid #ffcc00; }
.cf-theme-br .cf-eyebrow { color: #b06f00; }
.cf-theme-br .cf-submit {
    background: linear-gradient(135deg, #009c3b 0%, #00b84a 55%, #ffcc00 100%);
    color: #0f2419;
    font-weight: 800;
}
.cf-theme-br .cf-submit:hover:not(:disabled) { filter: brightness(1.04); }
.cf-theme-br .cf-card,
.cf-theme-br .cf-steps li,
.cf-theme-br .cf-faq-list details,
.cf-theme-br .cf-hot-wrap,
.cf-theme-br .cf-fee-table,
.cf-theme-br .cf-coinsel-menu { border-radius: 22px; }
.cf-theme-br .cf-input,
.cf-theme-br .cf-amount-row,
.cf-theme-br .cf-type-item span,
.cf-theme-br .cf-coinsel-search input { border-radius: 14px; }
.cf-theme-br .cf-submit { border-radius: 999px; }

/* ---------- theme: 加拿大 / CA ---------- */
.cf-theme-ca {
    --wm-image: url('/assets/brand/wm/ca.svg');
    --wm-size: 500px;
    --wm-color: #1f4e8c;
    --wm-opacity: .095;
    --wm-drift: 34s;
    --glow: rgba(31, 78, 140, .14);
    --paper: #f2f7fc;
    --paper-2: #e7f0f9;
    --ink: #0f2038;
    --muted: #52627a;
    --line: #d2dfec;
    --card: #ffffff;
    --menu: #ffffff;
    --field: #f7fafd;
    --hover: #e9f1f9;
    --soft: #e2ecf7;
    --placeholder: #93a3b8;
    --disclosure: #f4f9fd;
    --teal: #1f4e8c;
    --teal-dark: #163a69;
    --teal-soft: #e1ebf7;
    --on-accent: #ffffff;
    --rust: #d52b1e;
    --header-bg: rgba(242, 247, 252, .94);
    --footer-bg: #0f2038;
    --footer-text: #e6eef7;
    --footer-muted: #93a3b8;
    background-image: radial-gradient(900px 420px at 80% -12%, #dce9f7 0%, transparent 60%);
}
.cf-theme-ca .cf-card { border-top: 3px solid var(--rust); }
.cf-theme-ca .cf-hero h1 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    letter-spacing: -.035em;
}
.cf-theme-ca .cf-eyebrow { color: var(--rust); }
.cf-theme-ca .cf-card,
.cf-theme-ca .cf-input,
.cf-theme-ca .cf-amount-row,
.cf-theme-ca .cf-type-item span,
.cf-theme-ca .cf-coinsel-menu,
.cf-theme-ca .cf-coinsel-option,
.cf-theme-ca .cf-coinsel-search input,
.cf-theme-ca .cf-submit,
.cf-theme-ca .cf-steps li,
.cf-theme-ca .cf-faq-list details,
.cf-theme-ca .cf-hot-wrap,
.cf-theme-ca .cf-fee-table { border-radius: 10px; }

@media (max-width: 980px) {
    .cf-hero-grid, .cf-fees-grid, .cf-faq-grid { grid-template-columns: 1fr; gap: 40px; }
    .cf-hero { padding-top: 46px; }
    .cf-steps { grid-template-columns: 1fr; }
    .cf-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .cf-wrap { padding: 0 18px; }
    .cf-header-inner { min-height: 62px; }
    .cf-nav { gap: 14px; }
    .cf-nav a:not(.cf-nav-order) { display: none; }
    .cf-hero { padding: 34px 0 44px; }
    .cf-hero h1 { font-size: 38px; }
    .cf-card { padding: 18px; border-radius: 16px; }
    .cf-amount { font-size: 21px; }
    .cf-coinsel { padding-left: 8px; }
    .cf-coinsel-code { font-size: 13px; }
    .cf-coinsel-icon { width: 18px; height: 18px; }
    .cf-coinsel-menu {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        top: auto;
        width: auto;
        max-width: none;
        max-height: 70vh;
        border-radius: 14px;
        z-index: 60;
    }
    .cf-coinsel-list { max-height: calc(70vh - 62px); }
    .cf-points, .cf-hero-note { display: none; }
    .cf-section { padding: 54px 0; }
    .cf-type { grid-template-columns: 1fr; }
    .cf-footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .cf-hot-table th, .cf-hot-table td { padding: 11px 12px; }
    .cf-hot-table th:nth-child(2), .cf-hot-table td:nth-child(2) { display: none; }
}


/* ---------- theme layout mobile resets ---------- */
@media (max-width: 980px) {
    .cf-theme-eu .cf-hero-grid,
    .cf-theme-br .cf-hero-grid,
    .cf-theme-ca .cf-hero-grid { grid-template-columns: 1fr; justify-items: stretch; text-align: left; gap: 40px; }
    .cf-theme-eu .cf-card,
    .cf-theme-ca .cf-card { order: 0; }
    .cf-theme-eu .cf-hero-copy { text-align: left; }
    .cf-theme-eu .cf-points li { grid-template-columns: 40px 1fr; text-align: left; }
    .cf-theme-eu .cf-point-index { order: 0; }
    .cf-theme-eu .cf-hero-note { border-left: 2px solid var(--line); border-right: 0; padding: 0 0 0 12px; }
    .cf-theme-eu .cf-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cf-theme-br .cf-hero-copy { text-align: left; }
    .cf-theme-br .cf-points { grid-template-columns: 1fr; margin-left: 0; max-width: none; }
    .cf-theme-br .cf-section-head { text-align: left; margin-left: 0; }
    .cf-theme-ca #how .cf-wrap,
    .cf-theme-ca #assets .cf-wrap,
    .cf-theme-ca #hot .cf-wrap { display: block; }
    .cf-theme-ca #how .cf-section-head,
    .cf-theme-ca #assets .cf-section-head,
    .cf-theme-ca #hot .cf-section-head,
    .cf-theme-ca #faq .cf-section-head { position: static; margin-bottom: 30px; }
    .cf-theme-ca #faq .cf-wrap { display: block; }
    .cf-theme-ca #assets .cf-fineprint,
    .cf-theme-ca #hot .cf-fineprint { grid-column: auto; }
    .cf-theme-ca #assets .cf-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


@media (max-width: 980px) {
    .cf-pair-grid { grid-template-columns: 1fr; gap: 36px; }
    .cf-pair-panel { padding: 20px; }
}


@media (max-width: 980px) {
    .cf-pair-all-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .cf-pair-all-grid { grid-template-columns: 1fr; }
}

/* ---------- light / dark mode ---------- */
.cf-mode-toggle {
    width: 34px;
    height: 34px;
    flex: none;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--field);
    color: var(--ink);
    font: 18px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 600;
    cursor: pointer;
}
.cf-mode-toggle:hover { border-color: var(--teal); color: var(--teal); }
.cf-mode-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.cf-mode-sun { display: none; }
.cf-mode-moon { display: inline; }
html[data-mode="dark"] .cf-mode-sun { display: inline; }
html[data-mode="dark"] .cf-mode-moon { display: none; }
html[data-mode="dark"] { color-scheme: dark; }
html[data-mode="light"] { color-scheme: light; }

html[data-mode="dark"] body {
    --paper: #0f141b;
    --paper-2: #171f29;
    --ink: #e9eef5;
    --muted: #9aa6b6;
    --line: #2b3644;
    --card: #151d27;
    --menu: #18212c;
    --field: #111821;
    --hover: #1f2a36;
    --soft: #1b2531;
    --placeholder: #718090;
    --disclosure: #1a232d;
    --header-bg: rgba(15, 20, 27, .94);
    --footer-bg: #070b10;
    --footer-text: #dbe3ec;
    --footer-muted: #8d99a8;
    --on-accent: #07130f;
    --shadow: 0 22px 50px rgba(0, 0, 0, .35);
    --wm-opacity: .08;
}
html[data-mode="dark"] body.cf-theme-default {
    --teal: #45d7b6;
    --teal-dark: #8af0dc;
    --teal-soft: rgba(69, 215, 182, .14);
    --rust: #ff9a6a;
    --wm-color: #45d7b6;
    --glow: rgba(69, 215, 182, .16);
}
html[data-mode="dark"] body.cf-theme-br {
    --teal: #4fd18b;
    --teal-dark: #b7f5ce;
    --teal-soft: rgba(79, 209, 139, .14);
    --rust: #ffcc00;
    --wm-color: #4fd18b;
    --glow: rgba(255, 204, 0, .18);
    --on-accent: #06130b;
}
html[data-mode="dark"] body.cf-theme-ca {
    --teal: #6ab2ff;
    --teal-dark: #cfe5ff;
    --teal-soft: rgba(106, 178, 255, .14);
    --rust: #ff7272;
    --wm-color: #6ab2ff;
    --glow: rgba(106, 178, 255, .15);
    --on-accent: #071522;
}
html[data-mode="dark"] body.cf-theme-eu {
    --teal: #d6b45c;
    --teal-dark: #f3d98b;
    --teal-soft: rgba(214, 180, 92, .15);
    --rust: #ff9a6a;
    --wm-color: #d6b45c;
    --glow: rgba(214, 180, 92, .18);
    --on-accent: #1a1608;
}

/* EU 的白天版本：保留金色强调，但换成纸感浅色 */
html[data-mode="light"] body.cf-theme-eu {
    --paper: #f7f2e7;
    --paper-2: #efe6d5;
    --ink: #142033;
    --muted: #657083;
    --line: #d9cfbd;
    --card: #fffdf8;
    --menu: #fffdf8;
    --field: #fbf7ee;
    --hover: #f2ebdd;
    --soft: #eee4d3;
    --placeholder: #a89d8b;
    --disclosure: #fbf6ed;
    --on-accent: #1a1608;
    --header-bg: rgba(247, 242, 231, .94);
    --footer-bg: #0e1826;
    --footer-text: #dce4ee;
    --footer-muted: #96a3b5;
    --shadow: 0 22px 50px rgba(20, 32, 51, .12);
    --teal: #a9822a;
    --teal-dark: #775a18;
    --teal-soft: #f1e6ca;
    --rust: #b3451f;
    --wm-color: #a9822a;
    --wm-opacity: .075;
    --glow: rgba(169, 130, 42, .14);
}

/* ---------- language selector + locale layouts ---------- */
.cf-lang-wrap { display: inline-flex; align-items: center; flex: none; }
.cf-lang-select {
    appearance: none;
    -webkit-appearance: none;
    max-width: 124px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--field);
    color: var(--ink);
    font: 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
    cursor: pointer;
}
.cf-lang-select:hover, .cf-lang-select:focus-visible { border-color: var(--teal); outline: none; }
body.lang-ja .cf-hero h1,
body.lang-ko .cf-hero h1,
body.lang-zh .cf-hero h1 { letter-spacing: -.035em; }
body.lang-ja .cf-section,
body.lang-ko .cf-section,
body.lang-zh .cf-section { padding-top: 64px; padding-bottom: 64px; }
body.lang-fr .cf-hero h1,
body.lang-it .cf-hero h1 { font-family: "Iowan Old Style", "Palatino Linotype", "Songti SC", Georgia, serif; }
body.lang-de .cf-steps li,
body.lang-de .cf-fee-table td,
body.lang-de .cf-hot-table td { font-variant-numeric: tabular-nums; }
body.lang-es .cf-card,
body.lang-pt .cf-card,
body.lang-tr .cf-card,
body.lang-vi .cf-card,
body.lang-id .cf-card { border-radius: 24px; }
body.lang-es .cf-submit,
body.lang-pt .cf-submit,
body.lang-tr .cf-submit,
body.lang-vi .cf-submit,
body.lang-id .cf-submit { border-radius: 999px; }
body.lang-ar { font-family: Tahoma, "Segoe UI", "PingFang SC", sans-serif; }

/* RTL */
html[dir="rtl"] body { direction: rtl; text-align: right; }
html[dir="rtl"] .cf-brand { direction: ltr; }
html[dir="rtl"] .cf-hero-copy,
html[dir="rtl"] .cf-hero-note,
html[dir="rtl"] .cf-section-head,
html[dir="rtl"] .cf-pair-hero,
html[dir="rtl"] .cf-history-head { text-align: right; }
html[dir="rtl"] .cf-lead { margin-left: 0; }
html[dir="rtl"] .cf-hero-note { border-left: 0; border-right: 2px solid var(--line); padding: 0 12px 0 0; }
html[dir="rtl"] .cf-points li { grid-template-columns: 40px 1fr; }
html[dir="rtl"] .cf-input,
html[dir="rtl"] .cf-amount,
html[dir="rtl"] .cf-coinsel-native,
html[dir="rtl"] .cf-coinsel-search input,
html[dir="rtl"] .cf-addr,
html[dir="rtl"] .cf-local-main,
html[dir="rtl"] .cf-local-main span { direction: ltr; text-align: left; }
html[dir="rtl"] .cf-field-head,
html[dir="rtl"] .cf-address-head,
html[dir="rtl"] .cf-rate-line,
html[dir="rtl"] .cf-footer-bottom { direction: rtl; }
html[dir="rtl"] .cf-confirm-grid > div { text-align: right; }
html[dir="rtl"] .cf-confirm-grid .cf-confirm-address { direction: ltr; text-align: left; }
html[dir="rtl"] .cf-modal-card { text-align: right; }
html[dir="rtl"] .cf-progress-labels { direction: rtl; }
html[dir="rtl"] .cf-cred-row { text-align: right; }
html[dir="rtl"] .cf-cred-row code { direction: ltr; text-align: left; }

@media (max-width: 760px) {
    .cf-lang-select { max-width: 76px; padding: 5px 7px; font-size: 11px; }
}

/* RTL: keep EU points text column wide, and let each paragraph pick its own direction */
html[dir="rtl"] .cf-theme-eu .cf-points li { grid-template-columns: 40px minmax(0, 1fr); text-align: right; }
html[dir="rtl"] .cf-hero h1,
html[dir="rtl"] .cf-lead,
html[dir="rtl"] .cf-points li > div,
html[dir="rtl"] .cf-section h2,
html[dir="rtl"] .cf-section-lead,
html[dir="rtl"] .cf-faq-list,
html[dir="rtl"] .cf-footer { unicode-bidi: plaintext; }
html[dir="rtl"] .cf-theme-eu .cf-point-index { order: 0; }
html[dir="rtl"] .cf-theme-eu .cf-points li { grid-template-columns: 40px minmax(0, 1fr); }

@media (max-width: 760px) {
    .cf-header-inner { gap: 8px; }
    .cf-brand-text em { display: none; }
    .cf-nav { gap: 8px; }
    .cf-nav-order { padding: 6px 9px; font-size: 12px; white-space: nowrap; }
    .cf-lang-select { max-width: 68px; padding: 4px 5px; font-size: 10px; }
    .cf-mode-toggle { width: 30px; height: 30px; font-size: 16px; }
}

/* 多语言桌面导航：英文/德文等较长，压缩间距并隐藏品牌副标题，避免换行 */
.cf-header-inner { gap: 20px; }
.cf-nav { gap: 14px; flex-wrap: nowrap; }
.cf-nav a { white-space: nowrap; font-size: 13px; }
body:not(.lang-zh) .cf-brand-text em { display: none; }
.cf-lang-select { max-width: 112px; font-size: 11px; }
@media (max-width: 1180px) {
    .cf-nav a:not(.cf-nav-order) { font-size: 12px; }
    .cf-nav { gap: 10px; }
    .cf-lang-select { max-width: 96px; }
}

@media (max-width: 760px) {
    .cf-nav { min-width: 0; }
    .cf-brand { flex: none; gap: 8px; }
    .cf-brand-mark { width: 30px; height: 30px; }
    .cf-brand-text b { font-size: 17px; }
    .cf-nav .cf-nav-order { flex: none; max-width: 104px; overflow: hidden; text-overflow: ellipsis; padding: 6px 9px; font-size: 11px; }
}

@media (max-width: 380px) {
    .cf-wrap { padding: 0 14px; }
    .cf-brand-mark { width: 28px; height: 28px; }
    .cf-brand-text b { font-size: 16px; }
    .cf-lang-select { max-width: 56px; font-size: 10px; }
    .cf-mode-toggle { width: 28px; height: 28px; }
    .cf-nav .cf-nav-order { font-size: 10.5px; padding: 6px 8px; }
}

@media (max-width: 340px) {
    .cf-lang-wrap { display: none; }
}

@media (max-width: 760px) {
    .cf-fee-table { table-layout: fixed; width: 100%; }
    .cf-fee-table th, .cf-fee-table td { overflow-wrap: anywhere; word-break: normal; padding: 8px 6px; font-size: 11px; }
}

/* 页脚语言链接：给搜索引擎和用户提供可抓取的语言入口 */
.cf-lang-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid var(--line);
}
.cf-lang-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 12px;
    line-height: 1.6;
    white-space: nowrap;
}
.cf-lang-links a:hover,
.cf-lang-links a:focus-visible { color: var(--teal); }
.cf-lang-links a[aria-current="true"] { color: var(--teal); font-weight: 700; }
@media (max-width: 760px) {
    .cf-lang-links { gap: 6px 12px; padding: 16px 0; }
    .cf-lang-links a { font-size: 11px; }
}

/* 隐藏 FixedFloat 品牌模式下，原本跳转 ff.io 的链接变成不可点击文本 */
.cf-provider-link {
    color: inherit;
    text-decoration: none;
    cursor: default;
}

/* 隐私政策页 */
.cf-privacy { max-width: 820px; padding-top: 56px; padding-bottom: 64px; }
.cf-privacy h1 { font-size: clamp(34px, 5vw, 54px); margin: 4px 0 8px; }
.cf-privacy h2 { font-size: 20px; margin: 30px 0 8px; }
.cf-privacy p { color: var(--muted); font-size: 15px; line-height: 1.8; }
.cf-privacy .cf-lead { color: var(--ink); font-size: 17px; margin-top: 18px; }
.cf-privacy .cf-fineprint a { color: var(--teal); }

/* Cookie 同意条与页脚法律链接 */
.cf-consent {
    position: fixed;
    left: 20px;
    bottom: 20px;
    right: auto;
    transform: none;
    z-index: 140;
    width: min(420px, calc(100% - 40px));
    padding: 24px;
    border: 1px solid #183b57;
    border-radius: 6px;
    background: #071b2d;
    color: #fff;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .35);
}
.cf-consent strong {
    display: block;
    margin-bottom: 10px;
    color: #fff;
    font-size: 20px;
    line-height: 1.3;
}
.cf-consent p { color: #c7d3df; font-size: 15px; line-height: 1.55; }
.cf-consent-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; }
.cf-consent-links a { color: #7fd9d4; font-size: 14px; text-decoration: none; }
.cf-consent-links a:hover { color: #fff; text-decoration: underline; }
.cf-consent-actions { margin-top: 18px; }
.cf-consent-actions .cf-submit {
    width: 100%;
    margin: 0;
    padding: 13px 16px;
    border: 0;
    border-radius: 4px;
    background: #0b84e5;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}
.cf-consent-actions .cf-submit:hover { background: #0a76cf; color: #fff; }
.cf-consent-deny {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 6px;
    border: 0;
    background: transparent;
    color: #9fb0c2;
    font-size: 12px;
    cursor: pointer;
}
.cf-consent-deny:hover { color: #fff; }
.cf-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    padding: 4px 0 18px;
}
.cf-legal-links a,
.cf-cookie-link {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
}
.cf-legal-links a:hover,
.cf-cookie-link:hover { color: var(--teal); }
@media (max-width: 520px) {
    .cf-consent {
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        max-height: calc(100vh - 20px);
        overflow: auto;
        padding: 18px 16px;
    }
    .cf-consent strong { font-size: 18px; }
    .cf-consent p { font-size: 13px; }
    .cf-consent-actions { margin-top: 14px; }
}
