/* 掘金台 · 手机端样式 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: #0b1120; color: #dbe4f5; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
body { min-height: 100vh; }

/* 隐藏「掘金工作台」原面板/悬浮球：只用它的 K 线引擎 */
#biga-panel, #biga-fab, #biga-launch, #launcher { display: none !important; }

#boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #0b1120; z-index: 10; }
.boot-logo { font-size: 46px; }
.boot-name { font-size: 22px; font-weight: 800; color: #ffd54f; letter-spacing: 2px; }
.boot-tip { font-size: 13px; color: #7f92b5; }

.wrap { max-width: 720px; margin: 0 auto; padding: 8px 12px 26px; }
.hd { display: flex; align-items: center; gap: 10px; padding: 6px 2px 12px; }
.brand { font-size: 20px; font-weight: 900; color: #ff2d2d; letter-spacing: 1px; text-shadow: 0 0 10px rgba(255,45,45,.35); }
.sp { flex: 1; }
button { font-family: inherit; font-size: 14px; border-radius: 10px; border: 1px solid #2b3a5a; background: #131f36; color: #cfe0ff; padding: 10px 14px; }
button.primary { background: #1d4ed8; border-color: #2563eb; color: #fff; font-weight: 700; }
button.ghost { padding: 6px 12px; font-size: 13px; background: transparent; }

/* 首页模块 */
.mod { display: flex; align-items: center; gap: 12px; background: #0f1729; border: 1px solid #1f2b45; border-radius: 14px; padding: 16px 14px; margin-bottom: 12px; cursor: pointer; transition: transform .12s, border-color .15s; }
.mod:active { transform: scale(.985); border-color: #3b82f6; }
.mod-ico { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: #111c31; border: 1px solid #24314d; font-size: 20px; }
.mod-txt { flex: 1; min-width: 0; }
.mod-txt b { display: block; font-size: 16.5px; color: #e8eefc; }
.mod-txt b em { font-style: normal; font-size: 13px; color: #86efac; }
.mod-txt span { display: block; font-size: 12.5px; color: #7f92b5; margin-top: 3px; }
.mod-arrow { color: #4a5a78; font-size: 22px; }

/* 子页头 */
.sub-hd { display: flex; align-items: center; gap: 10px; padding: 4px 2px 12px; }
.sub-hd b { font-size: 16px; color: #e8eefc; }
.sub-hd .cnt { font-size: 12.5px; color: #7f92b5; }
button.back { padding: 6px 10px; font-size: 13.5px; background: transparent; }

/* 卡片 */
.card { background: #0f1729; border: 1px solid #1f2b45; border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.card-t { font-size: 12.5px; color: #7f92b5; margin-bottom: 10px; }
.card-t .cap { color: #55688c; font-size: 11.5px; margin-left: 6px; }
.lb { font-size: 12.5px; color: #7f92b5; margin-bottom: 8px; }
.row { display: flex; gap: 10px; }
input#in-code { flex: 1; min-width: 0; padding: 12px 14px; font-size: 16px; border-radius: 10px; border: 1px solid #2b3a5a; background: #111c31; color: #e8eefc; }
input#in-code::placeholder { color: #55688c; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid #2b3a5a; background: #111c31; color: #93c5fd; font-size: 12.5px; }
.chip.sm { padding: 4px 10px; font-size: 12px; color: #cfe0ff; border-color: #24314d; }
.recent-box { margin-top: 14px; }
.recent-box .chips { margin-top: 6px; }

/* 个股页 */
.st-price-card { display: flex; flex-direction: column; gap: 4px; }
.st-name { font-size: 17px; font-weight: 800; color: #e8eefc; }
.st-code { font-size: 12.5px; color: #7f92b5; font-weight: 400; margin-left: 4px; }
.st-px { font-size: 30px; font-weight: 800; line-height: 1.15; }
.st-px span { font-size: 16px; margin-left: 6px; }
.st-ind { font-size: 12.5px; color: #7f92b5; }
.up { color: #ff5252; }
.dn { color: #22c55e; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kv { background: #111c31; border: 1px solid #1f2b45; border-radius: 10px; padding: 8px 10px; }
.kv .k { font-size: 11.5px; color: #7f92b5; }
.kv .v { font-size: 15px; font-weight: 700; margin-top: 2px; }

.sig-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sig { font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid #24314d; color: #4a5a78; }
.sig.on { color: #fff; }
.sig.ent.on { background: rgba(255,45,45,.16); border-color: #ff2d2d; color: #ff8b8b; }
.sig.lea.on { background: rgba(255,213,79,.14); border-color: #ffd54f; color: #ffe08a; }
.sig.clr.on { background: rgba(255,255,255,.10); border-color: #cfd8e6; color: #eef3ff; }
.sig.lowB.on { background: rgba(199,125,255,.14); border-color: #c77dff; color: #e0b8ff; }
.sig.side.on { background: rgba(34,211,238,.14); border-color: #22d3ee; color: #a5f3fc; }
.sig.revIn.on { background: rgba(255,159,67,.16); border-color: #ff9f43; color: #ffc48a; }
.sig.revOut.on { background: rgba(142,202,255,.14); border-color: #8ecaff; color: #b9dcff; }
.r-tip { margin-top: 10px; font-size: 12px; color: #7f92b5; }

.st-actions { display: flex; gap: 10px; margin: 4px 0 8px; }
.st-actions button { flex: 1; padding: 13px 10px; font-size: 15px; }
.star-btn { background: #2a1a3f; border-color: #7c3aed; color: #e9d5ff; font-weight: 700; }

/* 自选列表 */
.pool-row { display: flex; align-items: center; gap: 10px; background: #0f1729; border: 1px solid #1f2b45; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.pr-l { flex: 1; min-width: 0; }
.pr-l b { font-size: 15.5px; color: #e8eefc; }
.pr-r { text-align: right; font-weight: 700; }
.pr-r .sm { font-size: 12.5px; display: block; }
.pool-row .rm { padding: 2px 9px; font-size: 15px; background: transparent; border-color: #3a2a2a; color: #ff8b8b; }

.ft { text-align: center; font-size: 11.5px; color: #54658a; padding: 14px 0 4px; }
.ft-note { text-align: center; font-size: 11.5px; color: #54658a; padding: 10px 0 2px; }
.muted { color: #6b7c9c; }
.ol { margin: 0; padding-left: 20px; line-height: 1.85; font-size: 13px; }
.ol b { color: #93c5fd; }
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: #111c31; border: 1px solid #2b3a5a; color: #cfe0ff; padding: 9px 16px; border-radius: 10px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 2147483647; }
.toast.show { opacity: 1; }

/* 横屏按钮（浮在 K 线弹窗上） */
#jjt-chart-btns { position: fixed; right: 10px; top: 92px; z-index: 2147483600; display: none; }
#jjt-chart-btns button { padding: 7px 12px; font-size: 13px; background: rgba(17,28,49,.92); border-color: #3b82f6; color: #93c5fd; border-radius: 999px; }

/* 强制横屏（不依赖手机能否旋转）：把 K 线弹窗整体转 90°，按 长边×短边 渲染后铺满竖屏 */
html.jjt-rot, html.jjt-rot body { overflow: hidden !important; }
html.jjt-rot #biga-chart-mask {
  padding: 0 !important; overflow: hidden !important;
  align-items: center !important; justify-content: center !important;
}
html.jjt-rot #biga-chart {
  position: fixed !important;
  left: 50% !important; top: 50% !important;
  width: var(--jjt-long) !important; height: var(--jjt-short) !important;
  max-width: none !important; max-height: none !important;
  margin: 0 !important; border-radius: 0 !important;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
}
html.jjt-rot #biga-chart canvas { width: 100% !important; height: auto !important; display: block; }
html.jjt-rot #jjt-chart-btns { right: 10px; top: auto; bottom: 16px; }
