/* TWMAX 電腦版：桌機深色主題（pc 預設深色，見站上定稿；手機淺色／電腦深色）。
   電腦版在手機上看時保持桌機寬版面、整頁橫向捲動，不折成單欄。 */
:root {
  --bg: #0b0e11; --bg2: #15181d; --card: #1a1e24; --line: #262b33;
  --text: #eaecef; --muted: #848e9c; --green: #00b386; --red: #f6465d;
  --yellow: #f0b90b; --link: #4db2ff;
}
html[data-theme="light"] {
  --bg: #ffffff; --bg2: #f5f5f5; --card: #ffffff; --line: #e5e7eb;
  --text: #111827; --muted: #6b7280;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 14px; line-height: 1.5; min-width: 1080px;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: 1200px; max-width: calc(100vw - 32px); min-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* 頂部導覽（實色 var(--bg)，test247 口徑） */
.topnav { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--line); }
.topnav .wrap { display: flex; align-items: center; gap: 12px; height: 64px; width: 100%; max-width: none; min-width: 1100px; margin: 0; padding: 0 16px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand-logo { height: 28px; width: auto; vertical-align: middle; }
.foot-badge { height: 18px; width: auto; vertical-align: -4px; margin-right: 6px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--text); font-size: 15px; font-weight: 600; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { background: var(--bg2); text-decoration: none; }
.nav a.on { color: var(--green); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-right select { background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; height: 34px; padding: 0 8px; font-size: 13px; }
.btn { display: inline-block; background: var(--green); color: #fff; border: 1px solid var(--green); border-radius: 8px; padding: 8px 18px; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; opacity: .92; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: 16px; line-height: 1; }

/* Hero */
.hero { padding: 64px 0 48px; text-align: center; background: radial-gradient(ellipse at 50% 0%, rgba(0,179,134,.14), transparent 65%); }
.hero h1 { font-size: 44px; margin: 0 0 14px; line-height: 1.25; }
.hero h1 .hl { color: var(--green); }
.hero p.sub { color: var(--muted); font-size: 17px; margin: 0 0 28px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; }
.hero .cta .btn { padding: 13px 34px; font-size: 16px; }

/* 榜單卡 */
.boards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 24px; }
.board { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.board h3 { margin: 0 0 10px; font-size: 15px; }
.board h3 .tag { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.brow { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: 14px; }
.brow .sym { font-weight: 700; width: 110px; }
.brow .pr { flex: 1; text-align: right; font-variant-numeric: tabular-nums; }
.brow .ch { width: 74px; text-align: right; font-variant-numeric: tabular-nums; }
.up { color: var(--green); } .down { color: var(--red); }

/* 表格 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 24px; }
.card h2 { margin: 0 0 4px; font-size: 20px; }
.card .desc { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 13px; }
.tbl tr:hover td { background: var(--bg2); }
.tbl .sym { font-weight: 700; text-align: left; }
.tbl .sym small { color: var(--muted); font-weight: 400; }
.tbl .num { font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { background: var(--bg2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 7px 16px; font-size: 13px; cursor: pointer; }
.tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.search { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; height: 36px; padding: 0 12px; font-size: 14px; width: 260px; }
.muted { color: var(--muted); }
.err { color: var(--red); font-size: 13px; margin-top: 8px; }
.note { color: var(--muted); font-size: 13px; }

/* 表單 */
.form { max-width: 420px; margin: 0 auto; }
.form label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.form input, .form select { width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; height: 44px; padding: 0 12px; font-size: 15px; }
.form .btn { width: 100%; height: 46px; margin-top: 20px; font-size: 16px; }

/* 頁尾（舊站 page_footer_pc：4 欄＋熱門＋語言，.foot-grid／.foot-bottom 供間距） */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 0; }
.foot-pc { text-align: left; padding: 0; min-width: 1100px; }
.foot-grid { display: flex; gap: 36px; max-width: 1200px; margin: 0 auto; padding: 30px 16px 10px; flex-wrap: nowrap; }
.foot-col { flex-shrink: 0; }
.foot-col h4 { font-size: 14px; margin: 0 0 12px; color: var(--text); }
.foot-col a { display: block; color: var(--muted); font-size: 13px; margin-bottom: 9px; padding: 0; }
.foot-col a:hover { color: var(--yellow); text-decoration: none; }
#foot-hot a { display: block; color: var(--muted); font-size: 13px; margin-bottom: 9px; padding: 0; }
#foot-hot a:hover { color: var(--yellow); text-decoration: none; }
.foot-side { margin-left: auto; flex-shrink: 0; }
.foot-bottom { max-width: 1200px; margin: 0 auto; padding: 16px 16px 28px; border-top: 1px solid var(--line); text-align: center; }
.foot-bottom .foot-copy { display: flex; align-items: center; justify-content: center; font-size: 12px; }
.foot-risk { margin: 8px auto 0; font-size: 11px; opacity: .8; max-width: 760px; text-align: center; }
.page { padding: 28px 0 8px; }
.page h1 { font-size: 26px; margin: 0 0 6px; }

/* ===== 舊站 pc 版式（對照 source-test287/pc/index.php、markets.php、login.php）===== */

/* Hero：天際線背景＋粒子畫布（舊站 .hero-fx：padding 72px 24px 64px，標題 34px） */
.hero-fx { position: relative; overflow: hidden; border-radius: 14px; margin: 16px 0 8px; padding: 77px 24px 64px; text-align: center; background: #0b0e11 url(/shared/assets/img/hero_skyline.jpg) center bottom / cover no-repeat; }
.hero-fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }
.hero-title { font-size: 56px; line-height: 1.3; margin: 0 0 14px; color: #fff; }
.hero-title .hl, .hero-title em.hl { font-style: normal; color: var(--green); }
.hero-sub { color: #b8bec8; font-size: 20px; margin: 0 0 34px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; }
.hero-cta .btn { padding: 14px 32px; font-size: 16px; }
.hero-cta .btn.trade { background: transparent; border-color: #fff; color: #fff; }
.hero-gift { color: var(--green); font-size: 13px; margin: 23px 0 0; }

/* 跑馬燈（舊站 .ticker-tape：76 對循環滾動） */
.ticker-tape { overflow: hidden; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; min-height: 39px; white-space: nowrap; }
.ticker-track { display: inline-flex; animation: tape 90s linear infinite; }
.ticker-tape:hover .ticker-track { animation-play-state: paused; }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tick-item { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; font-size: 13px; }
.tick-item b { font-weight: 700; }
.tick-item .bp-chg { font-variant-numeric: tabular-nums; }

/* 區塊頭（榜單／市場表上方：標題＋描述＋查看全部） */
.sec-head { display: flex; align-items: flex-end; gap: 16px; margin: 28px 0 14px; }
.sec-head > div { flex: 1; }
.sec-title { font-size: 22px; margin: 0 0 4px; }
.sec-desc { color: var(--muted); font-size: 13px; margin: 0; }
.view-all { color: var(--green); font-size: 14px; white-space: nowrap; }

/* 榜單三卡（舊站 .board3） */
.board3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.board-list .brow { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 14px; }
.board-list .brow .sym { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.board-list .brow .pr { flex: 1; text-align: right; font-variant-numeric: tabular-nums; }
.board-list .brow .ch { width: 74px; text-align: right; font-variant-numeric: tabular-nums; }

/* Banner 輪播（舊站 #homeCarousel：hero1→合約、hero2→理財、app→邀請） */
.carousel { position: relative; margin: 28px 0; border-radius: 14px; overflow: hidden; }
.carousel .slides { position: relative; height: 220px; }
.carousel .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; pointer-events: none; }
.carousel .slide.active { opacity: 1; pointer-events: auto; }
.carousel .slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel .slide-veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.15)); }
.carousel .slide-text { position: absolute; left: 36px; top: 50%; transform: translateY(-50%); color: #fff; max-width: 520px; }
.carousel .slide-text h2 { font-size: 28px; margin: 0 0 8px; }
.carousel .slide-text p { margin: 0 0 16px; color: #d5d9e0; }
.car-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.35); color: #fff; font-size: 20px; cursor: pointer; z-index: 2; }
.car-arrow.prev { left: 14px; } .car-arrow.next { right: 14px; }
.car-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.car-dots .dot { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255,255,255,.45); cursor: pointer; padding: 0; }
.car-dots .dot.active { background: #fff; }

/* 市場表（舊站 .mk-table：自選星＋圖標＋中文名，整行可點） */
.mk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mk-table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 10px; white-space: nowrap; }
.mk-table td { padding: 10px; font-variant-numeric: tabular-nums; }
.mk-table tr:hover td { background: var(--bg2); }
.mk-table tr.mrow { cursor: pointer; }
.mk-table .num { text-align: right; white-space: nowrap; }
.mk-table .sym a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; font-weight: 700; }
.fav-btn { background: transparent; border: 0; font-size: 18px; color: var(--muted); cursor: pointer; padding: 4px; margin-right: 6px; vertical-align: middle; width: 26px; }
.fav-btn.on { color: var(--yellow); }
.cell-coin { display: inline-flex; align-items: center; gap: 8px; }
.cell-coin .sym-t { display: flex; flex-direction: column; line-height: 1.25; }
.cell-coin .sym-t .sym-p { white-space: nowrap; font-weight: 700; }
.cell-coin .sym-t small { color: var(--muted); font-weight: 400; font-size: 12px; white-space: nowrap; }

/* 市場頁概覽卡（舊站 .mk-ov：6 張，BTC／ETH／成交量前四） */
.mk-ov { display: grid; grid-template-columns: repeat(6, minmax(170px, 1fr)); gap: 12px; margin-bottom: 12px; overflow-x: auto; }
.mk-ovc { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: block; color: var(--text); text-decoration: none; }
.mk-ovc:hover { text-decoration: none; }
.mk-ovc .sym { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.mk-ovc .sym-t { display: flex; flex-direction: column; }
.mk-ovc .sym-t .sym-p { white-space: nowrap; }
.mk-ovc .sym-t small { color: var(--muted); font-weight: 400; font-size: 12px; white-space: nowrap; }
.mk-ovc .prc { font-size: 26px; font-weight: 800; margin: 6px 0 2px; }
.mk-ovc .chg { font-size: 14px; font-weight: 700; }
.mk-ovc canvas { width: 100%; height: 70px; display: block; margin-top: 6px; }

/* 信任區（舊站 security.jpg＋4 項） */
.trust { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.trust img { width: 100%; border-radius: 14px; display: block; }
.trust ul { list-style: none; margin: 0; padding: 0; }
.trust li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.trust li:last-child { border-bottom: 0; }
.trust li b { color: var(--green); margin-right: 8px; }

/* OKX 式登錄（舊站 pc/login.php test271–273：左黑海報＋右表單） */
.okx-page { min-height: calc(100vh - 65px); display: flex; }
.okx-body { display: flex; width: 100%; }
.okx-left { width: 41.3%; background-color: #0b0b0b; background-image: url(/shared/assets/img/poster-3d.png); background-size: cover; background-position: center; color: #fff; padding: 64px 48px; display: flex; flex-direction: column; justify-content: center; }
.okx-left h2 { font-size: 40px; line-height: 1.25; font-weight: 800; margin: 0 0 16px; color: #fff; }
.okx-left h2 em { font-style: normal; color: #00b386; }
.okx-left .sub { font-size: 16px; color: #b8bec8; line-height: 1.7; margin: 0 0 28px; }
.okx-stats { display: flex; gap: 32px; margin-bottom: 28px; }
.okx-stats b { display: block; font-size: 26px; }
.okx-stats span { font-size: 13px; color: #b8bec8; }
.okx-steps div { padding: 8px 0; font-size: 15px; }
.okx-steps .n { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; align-items: center; justify-content: center; font-size: 13px; margin-right: 10px; }
.okx-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; color: #000; }
.okx-form { width: 480px; max-width: 100%; }
.okx-form h1 { font-size: 32px; font-weight: 800; color: #000; margin: 0 0 6px; }
.okx-form .sub { color: #757575; font-size: 14px; margin: 0 0 24px; }
.okx-form label { display: block; font-size: 13px; color: #555; margin: 16px 0 6px; }
.okx-input-wrap { position: relative; }
.okx-input-wrap .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #757575; display: flex; pointer-events: none; }
.okx-input-wrap input { width: 100%; height: 48px; border: 1px solid #e9ebf2; border-radius: 12px; padding: 0 44px 0 44px; font-size: 15px; color: #000; background: #fff; box-sizing: border-box; }
.okx-input-wrap input:focus { outline: none; border-color: #000; }
.okx-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: #757575; border-radius: 8px; border: 0; background: none; cursor: pointer; }
.okx-submit { width: 100%; height: 48px; background: #0e0e0e; color: #fff; border-radius: 24px; font-size: 15px; font-weight: 700; border: 0; cursor: pointer; margin-top: 24px; }
.okx-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: #9aa4b2; font-size: 13px; }
.okx-divider::before, .okx-divider::after { content: ""; flex: 1; height: 1px; background: #e9ebf2; }
.okx-register-btn { display: block; width: 100%; height: 48px; line-height: 48px; text-align: center; background: #fff; color: #000; border: 1px solid #e9ebf2; border-radius: 24px; font-size: 15px; font-weight: 700; text-decoration: none; box-sizing: border-box; }
.okx-register-btn:hover { border-color: #000; }
.okx-terms { text-align: center; font-size: 12px; color: #9aa4b2; margin-top: 18px; line-height: 1.6; }
.okx-terms a { color: #000; text-decoration: underline; }
.okx-copy { text-align: center; font-size: 12px; color: #9aa4b2; margin-top: 14px; }

/* 註冊三步指示器（舊站 pc/register.php test237） */
.okx-regsteps { display: flex; margin-bottom: 24px; }
.okx-regstep { flex: 1; text-align: center; position: relative; }
.okx-regstep::before { content: ""; position: absolute; top: 14px; left: calc(-50% + 16px); width: calc(100% - 32px); height: 2px; background: #e9ebf2; }
.okx-regstep:first-child::before { display: none; }
.okx-regstep.done::before { background: #0e0e0e; }
.okx-regstep .step-dot { width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #757575; display: flex; align-items: center; justify-content: center; margin: 0 auto; font-size: 13px; font-weight: 800; position: relative; z-index: 1; border: 2px solid #e9ebf2; }
.okx-regstep.active .step-dot { background: #0e0e0e; color: #fff; border-color: #0e0e0e; }
.okx-regstep.done .step-dot { background: #0e0e0e; color: #fff; border-color: #0e0e0e; }
.okx-regstep .step-lbl { display: block; font-size: 12px; margin-top: 6px; color: #757575; }
.okx-regstep.active .step-lbl, .okx-regstep.done .step-lbl { color: #000; font-weight: 700; }
.steppanel { display: none; }
.steppanel.on { display: block; }
.okx-form select.okx-sel { width: 100%; height: 48px; border: 1px solid #e9ebf2; border-radius: 12px; padding: 0 12px; font-size: 15px; color: #000; background: #fff; box-sizing: border-box; }
.okx-form select.okx-sel:focus { outline: none; border-color: #000; }
.okx-code-row { display: flex; gap: 10px; }
.okx-code-row .okx-input-wrap { flex: 1; }
.okx-send { flex: none; height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid #0e0e0e; background: #fff; color: #000; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.okx-send:disabled { opacity: .5; cursor: default; }
.okx-agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: #555; margin-top: 16px; line-height: 1.6; }
.okx-agree input { margin-top: 3px; }
.okx-back { display: inline-block; margin-top: 16px; font-size: 14px; color: #000; }

/* 交易頁（2026-11-16 滿寬改版：K 線卡＋深度卡滿寬上下排在三欄之上；三欄為交易區塊 320px／最新成交自適應／盤口 300px，三欄等底；登入後委託卡全寬在三欄之下） */
.pc-trade { display: grid; grid-template-columns: 320px minmax(0, 1fr) 300px; gap: 16px; align-items: stretch; }
.pc-trade .col-form, .pc-trade .col-trades, .pc-trade .col-book { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pc-trade .card { flex: none; }
.spot-fut-switch { display: flex; gap: 10px; margin-bottom: 14px; }
.spot-fut-switch a { flex: 1; text-align: center; padding: 13px 0; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; background: var(--bg); }
.spot-fut-switch a.on { background: var(--green); border-color: var(--green); color: #fff; }
.pair-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin-bottom: 2px; scrollbar-width: thin; }
.pair-pill { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 12px; min-width: 88px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.pair-pill b { font-size: 13px; }
.pair-pill.on { border-color: var(--yellow); background: rgba(240,185,11,.08); }
.pair-pill:hover { border-color: var(--yellow); }
.kline-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.kline-head .big { font-size: 24px; font-weight: 800; }
.kline-head .chg.up { color: var(--green); }
.kline-head .chg.down { color: var(--red); }
.kline-head .stats { color: var(--muted); font-size: 12px; }
.kline-iv { display: flex; gap: 4px; margin-left: auto; }
.kline-iv button { padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.kline-iv button.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
#tv-chart { height: 400px; }
#depth-chart { height: 360px; }
.book { font-size: 13px; }
.book .brow { display: grid; grid-template-columns: 1.25fr .75fr; padding: 3px 0; }
.book .brow .p { white-space: nowrap; }
.book .asks .p { color: var(--red); }
.book .bids .p { color: var(--green); }
.book .brow .q { text-align: right; color: var(--muted); }
.book .mid { display: flex; justify-content: space-between; padding: 8px 0; font-size: 16px; font-weight: 800; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 4px 0; }
.trades-list { font-size: 12px; }
.trades-list .trow { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 3px 0; }
.trades-list .trow .up { color: var(--green); }
.trades-list .trow .down { color: var(--red); }
.trades-list .trow .a { text-align: right; color: var(--muted); }
.trades-list .trow .t { text-align: right; color: var(--muted); }
.of-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.of-tabs button { flex: 1; padding: 11px 0; font-size: 15px; font-weight: 800; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.of-tabs button.on-buy { background: var(--green); border-color: var(--green); color: #fff; }
.of-tabs button.on-sell { background: var(--red); border-color: var(--red); color: #fff; }
.of-type { display: flex; gap: 6px; margin-bottom: 12px; }
.of-type button { flex: 1; padding: 8px 0; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.of-type button.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.of-field { margin-bottom: 12px; }
.of-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.of-field input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font-size: 15px; background: var(--bg); color: var(--text); box-sizing: border-box; }
.of-field input:focus { outline: none; border-color: var(--green); }
.of-pct { display: flex; gap: 6px; margin-bottom: 12px; }
.of-pct button { flex: 1; padding: 7px 0; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.of-pct button.on { border-color: var(--green); color: var(--green); font-weight: 700; }
.of-bal { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.of-submit { width: 100%; height: 48px; border: none; border-radius: 12px; font-size: 16px; font-weight: 800; color: #fff; cursor: pointer; }
.of-submit.buy { background: var(--green); }
.of-submit.sell { background: var(--red); }
.of-submit:disabled { opacity: .5; cursor: default; }
a.of-submit { display: block; text-align: center; text-decoration: none; line-height: 48px; box-sizing: border-box; }
/* 交易區塊：滑桿／最佳買賣價／市價靜態價／僅掛單／停損單說明（對照舊站 style.css） */
.pct-slider { margin: 10px 0 6px; }
.pct-slider input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--text) var(--fill, 0%), var(--line) var(--fill, 0%)); outline: none; margin: 0 0 2px; padding: 0; display: block; -webkit-tap-highlight-color: transparent; }
.pct-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: transparent; border: none; box-shadow: none; cursor: pointer; }
.pct-slider input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: transparent; border: none; box-shadow: none; cursor: pointer; }
.pct-slider input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: transparent; }
.pct-ticks { position: relative; height: 16px; margin-top: 6px; }
.pct-ticks span { position: absolute; top: 0; font-size: 11px; line-height: 16px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.pct-ticks span:nth-child(1) { left: 0; }
.pct-ticks span:nth-child(2) { left: 25%; transform: translateX(-50%); }
.pct-ticks span:nth-child(3) { left: 50%; transform: translateX(-50%); }
.pct-ticks span:nth-child(4) { left: 75%; transform: translateX(-50%); }
.pct-ticks span:nth-child(5) { right: 0; }
/* 每個百分比刻度在上方橫線對應位置顯示空心圓；選中時變大 1 倍的實心圓（舊站 style.css，2026-11-17 補：前版漏抄此段致 PC 滑桿無圓點） */
.pct-ticks span::before { content: ''; position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--text); background: var(--bg); box-sizing: border-box; box-shadow: none; }
.pct-ticks span:nth-child(1)::before { left: 0; transform: none; }
.pct-ticks span:nth-child(5)::before { left: auto; right: 0; transform: none; }
.pct-ticks span.sel::before { width: 12px; height: 12px; background: var(--text); border-color: var(--text); box-shadow: none; bottom: calc(100% + 2px); }
.pct-ticks span:nth-child(1).sel::before { left: -2px; }
.pct-ticks span:nth-child(5).sel::before { right: -2px; }
.bb-info { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.9; }
.bb-info .bb-high, .bb-info .bb-low { color: var(--text); font-weight: 600; }
.of-market-price { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.of-market-price .spot-price-disp { color: var(--text); font-weight: 700; font-size: 16px; }
.post-only { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text); margin-bottom: 12px; cursor: pointer; }
.post-only input { width: auto; margin: 0; accent-color: var(--green); }
.f-stop-note { font-size: 12px; color: var(--muted); margin: 0 0 12px; line-height: 1.6; }
.my-orders { margin-top: 16px; }
.my-orders table { width: 100%; border-collapse: collapse; font-size: 13px; }
.my-orders th, .my-orders td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.my-orders th { color: var(--muted); font-weight: 600; }
.my-orders .cancel { color: var(--red); cursor: pointer; background: none; border: none; font-size: 13px; }

/* 錢包黑卡（舊站 style.css .asset-card 原樣移植；手機版錢包總卡亦為黑色）。 */
.asset-card { background: #1d212b; border-color: #2a2f3d; color: #fff; }
html[data-theme="light"] .asset-card { background: #171b26; border-color: #171b26; }
.asset-card .asset-total { background: transparent; color: rgba(255,255,255,.7); font-size: 13px; padding: 0 0 14px; }
.asset-card .asset-total b { font-size: 26px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.asset-card .tbl th { color: rgba(255,255,255,.55); border-bottom-color: rgba(255,255,255,.12); }
.asset-card .tbl td { color: rgba(255,255,255,.92) !important; border-bottom-color: rgba(255,255,255,.12); }
.asset-card .tbl tr:hover td { background: rgba(255,255,255,.06) !important; }
/* 錢包餘額眼睛隱藏：數字字體歸零，僅顯示 ******（與估值幣別切換互不干擾）。 */
body.hide-bal .tbl .mask-num { font-size: 0 !important; }
body.hide-bal .tbl .mask-num::after { content: '******'; font-size: 13px; color: var(--text); }
body.hide-bal .asset-card .mask-num { font-size: 0 !important; }
body.hide-bal .asset-card .mask-num::after { content: '******'; font-size: 13px; color: rgba(255,255,255,.92); }

/* 頂部菜單（舊站 layout.php：搜尋框＋8 分組下拉＋用戶區，照搬 style.css） */
.navlinks { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; flex-shrink: 0; margin-left: auto; }
.pc-top-search { width: 200px; flex: none; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg2); color: var(--muted); font-size: 13px; padding: 7px 12px; cursor: pointer; }
.nav-pc { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.nav-item { position: relative; flex-shrink: 0; }
.nav-item > a.drop-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 8px 10px; color: var(--text); font-size: 14px; white-space: nowrap; }
.nav-item .caret { font-size: 10px; color: var(--muted); }
.nav-item.on > a.drop-toggle { color: var(--yellow); font-weight: 700; }
html[data-theme="light"] .nav-item.on > a.drop-toggle { color: #b45309; }
.nav-drop { display: none; position: absolute; top: 100%; left: 0; min-width: 160px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.45); z-index: 200; }
.nav-item:hover .nav-drop, .nav-item:focus-within .nav-drop { display: block; }
.nav-drop a { display: block; padding: 9px 12px; color: var(--muted); font-size: 13px; border-radius: 6px; white-space: nowrap; }
.nav-drop a:hover { color: var(--text); background: var(--card); text-decoration: none; }
.nav-user { display: flex; align-items: center; gap: 8px; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line); flex-shrink: 0; }
/* 注意：.btn（登錄／註冊）不受此規則影響，保持現在這樣不變。 */
.nav-user a:not(.btn), .nav-user button:not(.btn) { color: var(--text); font-size: 14px; padding: 8px 10px; white-space: nowrap; background: none; border: none; font-family: inherit; cursor: pointer; text-decoration: none; }
.nav-user a:not(.btn):hover, .nav-user button:not(.btn):hover { text-decoration: underline; }
.nav-dot { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border-radius: 9px; background: #f6465d; color: #fff; font-size: 11px; font-weight: 700; text-align: center; margin-left: 4px; vertical-align: 2px; }
.flag { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }
.lang-sel .lang-cur { display: inline-flex; align-items: center; gap: 8px; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13px; cursor: pointer; }
.lang-sel .nav-drop { right: 0; left: auto; min-width: 190px; max-height: 320px; overflow-y: auto; }
.lang-sel .nav-drop a { display: flex; align-items: center; gap: 10px; }
