/* SPX 0DTE 模拟盘：手机优先、极简风格（配色参考 Robinhood：绿 #00C805、红 #FF5000） */
*,*::before,*::after{box-sizing:border-box}
:root{--green:#00C805;--red:#FF5000;--ink:#111;--muted:#707070;--line:#e8e8e8;--card:#fff;--soft:#f6f6f6}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{font-family:system-ui,-apple-system,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;background:#fff;color:var(--ink);max-width:720px;margin:0 auto;padding:16px 16px 48px;line-height:1.6;font-size:16px;overflow-x:clip}
h1{font-size:22px;line-height:1.3;margin:8px 0 16px;letter-spacing:-.01em}
h2{font-size:18px;line-height:1.35;margin:0 0 12px}
p{margin:0 0 12px}
a{color:var(--ink)}
nav{margin:16px 0 4px}
nav a{display:inline-block;padding:10px 0;margin-right:20px;font-size:16px;text-underline-offset:3px}
nav a:last-child{margin-right:0}

/* 顶部与账户：Robinhood 式大数字置顶 */
.hero{margin-bottom:16px}
.hero-label{font-size:14px;color:var(--muted);margin:0 0 2px}
.equity{font-size:38px;line-height:1.15;font-weight:800;letter-spacing:-.02em;margin:0 0 16px}
.equity b{font-weight:800}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;margin:0 0 16px}
.stat span{display:block;font-size:13px;color:var(--muted);margin-bottom:2px}
.stat b{font-size:17px;font-weight:700}
.spot-card{margin-bottom:16px}
.spot-label{font-size:14px;color:var(--muted);margin:0 0 2px}
#spot{font-size:30px;line-height:1.2;font-weight:800;letter-spacing:-.01em;margin:0;word-break:break-word}
#spot.up{color:var(--green)}
#spot.down{color:var(--red)}
#status{font-size:14px;line-height:1.55;color:var(--muted);word-break:break-word}

/* 提示：浅灰卡片，不堆颜色；文字原样保留 */
.warn{background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:14px 16px;font-size:15px;line-height:1.6}
.warn button{margin-top:12px}

/* 卡片区块：单列排列，白底、细灰线、圆角、大留白 */
section,main>section,.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:18px 16px;margin:0 0 16px}
header>section,header .hero{border:0;padding:0}
#account{padding:18px 16px}

/* 表单与按钮：触控尺寸不小于 44px，输入字号不小于 16px（防 iOS 聚焦放大） */
label{display:block;font-size:15px;margin:0 0 12px}
label input[type="checkbox"]{width:20px;height:20px;vertical-align:-4px;margin-right:8px;accent-color:var(--ink)}
input,select{width:100%;min-height:48px;padding:0 12px;font-size:16px;line-height:1.4;color:var(--ink);background:#fff;border:1px solid #d9d9d9;border-radius:10px}
input:focus,select:focus{outline:none;border-color:var(--ink)}
button{min-height:44px;padding:10px 20px;font-size:16px;font-weight:700;color:var(--ink);background:#fff;border:1px solid var(--ink);border-radius:999px;cursor:pointer}
button:disabled{opacity:.4;cursor:not-allowed}
button:active{transform:scale(.98)}
#orderBtn{width:100%;min-height:52px;font-size:17px;color:#fff;background:var(--green);border-color:var(--green);margin-top:4px}
#resetBtn{width:100%;margin-top:12px}
#closeAllBtn{color:var(--red);border-color:var(--red);background:#fff}
#estimate{font-size:15px;margin:12px 0 4px}
#orderMsg{font-size:15px;color:var(--muted)}
#orderMsg:empty{margin:0}

/* 表格：横向滚动容器内滚动，整页绝不横向滚动；行权价列贴左固定 */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0;padding:0}
.table-wrap table{min-width:760px}
#posTable{min-width:640px}
table{border-collapse:separate;border-spacing:0;width:100%;font-size:15px}
th,td{border-bottom:1px solid var(--line);padding:12px 8px;text-align:right;white-space:nowrap}
th{font-size:13px;color:var(--muted);font-weight:600;text-align:center;background:#fff}
td:first-child,th:first-child{text-align:left}
tr[data-strike]{cursor:pointer}
tr[data-strike]:active{background:var(--soft)}
th.strike,td.strike{position:sticky;left:0;z-index:2;background:#fff}
th.strike{z-index:3}
td.strike b{font-size:16px}
table button{min-height:44px;padding:10px 16px;font-size:15px}
#posTable th:first-child,#posTable td:first-child{position:sticky;left:0;background:#fff;z-index:2}
#posTable th:first-child{z-index:3}

/* 记录与说明 */
#tradeLog{list-style:none;margin:0;padding:0}
#tradeLog li{padding:12px 0;border-bottom:1px solid var(--line);font-size:15px;line-height:1.6}
#tradeLog li:last-child{border-bottom:0}
ul{margin:0 0 12px;padding-left:20px}
li{margin-bottom:8px}
li:last-child{margin-bottom:0}

/* 指南页共用同一份样式：正文、标题、回链同样手机可读 */
body>h1{font-size:24px}
body>h2{margin-top:20px}
body>p>a,body>ul a{display:inline-block;padding:8px 0}

/* 手机：更紧的留白，仍保持 44px 以上触控与 16px 正文 */
@media (max-width:640px){
  body{padding:12px 12px 48px}
  .equity{font-size:34px}
  #spot{font-size:28px}
  .stats{gap:10px 12px}
  section,main>section,.card{padding:16px 12px}
  h1{font-size:22px}
}

/* 桌面：同为单列，只是字号与留白略大，布局不变 */
@media (min-width:641px){
  body{padding:24px 24px 64px}
  h1{font-size:26px}
  .equity{font-size:42px}
  #spot{font-size:34px}
  .stats{grid-template-columns:repeat(4,1fr)}
  section,main>section,.card{padding:20px}
  #orderBtn{width:auto;min-width:280px}
  #resetBtn{width:auto}
}

/* 语言切换与开仓参考、一键开仓：与手机版同一套极简样式 */
.lang-switch{display:flex;gap:8px;margin:0 0 14px}
.lang-switch button{flex:1}
.lang-switch button.active{background:var(--ink);color:#fff;border-color:var(--ink)}
.ref-grid{display:grid;grid-template-columns:1fr;gap:16px}
.ref-side h3{font-size:16px;margin:0 0 8px}
.ref-side p{font-size:15px;margin:0 0 8px}
.ref-foot{font-size:14px;color:var(--muted);margin:12px 0 0}
#refStatus{font-size:15px;margin:12px 0 0}
.quick-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 8px}
.quick-bar>span{font-size:15px;margin-right:4px}
.quick-bar button{min-height:44px}
.quick-bar button.active{background:var(--ink);color:#fff;border-color:var(--ink)}
#quickMsg{font-size:15px;font-weight:700;margin:8px 0 12px}
#quickMsg:empty{margin:0}
#quickMsg.ok{color:var(--green)}
#quickMsg.fail{color:var(--red)}
@media (min-width:641px){
  .ref-grid{grid-template-columns:1fr 1fr}
}

/* P0：出场计划、成本拆解、结构区分与出场提示（手机端同为单列、44px 以上触控） */
#exitPlan h3{font-size:16px;margin:0 0 12px}
.exit-note{font-size:14px;color:var(--muted)}
#timeValueNote,#breakevenGap,#realAmount,#costBreakdown,#maxLossPct,#structureNote{font-size:15px}
#structureNote.warn-red,.warn-red{color:var(--red);font-weight:700}
#sellWarn{color:var(--red);font-weight:700}
.exit-alert{color:var(--red);font-weight:700}
#quickRealNote{font-size:14px;color:var(--muted)}

/* 组合下单与 UV 脚注：与手机版同一套极简样式 */
#comboEstimate{font-size:15px;line-height:1.7;margin:12px 0 4px;white-space:pre-line}
#comboEstimate:empty{margin:0}
.uv-note{font-size:13px;line-height:1.6;color:var(--muted);text-align:center;margin:8px 0 0}
.uv-note a{color:var(--muted)}
