/* ORZVA v2 — 照設計稿 V3（ORZVA_design_v3.dc.html）的色票、字級與元件 */
.v3 {
  --bg: #050810; --card: rgba(14, 24, 44, .84); --ln: rgba(96, 150, 255, .16);
  --tx: #e6ecf8; --t2: #c2cde2; --mu: #8e9bb4; --ac: #1f66e5; --ac2: #46c8ff; --gold: #f5c542;
  --warn: #ff9f43;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 68px;
}
/* 漲跌顏色：預設綠漲紅跌（幣安）；perp_updown_v1=red 時紅漲綠跌（台股） */
.u-green { --up: #16c784; --dn: #ff5470; }
.u-red { --up: #ff5470; --dn: #16c784; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #050810; }
body { font-family: -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; color: var(--tx); font-size: 13px; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
[hidden] { display: none !important; }

.app { position: relative; max-width: 520px; height: 100%; height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.bg-stars { position: absolute; left: 0; top: 0; width: 100%; height: 844px; pointer-events: none; }
.content { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.content::-webkit-scrollbar { display: none; }
main.content { flex: 1; min-height: 0; position: relative; padding: calc(16px + var(--safe-t)) 16px 20px; display: flex; flex-direction: column; gap: 16px; }

.num { font-family: 'Barlow', -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.dn { color: var(--dn); }
.mu { color: var(--mu); }
.card { background: var(--card); border: 1px solid var(--ln); border-radius: 12px; }
.glow { box-shadow: 0 0 0 1px rgba(70, 140, 255, .3), 0 0 22px rgba(40, 110, 255, .16); }
.scroll-x { overflow-x: auto; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.sec { display: flex; align-items: center; justify-content: space-between; min-height: 28px; gap: 8px; }
.sec h2 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 7px; letter-spacing: .3px; }
.sec h2 svg { color: var(--ac2); flex: none; }
.cap { font-size: 11px; color: var(--mu); text-align: right; }
.blk { display: flex; flex-direction: column; gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tag { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: rgba(70, 120, 220, .2); color: #9dc0ff; white-space: nowrap; }
.imp { font-size: 10px; font-weight: 500; padding: 1px 6px; border-radius: 4px; background: rgba(245, 197, 66, .16); color: var(--gold); }
.dot { width: 7px; height: 7px; border-radius: 4px; background: var(--up); box-shadow: 0 0 7px var(--up); flex: none; }
.bar { height: 5px; border-radius: 3px; background: rgba(80, 110, 170, .25); overflow: hidden; }
.bar-fill { height: 5px; border-radius: 3px; background: linear-gradient(90deg, #1f66e5, #46c8ff); }

/* 主視覺 */
/* 4f：主視覺縮小，內容往上疊在地球上（地球在背景 z-index 0，內容 z-index 1） */
.hero { position: relative; margin: calc(-16px - var(--safe-t)) -16px 0; padding: calc(12px + var(--safe-t)) 16px 0; display: flex; flex-direction: column; gap: 10px; }
.globe-wrap { position: absolute; top: calc(-70px + var(--safe-t)); right: -170px; width: 460px; height: 460px; pointer-events: none; z-index: 0; }
.globe-canvas { width: 460px; height: 460px; display: block; }
.globe-static { position: absolute; left: 46px; top: 46px; width: 368px; height: 368px; border-radius: 50%; object-fit: cover; object-position: 30% 50%; box-shadow: 0 0 40px rgba(70, 150, 255, .45); opacity: .9; }
.hero-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; }
.hero-title { display: flex; flex-direction: column; gap: 3px; }
.brand { font-size: 9px; letter-spacing: 4px; color: #9fb4d8; font-weight: 700; }
.h1 { font-size: 28px; font-weight: 700; letter-spacing: 2px; line-height: 1.1; text-shadow: 0 0 22px rgba(80, 150, 255, .45); }
.sub { font-size: 12px; color: var(--t2); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.bell { position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #dce7ff; }
.bell-dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 4px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.hero-bottom { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; padding-bottom: 4px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; background: rgba(6, 12, 26, .72); border: 1px solid var(--ln); border-radius: 12px; padding: 5px 10px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pill b { font-weight: 700; }
.pill.upd { font-size: 10px; color: var(--t2); padding: 3px 8px; border-radius: 10px; margin-left: auto; }
.pdot { width: 7px; height: 7px; border-radius: 4px; background: #46c8ff; box-shadow: 0 0 8px #46c8ff; flex: none; }

/* 全站快照過期提示（沿用正式站規則；橘色，不用紅色） */
.stale-bar { position: relative; z-index: 1; padding: 8px 12px; border-radius: 10px; font-size: 12px; line-height: 1.5; color: var(--warn); background: rgba(255, 159, 67, .1); border: 1px solid rgba(255, 159, 67, .4); }
.stale-bar.dead { color: #181a20; background: var(--warn); border-color: var(--warn); font-size: 13px; font-weight: 700; padding: 10px 12px; }

.page { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; }
/* 疊在地球上的標題、說明文字加陰影，確保清楚可讀 */
.page .sec h2, .page .cap, .page .foot, .page .more { text-shadow: 0 1px 3px rgba(0, 0, 0, .95), 0 0 10px rgba(0, 0, 0, .7); }

.search { display: flex; align-items: center; gap: 9px; min-height: 40px; border-radius: 10px; border: 1px solid var(--ln); background: rgba(12, 22, 42, .8); padding: 0 12px; color: var(--mu); font-size: 12px; width: 100%; }

/* 幣種圖示：有圖用圖，沒有用色塊縮寫 */
.coin { flex: none; width: 26px; height: 26px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #0b1020; overflow: hidden; }
.coin img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 走勢小圖 */
.sp { display: block; width: 100%; }
.spl { fill: none; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.spl.up { stroke: var(--up); }
.spl.dn { stroke: var(--dn); }
.spa.up { fill: color-mix(in srgb, var(--up) 15%, transparent); }
.spa.dn { fill: color-mix(in srgb, var(--dn) 15%, transparent); }

/* 我的自選 */
.watch-row { display: flex; gap: 8px; margin: 0 -16px; padding: 2px 16px 4px; }
.wcard { flex: none; width: 108px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.wcard .sym { font-size: 12px; font-weight: 700; }
.wcard .cat { font-size: 9px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-card { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.empty-card b { font-size: 13px; }
.empty-card span { font-size: 11px; color: var(--mu); line-height: 1.6; }

/* 主要合約 */
.mcard { padding: 9px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mcard .row1 { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.mcard .sym { font-size: 12px; font-weight: 700; }
.mcard .fund { font-size: 9px; color: var(--mu); }

/* 熱門類別 */
.ccard { padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; min-height: 64px; min-width: 0; }
.ccard .name { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard .meta { font-size: 10px; color: var(--mu); display: flex; gap: 6px; justify-content: space-between; }
.state { font-size: 9px; padding: 0 5px; border-radius: 4px; background: rgba(120, 140, 180, .18); color: #aab6cc; white-space: nowrap; }
.state.s-up { background: rgba(22, 199, 132, .15); color: #6ee7b7; }
.state.s-dn { background: rgba(255, 159, 67, .14); color: #ffc38a; }

/* 今日焦點 */
.fcard { display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.fart { height: 70px; display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center; }
.fbody { padding: 9px 10px; display: flex; flex-direction: column; gap: 4px; }
.fbody .t { font-size: 13px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fbody .s { font-size: 11px; color: var(--mu); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fbody .m { font-size: 10px; color: #76839c; }

.foot { margin: 0; font-size: 10px; color: #66738c; text-align: center; line-height: 1.7; }
.wip-card { padding: 28px 16px; text-align: center; color: var(--mu); font-size: 14px; }

/* 底欄（照 V3），留底部橫條安全區 */
.tabbar { flex: none; position: relative; display: flex; height: calc(var(--tab-h) + var(--safe-b)); border-top: 1px solid var(--ln); background: rgba(6, 10, 20, .95); padding: 0 4px calc(8px + var(--safe-b)); z-index: 5; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #7a879f; font-size: 10px; min-height: 52px; text-align: center; }
.tab.on { color: #5aa2ff; font-weight: 500; }
.tab.on svg { filter: drop-shadow(0 0 6px rgba(70, 150, 255, .9)); }

/* 等級徽章 */
.gb { flex: none; min-width: 44px; height: 20px; border-radius: 5px; font-size: 10px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.g-S { background: var(--gold); color: #1a1405; font-weight: 700; }
.g-A { border: 1px solid #5aa2ff; color: #8fc0ff; }
.g-B { background: rgba(120, 140, 180, .18); color: #aab6cc; }
.g-C { border: 1px dashed rgba(140, 160, 200, .35); color: var(--mu); }

/* 幣種詳情（底部拉出） */
.sheet { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-bg { position: absolute; inset: 0; width: 100%; background: rgba(0, 4, 12, .7); }
.sheet-panel { position: relative; max-height: min(660px, 88%); background: #0a1224; border-top: 1px solid rgba(96, 150, 255, .35); border-radius: 18px 18px 0 0; padding: 10px 16px calc(22px + var(--safe-b)); box-shadow: 0 -10px 40px rgba(30, 90, 220, .25); animation: sheetIn .22s ease-out; }
@keyframes sheetIn { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.grip { width: 36px; height: 4px; border-radius: 2px; background: rgba(140, 160, 200, .4); margin: 0 auto 10px; }
#detailBody { display: flex; flex-direction: column; gap: 12px; }
.d-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.d-head .coin { width: 38px; height: 38px; border-radius: 19px; font-size: 12px; }
.d-sym { font-size: 19px; font-weight: 700; }
.d-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.d-att { font-size: 10px; color: var(--mu); }
.d-att .num { color: #6fd3ff; font-size: 13px; }
.d-chart { padding: 10px 12px; }
.d-axis { display: flex; justify-content: space-between; font-size: 9px; color: var(--mu); margin-top: 4px; }
.mini { padding: 8px; display: flex; flex-direction: column; gap: 1px; }
.mini .k { font-size: 10px; color: var(--mu); }
.mini .v { font-size: 14px; }
.why { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.why h3, .fac h3 { margin: 0; font-size: 13px; font-weight: 700; }
.why h3 { color: #8fc0ff; }
.why li { list-style: none; display: flex; gap: 7px; font-size: 12px; line-height: 1.55; color: var(--t2); }
.why li::before { content: '•'; color: #46c8ff; }
.why ul { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fac { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.frow { display: flex; flex-direction: column; gap: 3px; }
.frow .l { display: flex; justify-content: space-between; font-size: 12px; }
.frow .h { color: var(--mu); font-size: 10px; }
.btns { display: flex; gap: 8px; }
.btn1 { text-decoration: none; min-height: 42px; border-radius: 10px; background: var(--ac); font-size: 13px; font-weight: 500; display: flex; align-items: center; justify-content: center; flex: 1; box-shadow: 0 0 14px rgba(40, 110, 255, .35); color: #fff; text-align: center; }
.btn1.on { background: rgba(20, 34, 60, .8); border: 1px solid #4d8dff; box-shadow: none; color: #8fc0ff; }
.btn2 { min-height: 42px; border-radius: 10px; border: 1px solid var(--ln); background: rgba(20, 34, 60, .8); font-size: 13px; display: flex; align-items: center; justify-content: center; flex: 1; text-align: center; text-decoration: none; color: var(--tx); }
.d-note { font-size: 10px; color: #66738c; text-align: center; }

.toast { position: absolute; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); transform: translateX(-50%); z-index: 30; background: rgba(10, 18, 36, .95); border: 1px solid rgba(96, 150, 255, .35); color: var(--tx); font-size: 12px; padding: 8px 14px; border-radius: 10px; white-space: nowrap; box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }

@media (prefers-reduced-motion: reduce) {
  .sheet-panel { animation: none; }
}

/* ── 4b：四捨五入為 0 的漲跌用中性灰 ── */
.flat { color: var(--mu); }
.spl.flat { stroke: var(--mu); }
.spa.flat { fill: color-mix(in srgb, var(--mu) 12%, transparent); }

/* ── 4b：脈動頁（照 V3）── */
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pcard { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.prow { display: flex; align-items: center; gap: 10px; }
.pleft { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.plab { font-size: 11px; color: var(--t2); }
.pscore { display: flex; align-items: baseline; gap: 5px; }
.pbig { font-size: 50px; line-height: 1; font-weight: 700; color: #6fd3ff; text-shadow: 0 0 18px rgba(80, 190, 255, .55); }
.pmax { font-size: 15px; color: var(--mu); }
.plabel { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.plabel.neutral { color: #6fd3ff; }
.pdesc { font-size: 11px; color: var(--t2); line-height: 1.5; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.05); opacity: 1; } }
.pring { flex: none; animation: breathe var(--breath, 3.2s) ease-in-out infinite; transform-origin: 50% 50%; }
.pstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pst { background: rgba(8, 15, 30, .75); border: 1px solid var(--ln); border-radius: 8px; padding: 8px 6px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pst .k { font-size: 10px; color: var(--mu); }
.pst .v { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pst .h { font-size: 9px; color: #6f7c95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnote { font-size: 10px; color: #6f7c95; line-height: 1.5; }

.catcell { padding: 8px 7px; display: flex; flex-direction: column; gap: 2px; border-radius: 10px; min-width: 0; }
.catcell .r1 { display: flex; justify-content: space-between; align-items: baseline; gap: 2px; }
.catcell .n { font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catcell .st { font-size: 9px; color: var(--mu); }
.catcell .st.s-up { color: #6ee7b7; }
.catcell .st.s-dn { color: #ffc38a; }

.ev-row { display: flex; gap: 8px; margin: 0 -16px; padding: 2px 16px 4px; }
.ev { flex: none; width: 150px; padding: 10px; display: flex; flex-direction: column; gap: 7px; }
.evh { display: flex; flex-direction: column; }
.evh b { font-size: 12px; font-weight: 700; }
.evh span { font-size: 10px; color: var(--mu); }
.evn { font-size: 10px; color: var(--gold); }
.ev-soon { opacity: .6; justify-content: space-between; }
.soon { font-size: 12px; color: var(--mu); padding: 6px 0; }
.cd { display: flex; align-items: flex-end; gap: 3px; }
.cd .box { background: rgba(8, 15, 30, .9); border: 1px solid var(--ln); border-radius: 5px; min-width: 26px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.cd small { display: block; text-align: center; font-size: 9px; color: var(--mu); margin-top: 2px; }
.cd .c { padding-bottom: 16px; color: var(--mu); }

.impsw { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--t2); }
.sw { width: 44px; height: 26px; border-radius: 13px; background: rgba(80, 100, 140, .4); position: relative; flex: none; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 10px; background: #9aa6bd; transition: left .15s; }
.sw.on { background: var(--ac); box-shadow: 0 0 10px rgba(40, 110, 255, .5); }
.sw.on::after { left: 21px; background: #fff; }
.chips { display: flex; gap: 6px; margin: 0 -16px; padding: 0 16px; }
.chip { flex: none; min-height: 32px; padding: 0 13px; border-radius: 9px; border: 1px solid var(--ln); background: rgba(20, 34, 60, .7); color: var(--t2); font-size: 12px; display: flex; align-items: center; white-space: nowrap; }
.chip.on { background: var(--ac); border-color: #4d8dff; color: #fff; font-weight: 500; box-shadow: 0 0 12px rgba(40, 110, 255, .4); }
.chip .num { opacity: .7; margin-left: 5px; font-size: 11px; }
.nlist { display: flex; flex-direction: column; }
.nrow { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--ln); width: 100%; }
.nrow:first-child { border-top: 0; }
.nrow .t { font-size: 12px; color: var(--mu); width: 34px; flex: none; }
.nrow .b { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.nrow .ti { font-size: 13px; line-height: 1.45; color: #c2cde2; }
.nrow.is-imp .ti { font-weight: 700; color: var(--tx); }
.nrow .tags { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.nrow .src { font-size: 10px; color: #76839c; }
.nempty { padding: 18px 12px; text-align: center; font-size: 12px; color: var(--mu); }
.more-btn { min-height: 36px; border-radius: 9px; border: 1px solid var(--ln); background: rgba(20, 34, 60, .7); color: #7fb2ff; font-size: 12px; text-align: center; }

.rot { padding: 8px 9px; display: flex; flex-direction: column; gap: 2px; border-radius: 10px; min-width: 0; }
.rot .n { font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rot .f { font-size: 10px; }
.rot .v { font-size: 16px; }
.sumcard { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.sumh { display: flex; justify-content: space-between; align-items: center; }
.sumh b { font-size: 13px; font-weight: 700; }
.sumt { font-size: 12px; line-height: 1.7; color: var(--t2); }

/* 快訊面板 */
#newsBody { display: flex; flex-direction: column; gap: 10px; }
.nb-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--mu); }
.nb-title { font-size: 17px; font-weight: 700; line-height: 1.45; margin: 0; }
.nb-sum { font-size: 13px; line-height: 1.75; color: var(--t2); margin: 0; }
.nb-orig { font-size: 11px; color: #76839c; line-height: 1.5; margin: 0; }
@media (prefers-reduced-motion: reduce) { .pring { animation: none; } }

/* ── 4c：雷達與完整清單（照 V3）── */
.more { font-size: 12px; color: #7fb2ff; min-height: 32px; display: flex; align-items: center; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--tx); font: inherit; font-size: 13px; height: 38px; }
.search input::placeholder { color: var(--mu); }
.search input::-webkit-search-cancel-button { filter: invert(.7); }
.radar-main, .radar-full { display: flex; flex-direction: column; gap: 16px; }
.radar-full { gap: 10px; }
.back { font-size: 13px; align-self: flex-start; }
.center { text-align: center; }

.bcard { padding: 9px 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bcard .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 2px; }
.bcard .l { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bcard .sym { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcard .head { font-size: 11px; font-weight: 700; color: #8fc0ff; }
.bcard .short { font-size: 10px; color: var(--mu); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.att-ring { flex: none; }

.llist { display: flex; flex-direction: column; }
.lrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 6px 12px; border-top: 1px solid var(--ln); width: 100%; }
.lrow:first-child { border-top: 0; }
.atype { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.at-volume { background: rgba(22, 199, 132, .16); color: #16c784; }
.at-oi { background: rgba(70, 200, 255, .16); color: #46c8ff; }
.at-funding { background: rgba(245, 197, 66, .16); color: #f5c542; }
.at-liquidation { background: rgba(255, 84, 112, .16); color: #ff5470; }
.at-upgrade { background: rgba(183, 140, 255, .16); color: #b78cff; }
.at-move_1h { background: rgba(255, 138, 92, .16); color: #ff8a5c; }
.at-move_24h { background: rgba(159, 224, 255, .16); color: #9fe0ff; }
.an-mid { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.an-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.an-l1 { display: flex; gap: 7px; align-items: baseline; }
.an-l1 b { font-size: 12px; }
.an-l1 .s { font-size: 12px; color: var(--t2); }
.an-why { font-size: 10px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-sp { flex: none; width: 46px; }

.rtabs { display: flex; gap: 5px; }
.rtabs .chip { min-height: 28px; padding: 0 9px; font-size: 11px; }
.rank { width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; background: rgba(120, 140, 180, .2); flex: none; }
.rank.r1 { background: var(--gold); color: #1a1405; }
.rank.r2 { background: #c9d1de; color: #1a1f2a; }
.rank.r3 { background: #d59a5b; color: #1f1206; }
.rk-l { display: flex; align-items: center; gap: 9px; min-width: 116px; }
.rk-l .s { font-size: 13px; font-weight: 500; }
.rk-sp { width: 56px; flex: none; }
.rk-r { display: flex; flex-direction: column; align-items: flex-end; min-width: 64px; }
.rk-r .k { font-size: 9px; color: var(--mu); }
.fullbtn { flex: none; }

.seg { display: flex; background: rgba(20, 34, 60, .8); border: 1px solid var(--ln); border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { flex: 1; min-height: 32px; border-radius: 7px; font-size: 12px; color: var(--mu); text-align: center; }
.seg button.on { background: var(--ac); color: #fff; font-weight: 500; }
.flist { display: flex; flex-direction: column; }
.fhead { display: flex; justify-content: space-between; padding: 8px 12px; font-size: 10px; color: var(--mu); }
.fhead .c1 { min-width: 110px; }
.fhead .c4 { padding-right: 44px; }
.frow2 { display: flex; align-items: center; border-top: 1px solid var(--ln); }
.frow2 .main { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 0 6px 12px; min-height: 50px; min-width: 0; }
.frow2 .who { display: flex; align-items: center; gap: 7px; min-width: 104px; }
.frow2 .who .s { font-size: 13px; font-weight: 500; }
.frow2 .who .c { font-size: 9px; color: var(--mu); }
.frow2 .sp { width: 40px; flex: none; }
.frow2 .px { display: flex; flex-direction: column; align-items: flex-end; min-width: 56px; }
.star { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #6f7d98; flex: none; }
.star.on { color: var(--gold); }
.star.on svg { fill: currentColor; }
.fempty { padding: 24px; text-align: center; font-size: 12px; color: var(--mu); border-top: 1px solid var(--ln); }
.fmore { padding: 14px; text-align: center; font-size: 11px; color: var(--mu); border-top: 1px solid var(--ln); }
.sigtags { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; border-top: 1px dashed var(--ln); margin-top: 4px; }
.sigtags .k { font-size: 10px; color: var(--mu); width: 100%; }

/* ── 4d：策略頁 ── */
.mcard2 { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.mc-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mc-t { display: flex; flex-direction: column; gap: 2px; }
.mc-t .k { font-size: 11px; color: var(--mu); }
.mc-t .n { font-size: 17px; font-weight: 700; }
.mc-bars { display: flex; flex-direction: column; gap: 8px; }
.wbar { display: flex; flex-direction: column; gap: 3px; }
.wbar .l { display: flex; justify-content: space-between; font-size: 12px; gap: 8px; }
.wbar .h { color: var(--mu); font-size: 10px; }
.mc-ind { font-size: 11px; color: var(--mu); line-height: 1.5; }
.tpl { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.tpl.on { border-color: #4d8dff; box-shadow: 0 0 12px rgba(40, 110, 255, .35); }
.tpl .r1 { display: flex; justify-content: space-between; align-items: center; }
.tpl b { font-size: 13px; }
.tpl .cta { font-size: 10px; color: #8fc0ff; }
.tpl.on .cta { color: var(--gold); }
.tpl .d { font-size: 11px; color: var(--mu); line-height: 1.5; }
.tpl .risk { font-size: 10px; color: var(--t2); }
.strat { min-height: 58px; padding-top: 8px; padding-bottom: 8px; text-align: left; }
.strat .st { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.strat .st b { font-size: 13px; }
.strat .st .d { font-size: 11px; color: var(--mu); }
.strat .st .t { font-size: 11px; color: var(--t2); }
.strat .sn { display: flex; align-items: center; gap: 6px; flex: none; }
.strat .sn .num { font-size: 20px; color: #6fd3ff; }
.strat .sn .k { font-size: 10px; color: var(--mu); }
.fstrat { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 10px; border: 1px solid #4d8dff; background: rgba(31, 102, 229, .15); font-size: 12px; }
.fm { width: 52px; flex: none; display: flex; flex-direction: column; align-items: center; font-size: 12px; line-height: 1.2; }
.fm small { font-size: 8px; color: var(--mu); font-family: -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
.fm.cs { color: #6fd3ff; }
/* 調整模型 */
.sh-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 2px 0 10px; }
.sh-h b { font-size: 16px; }
#modelBody, #infoBody, #bellBody { display: flex; flex-direction: column; gap: 12px; }
.ms-sec { display: flex; flex-direction: column; gap: 6px; }
.ms-h { display: flex; justify-content: space-between; align-items: center; }
.ms-h b { font-size: 13px; }
.ms-sum { font-size: 13px; color: #6fd3ff; }
.ms-sum.bad { color: var(--gold); }
.wstep { display: flex; align-items: center; gap: 8px; min-height: 40px; border-top: 1px solid var(--ln); }
.wstep .g { flex: 1; font-size: 13px; }
.wstep .v { width: 46px; text-align: center; font-size: 14px; }
.stp { width: 40px; height: 34px; border-radius: 8px; border: 1px solid var(--ln); background: rgba(20, 34, 60, .8); font-size: 15px; color: var(--tx); }
.stp:disabled { opacity: .35; }
.chips.wrap { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.chips.wrap .chip { min-height: 30px; padding: 0 10px; font-size: 11px; }
.pick-g { display: flex; flex-direction: column; gap: 5px; }
.pick-g .k { font-size: 11px; color: var(--mu); }
.ms-err { font-size: 12px; color: var(--gold); min-height: 1em; }
.btn1:disabled { opacity: .4; box-shadow: none; }
/* ── 我的頁 ── */
.guest { padding: 14px; display: flex; align-items: center; gap: 12px; }
.guest .av { width: 46px; height: 46px; border-radius: 23px; background: radial-gradient(circle at 35% 30%, #3d82ff, #0d2a66); display: flex; align-items: center; justify-content: center; color: #e8f1ff; box-shadow: 0 0 14px rgba(60, 130, 255, .5); flex: none; }
.guest .gt { display: flex; flex-direction: column; gap: 2px; }
.guest b { font-size: 16px; }
.guest span { font-size: 11px; color: var(--mu); }
.ncard { padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.ncard .v { font-size: 20px; color: #6fd3ff; }
.ncard .v.gold { color: var(--gold); }
.ncard .v.t { font-size: 15px; font-weight: 700; min-height: 26px; display: flex; align-items: center; }
.ncard .k { font-size: 10px; color: var(--mu); }
.cap.left { text-align: left; }
.cap.center { text-align: center; }
.lt { display: flex; flex-direction: column; gap: 1px; min-width: 0; text-align: left; }
.lt .cap { font-size: 10px; }
.sw:disabled { opacity: .4; }
.note { font-size: 11px; line-height: 1.6; color: var(--gold); background: rgba(245, 197, 66, .08); border: 1px solid rgba(245, 197, 66, .3); border-radius: 10px; padding: 8px 10px; }
.updown { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ud-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.ud-p { font-size: 12px; }
.sm { font-size: 12px; }
.liqst { display: flex; align-items: center; gap: 6px; }
.liqst.warn { color: var(--gold); }
.dot.off { background: var(--gold); box-shadow: 0 0 7px var(--gold); }
.gloss { display: flex; flex-direction: column; gap: 12px; }
.gi b { font-size: 13px; color: #9dc0ff; }
.gi p { margin: 3px 0 0; font-size: 12px; line-height: 1.7; color: var(--t2); }
.about p { margin: 0 0 10px; font-size: 12px; line-height: 1.75; color: var(--t2); }
.about .warn { color: var(--gold); }
.about .src b { font-size: 12px; }
.about ul { margin: 4px 0 10px; padding-left: 18px; font-size: 12px; line-height: 1.8; color: var(--t2); }
.stpg { display: flex; align-items: center; gap: 8px; }
.port { display: flex; flex-direction: column; gap: 8px; }
.port p { margin: 0; font-size: 12px; line-height: 1.6; }
.port b { font-size: 13px; margin-top: 4px; }
.port textarea { width: 100%; box-sizing: border-box; border-radius: 10px; border: 1px solid var(--ln); background: rgba(12, 22, 42, .9); color: var(--tx); font: 11px/1.5 ui-monospace, Menlo, Consolas, monospace; padding: 8px; resize: vertical; word-break: break-all; }
/* ── 警報中心 ── */
.bsec { display: flex; flex-direction: column; gap: 6px; }
.brow { min-height: 54px; text-align: left; }
.brow .bt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brow .b1 { display: flex; gap: 7px; align-items: center; }
.brow b { font-size: 13px; }
.brow .b2 { font-size: 11px; color: var(--mu); }
.brow .tm { font-size: 11px; flex: none; }
.brow .k-up { color: var(--up); }
.brow .k-down { color: var(--dn); }
.udot { width: 6px; height: 6px; border-radius: 3px; background: var(--gold); flex: none; }
.bempty { padding: 14px 12px; font-size: 12px; color: var(--mu); line-height: 1.6; }
a.lrow { color: inherit; text-decoration: none; }
