
  /* An element marked hidden stays hidden, whatever display a selector gives it (RK-N1). */
  [hidden] { display: none !important; }
  :root {
    --bg: #04080f; --panel: #060d18; --panel2: #0a1525; --border: #1e2d45;
    --text: #e6edf5; --muted: #8899aa; --orange: #FF6B00; --orange2: #e55f00; --bull: #00d084; --bear: #ef5350;
    --onOrange: #04080f; --bearSolid: #d32f2f;
    /* Theme tokens (X-01). Dark values here; the light values are under [data-theme=light]. */
    --orangeText: #FF6B00; --onBull: #04140d; --sell: #d8433f; --bearText: #fca5a5; --live: #5a1414; --onLive: #fff; --liveMark: #d8433f; --onVideo: #8899aa; /* text on the black video tiles, the same in both themes */
    --text2: #c8d3e0; --border2: #2a3d5c; --hover: rgba(255,255,255,.06); --scrim: rgba(2,5,10,.72); --shadow: rgba(0,0,0,.5);
    --tintBull: rgba(0,208,132,.12); --tintBear: rgba(239,83,80,.12); --tintWarn: rgba(255,183,77,.12); --warnText: #ffb74d;
    --chartBg: #04080f; --chartGrid: #0b1524; --chartText: #8899aa; --chartBorder: #1e2d45; --chartUp: #26a69a; --chartDown: #ef5350;
    --segOn: #14233a; /* the picked button of a segmented control (order type, coins / USD) */
    --errText: #f87171; --msgBad: #ff6b6b; --demoText: #7cb7ff; /* error boxes, refused-action messages, the Demo focus chip */
    --rowHover: #0d1a2e; /* a hovered strategy row */
    color-scheme: dark;
  }
  /* Light theme: every pair below meets WCAG AA (4.5:1 text) on --panel, --panel2 and --bg. LIVE stays a deep crimson pill,
     distinct from the bear red text, and bull/bear keep their hue. */
  :root[data-theme=light] {
    --bg: #f4f6fa; --panel: #ffffff; --panel2: #eaeef4; --border: #cdd5e0;
    --text: #0f1b2d; --muted: #475467; --orange2: #c25200; --bull: #036c4e; --bear: #bf1a1a;
    --onOrange: #04080f; --bearSolid: #c62828;
    --orangeText: #a84300; --onBull: #ffffff; --sell: #bf1a1a; --bearText: #b42318; --live: #7f1d1d; --onLive: #fff; --liveMark: #7f1d1d;
    --text2: #24344a; --border2: #b4bfcf; --hover: rgba(15,27,45,.06); --scrim: rgba(15,27,45,.45); --shadow: rgba(15,27,45,.18);
    --tintBull: rgba(4,120,87,.10); --tintBear: rgba(198,40,40,.08); --tintWarn: rgba(168,67,0,.10); --warnText: #8a4b00;
    --chartBg: #ffffff; --chartGrid: #edf0f5; --chartText: #4f5d70; --chartBorder: #cdd5e0; --chartUp: #0f8a7e; --chartDown: #d32f2f;
    --segOn: #dbe3ee;
    --errText: #b42318; --msgBad: #b42318; --demoText: #1d4f86;
    --rowHover: #e3e9f1;
    --pd-bg: #f4f6fa; --pd-surface: #ffffff; --pd-raised: #eaeef4; --pd-border: #cdd5e0; --pd-text: #0f1b2d; --pd-muted: #475467; --pd-text-2: #24344a;
    --pd-yes: #036c4e; --pd-no: #bf1a1a; --pd-live: #036c4e; --pd-on-accent: #04080f; --pd-shadow-card: 0 8px 24px rgba(15,27,45,.12);
    --affHero: #e4ebf5; --refNum: #a84300; --pill: #1d4f86; --pillBorder: #9db4d0;
    color-scheme: light;
  }
  * { box-sizing: border-box; }
  html { background: var(--bg); }
  body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
  .num { font-variant-numeric: tabular-nums; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
  header { display: flex; align-items: center; gap: 14px; padding: 8px 14px; background: var(--panel); border-bottom: 1px solid var(--border); flex-wrap: nowrap; }
  header > * { flex-shrink: 0; }
  header > .dot { flex-shrink: 1; min-width: 40px; }
  @media (max-width: 1240px) { header { flex-wrap: wrap; } header > #acctMenu { margin-left: auto; } }
  @media (min-width: 801px) and (max-width: 1240px) { header > #hdrNav { max-width: 100%; flex-wrap: wrap; } header #hdrNav button { padding: 5px 8px; } }
  @media (min-width: 1241px) {
    header { gap: 8px; }
    header > #hdrNav { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
    #hdrNav::-webkit-scrollbar { display: none; }
    header #hdrNav { gap: 0; }
    header #hdrNav button { flex: none; padding: 5px 4px; }
    header > #hdrFocus { flex: none; max-width: none; overflow: visible; text-overflow: clip; }
  }
  /* When every tab cannot fit on the header row, the row wraps and every tab stays visible (no hidden horizontal scroll). */
  @media (min-width: 1241px) {
    body.navWrap header { flex-wrap: wrap; row-gap: 6px; }
    body.navWrap header > #acctMenu { margin-left: auto; }
    body.navWrap header > #hdrNav { flex: none; overflow-x: visible; order: 99; }
    body.navWrap header #hdrNav { gap: 2px; }
    body.navWrap header #hdrNav button { padding: 5px 12px; }
  }
  @media (min-width: 1241px) and (max-width: 1300px) { header { gap: 5px; } }
  @media (min-width: 1241px) and (max-width: 1400px) { header > #hdrFocus { display: none; } }
  @media (min-width: 1241px) and (max-width: 1300px) {
    body.btOn header { flex-wrap: wrap; gap: 14px; }
    body.btOn header > #acctMenu { margin-left: auto; }
    body.btOn header > #hdrNav { flex: none; overflow-x: visible; order: 99; }
    body.btOn header #hdrNav { gap: 2px; }
    body.btOn header #hdrNav button { padding: 5px 12px; }
    body.btOn header > #hdrFocus:not(:empty) { display: inline; flex: none; max-width: 320px; }
  }
  @media (min-width: 1301px) and (max-width: 1360px) { body.btOn header { gap: 5px; } }
  @media (min-width: 1401px) and (max-width: 1480px) { body.btOn header > #hdrFocus { display: none; } }
  .brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; letter-spacing: -.2px; color: var(--text); white-space: nowrap; }
  header .brand { flex: none; }
  header .bname { display: inline; white-space: nowrap; }
  .brand em { font-style: normal; color: var(--orangeText); }
  .logo .mark, .bLogo { background: radial-gradient(circle at 50% 50%, rgba(255,107,0,.3), rgba(255,107,0,0) 70%), #05060A; border: 1px solid rgba(255,154,87,.22); }
  .logo .mark svg, .bLogo svg { width: 84%; height: auto; display: block; }
  .sym { font-weight: 700; font-size: 15px; }
  #dock tr.posgrp td { background: var(--panel2); color: var(--orangeText); padding: 4px 10px; }
  #dock tr.posmis td { background: #3a1212; padding: 4px 10px; white-space: normal; }
  .badge { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
  .badge[data-acct-label] { text-transform: none; white-space: nowrap; }
  .badge.paper { background: #2a3340; color: #9fb3c8; }
  .badge.demo { background: #213a2f; color: #6fd3a0; }
  .badge.live { background: var(--live); color: var(--onLive); animation: pulse 2s infinite; }
  .badge.sim { background: #6b2a07; color: #ffd2b8; }
  .badge.real { background: #123528; color: #6fd3a0; }
  .bkPill { text-transform: none; letter-spacing: 0; display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 2px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
  .bkPill i { font-style: normal; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; font-size: 10px; background: rgba(0,0,0,.28); color: inherit; }
  .bkPill.tradovate { background: #1e3a8a; color: #dbeafe; border-color: #3b82f6; }
  .bkPill.alpaca { background: #5c4a00; color: #fde68a; border-color: #eab308; }
  .bkPill.sim { background: #3b2a5c; color: #e9d5ff; border-color: #a78bfa; }
  .bkPill.other { background: #2a3340; color: #cbd5e1; border-color: #64748b; }
  .bkRow { margin-top: 3px; }
  .bkPill small { font-weight: 600; opacity: .85; }
  .credit { display: block; padding: 6px 14px; font-size: 10px; color: var(--muted); border-top: 1px solid var(--border); text-decoration: none; }
  @keyframes pulse { 50% { opacity: .65; } }
  .dot { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bear); flex: none; }
  .dot.ok::before { background: var(--bull); }
  .spacer { flex: 1; }
  .stat { display: flex; flex-direction: column; align-items: flex-end; }
  .stat small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
  .stat b { font-size: 14px; }
  .stat[hidden] { display: none; }
  #hdrPnl { position: relative; display: flex; align-items: center; gap: 14px; border-radius: 8px; outline-offset: 4px; }
  #hdrMore { display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 130; flex-direction: column; align-items: stretch; gap: 10px; min-width: 200px; padding: 10px 12px; background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .45); }
  #hdrMore .stat { align-items: flex-start; }
  #hdrPnl > .stat .statAcct, #hdrPnl > .stat #dayAcct { display: none; }
  #hdrScope { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
  #hdrScope:empty { display: none; }
  #hdrMore .stat .statAcct, #hdrMore .stat #realAcct, #hdrMore .stat #reall { max-width: 260px; }
  #hdrPnl:hover #hdrMore, #hdrPnl:focus-within #hdrMore { display: flex; }
  #hdrClock { font-size: 12px; color: var(--muted); white-space: nowrap; }
  #hdrClock:empty { display: none; }
  .stat #dayl, .stat #dayAcct, .stat #reall, .stat #realAcct { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .stat #dayl { text-transform: none; letter-spacing: 0; }
  .stat #dayAcct, .stat #realAcct { font-size: 10px; text-transform: none; letter-spacing: 0; }
  .stat #dayAcct:empty { display: none; }
  .stat .statAcct { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; text-transform: none; letter-spacing: 0; }
  .stat .statAcct:empty { display: none; }
  @media (max-width: 800px) { .stat .statAcct { max-width: 90px; } }
  @media (min-width: 1241px) and (max-width: 1400px) { .stat #dayl, .stat #dayAcct { max-width: 140px; } }
  @media (max-width: 800px) { #hdrPnl { display: contents; } #realStat, #hdrMore, #hdrClock { display: none; } .stat #dayl, .stat #dayAcct { max-width: 100px; } .stat #dayl { white-space: normal; text-align: right; } .stat #dayl .dlC { display: none; } }
  .pos { color: var(--bull); } .neg { color: var(--bear); }
  #netBar { position: fixed; top: 0; left: 0; right: 0; z-index: 10000; padding: 6px 12px; text-align: center; font-size: 13px; font-weight: 700; color: #fff; background: var(--bear); }
  #netBar[hidden] { display: none; }
  button { font: inherit; cursor: pointer; border-radius: 6px; border: 1px solid var(--border); background: var(--panel2); color: var(--text); padding: 7px 14px; font-weight: 700; }
  button:disabled { opacity: .5; cursor: default; }
  .algoBtn { font-weight: 800; letter-spacing: .3px; }
  .algoBtn.off { background: rgba(0,208,132,.12); border-color: var(--bull); color: var(--bull); }
  .algoBtn.on { background: var(--panel2); border-color: var(--bear); color: var(--bearText); }
  #algoState { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .5px; padding: 4px 9px; border-radius: 6px; background: var(--panel2); color: var(--muted); }
  #algoState.on { background: rgba(0,208,132,.15); color: var(--bull); }
  #algoState.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bull); animation: pulse 1.2s infinite; }
  #flatBtn { background: var(--bearSolid); border-color: var(--bearSolid); color: #fff; }
  main { flex: 1; display: flex; min-height: 0; }
  :is(#charts, #price, #zpane, #zsplit, #stdPanes, .stdPane, .stdBody, .stdSplit, .stdLegend, .lgHead, .lgChev, .lgBtn, .tc, .tc-lb, .tc-ov, #ctrBtn, #goLatest, #chartFoot, #tfBar, #paneBar, #btPrice, #btEquity, #btDD, #mpCurve, #optPayoff, .optPaySvg, #prChart, .prHeroChart, .prChartFt, .gsChart) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
  :is(#charts, #price, #zpane, #zsplit, #stdPanes, .stdPane, .stdBody, .stdSplit, .stdLegend, .lgHead, .lgChev, .lgBtn, .tc, .tc-lb, .tc-ov, #ctrBtn, #goLatest, #chartFoot, #tfBar, #paneBar, #btPrice, #btEquity, #btDD, #mpCurve, #optPayoff, .optPaySvg, #prChart, .prHeroChart, .prChartFt, .gsChart) :is(input, textarea, [contenteditable]) { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
  :is(.lgChev, .lgBtn, #ctrBtn, #goLatest, #chartFoot, #tfBar, #paneBar, .prChartFt) { touch-action: manipulation; }
  #charts { flex: 1; display: flex; flex-direction: column; min-width: 0; }
  #price { flex: 7; min-height: 0; }
  #tfBar { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--border); background: var(--panel); }
  #tfBar button { border: 0; background: none; color: var(--muted); padding: 4px 9px; font-size: 12px; border-radius: 6px; }
  #tfBar button.on { background: rgba(255,107,0,.15); color: var(--orangeText); }
  #tfBar .sep { width: 1px; height: 16px; background: var(--border); margin: 0 6px; }
  .symSel { background: var(--panel2); border: 1px solid var(--border); color: var(--text); font: inherit; font-weight: 700; font-size: 15px; border-radius: 8px; padding: 4px 8px; max-width: 260px; }
  details.explainBox { margin-top: 10px; color: var(--muted); font-size: 12px; }
  details.explainBox summary { cursor: pointer; font-size: 11px; color: var(--muted); padding: 4px 0; }
  details.explainBox .explain { margin-top: 6px; }
  .exitHint { font-size: 11px; color: var(--muted); padding: 4px 0 2px; }
  .optPlanLine { margin: 6px 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--border2); color: var(--text); font-size: 12px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
  .optPlanLine:empty { display: none; }
  .optExits .oxMore, .optExits .oxHow { margin-top: 6px; }
  .optExits .oxMore > summary, .optExits .oxHow > summary { cursor: pointer; color: var(--muted); font-size: 12px; min-height: 32px; display: inline-flex; align-items: center; }
  .optExits .oxHow ul { margin: 4px 0 0; padding-left: 18px; }
  .optExits .oxHow li { margin: 2px 0; }
  .optExits [data-diag-off] { display: none !important; }
  .oaRow .oaTxt small.oaPlan { color: var(--text2); }
  .oaRow .oaTxt small.oaSkip, #stSkip { color: var(--warnText); }
  @media (max-width: 800px) { .optExits .oxMore > summary, .optExits .oxHow > summary { min-height: 44px; } }
  .exitHint b { color: var(--text); font-weight: 600; }
  .toggle { width: 38px; height: 20px; accent-color: var(--orange); }
  .exBlock .exPair { display: flex; align-items: center; gap: 8px; }
  .exBlock .exPair input[type=number], .exBlock .exPair select { width: 110px; }
  .exBlock .exPair select.exU { width: auto; min-width: 4.5em; }
  .exBlock .exLine { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
  .exBlock .exNote { margin: 2px 0; font-size: 12px; color: var(--accent, var(--text)); }
  .pfAdv > summary { cursor: pointer; font-size: 12px; color: var(--muted); padding: 8px 0 4px; }
  #pform.exNew:not(.exOwn) [data-legacy-exit], #pform.exNew [data-legacy-exit][data-ex-global], #oaAdd:not(.exOwn) [data-legacy-exit], #oaAdd [data-legacy-exit][data-ex-global] { display: none !important; }
  :is(#pform.exNew, #oaAdd) .optExits :is([data-ox=stop], [data-ox=stopv], .oxMore, .oxHow) { display: none !important; }
  :is(#pform.exNew:not(.exPmbTp), #oaAdd:not(.exPmbTp)) .optExits :is([data-ox=tp], [data-ox=tpv]) { display: none !important; }
  #pform :is(.exitHint:not(.neg), p.help, .rgNote, .oxHow), #stDetailBody .explainBox { display: none !important; }
  #zpane { flex: 3.8; min-height: 0; position: relative; }
  #price { flex: 6.2; }
  #chartRow { flex: 1; display: flex; min-height: 0; }
  #chartCol { flex: 1; display: flex; flex-direction: column; min-width: 0; }
  #chartFoot { height: 24px; flex: none; display: flex; align-items: center; padding: 0 12px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--border); background: var(--panel); }
  .tbBtn { border: 0; background: none; color: var(--muted); padding: 4px 9px; font-size: 12px; border-radius: 6px; font-weight: 600; }
  .tbBtn:hover { color: var(--text); background: var(--panel2); }
  #indMenu { position: fixed; z-index: 60; max-height: calc(100vh - 12px); overflow-y: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; min-width: 240px; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
  #indMenu h5 { margin: 4px 0 2px; font-size: 10px; letter-spacing: .8px; text-transform: uppercase; color: var(--orangeText); }
  #chartCtx { position: fixed; z-index: 80; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 4px; min-width: 210px; box-shadow: 0 8px 30px rgba(0,0,0,.5); font-size: 12px; }
  #chartCtx[hidden] { display: none; }
  #atmMenu { position: fixed; z-index: 120; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 4px; width: 280px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto; box-shadow: 0 8px 30px rgba(0,0,0,.5); font-size: 12px; }
  #atmMenu[hidden] { display: none; }
  #atmMenu .atmmHead { padding: 6px 10px; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--border); margin-bottom: 2px; }
  #atmMenu > button { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 30px; border: 0; background: none; color: var(--text); padding: 6px 10px; border-radius: 6px; text-align: left; font-size: 12px; cursor: pointer; }
  #atmMenu > button:hover:not([disabled]), #atmMenu > button:focus-visible { background: var(--panel2); }
  #atmMenu > button[disabled] { opacity: .45; cursor: default; }
  #atmMenu > button.atmmSub { padding-left: 22px; color: var(--muted); }
  #atmMenu kbd { color: var(--muted); font-family: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
  #atmmEd { border-top: 1px solid var(--border); margin-top: 4px; padding: 8px 6px 4px; }
  #atmmEd .atmmRow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
  #atmmEd label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); min-width: 0; }
  #atmmEd input, #atmmEd select { width: 100%; min-height: 30px; box-sizing: border-box; }
  #atmmEd .atmmBtns { display: flex; gap: 6px; flex-wrap: wrap; }
  #atmmMsg { padding: 6px 10px; margin: 0; }
  .tkAtmMenu, .ctChip button.ctAtm { color: var(--accent, var(--text)); }
  @media (max-width: 800px) { #atmMenu > button, #atmmEd input, #atmmEd select, #atmmEd .sbtn, .tkAtmMenu { min-height: 40px; } }
  #chartCtx button { display: flex; justify-content: space-between; gap: 18px; width: 100%; border: 0; background: none; color: var(--text); padding: 7px 10px; border-radius: 6px; text-align: left; font-size: 12px; }
  #chartCtx button:hover { background: var(--panel2); }
  #chartCtx kbd { color: var(--muted); font-family: inherit; }
  #zsplit { height: 5px; flex: none; cursor: ns-resize; background: var(--border); }
  #zsplit:hover, #zsplit.drag { background: var(--orange); }
  .zNeed { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: calc(100% - 80px); padding: 3px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--muted); font-size: 11px; text-align: center; pointer-events: none; }
  .zNeed[hidden] { display: none; }
  .fpGearTxt { font-size: 12px; margin-left: 5px; }
  #paneBar.fpShort .fpGearTxt, body.embed.phone .fpGearTxt { display: none; }
  .paneLabel { position: absolute; pointer-events: auto; left: 8px; top: 4px; z-index: 3; color: var(--muted); font-size: 11px; }
  #algoLine { padding: 6px 14px; font-size: 12px; border-bottom: 1px solid var(--border); background: var(--panel); color: var(--muted); }
  #instBar[hidden] { display: none !important; }
  .asideTop { padding: 8px 12px 6px; border-bottom: 1px solid var(--border); }
  #hdrLayout { display: inline-flex; align-items: center; gap: 6px; }
  #restoreStrip { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 10px; background: var(--panel); border-top: 1px solid var(--border); }
  #restoreStrip[hidden] { display: none; }
  #acctList .mRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
  #acctList .mRow select { max-width: 160px; }
  #acctList .themeSeg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
  #acctList .themeSeg button { display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 32px; padding: 4px 10px; border: 0; border-radius: 0; background: none; color: var(--muted); font-weight: 600; text-align: center; }
  #acctList .themeSeg button + button { border-left: 1px solid var(--border); }
  #acctList .themeSeg button[aria-checked=true] { background: var(--orange); color: var(--onOrange); }
  #footStatus { display: inline-flex; align-items: center; gap: 6px; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #footStatus::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bull); flex: none; }
  #footStatus.bad { color: var(--bearText); }
  #footStatus.bad::before { background: var(--bear); }
  #footStatus.wait { color: var(--warnText); }
  #footStatus.wait::before { background: var(--warnText); }
  body.solo #paneMin, body.solo #paneMax { display: none; }
  #paneClose { display: none; }
  body.embed:not(.solo) #paneClose { display: inline-flex; align-items: center; justify-content: center; order: 7; flex: none; width: 24px; height: 22px; margin-left: 2px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s, color .12s, background .12s; }
  body.embed:hover #paneClose, body.embed #paneClose:focus-visible { opacity: 1; }
  body.embed #paneClose:hover, body.embed #paneClose:focus-visible { color: var(--text); background: var(--panel2); border-color: var(--border); }
  body.embed #paneClose:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
  @media (hover: none) { body.embed:not(.solo) #paneClose { opacity: .55; width: 44px; height: 44px; min-height: 44px; font-size: 22px; } }
  body.embed.phone:not(.solo) #paneClose { width: 44px; height: 44px; min-height: 44px; font-size: 22px; }
  #toasts .toast.paneUndo { display: flex; align-items: center; gap: 10px; border-left-color: var(--orange); }
  #toasts .toast.paneUndo button { pointer-events: auto; margin-left: auto; min-height: 32px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel2); color: var(--orangeText); font: inherit; font-weight: 700; cursor: pointer; }
  #toasts .toast.paneUndo button:hover, #toasts .toast.paneUndo button:focus-visible { border-color: var(--orange); }
  #toasts .toast.paneUndo button:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
  @media (max-width: 800px), (hover: none) { #toasts .toast.paneUndo button { min-height: 44px; min-width: 64px; } }
  #algoLine b { color: var(--text); }
  #algoLine .algoGo { margin: 0 2px; padding: 2px 8px; font-size: 11px; font-weight: 800; }
  @media (pointer: coarse) { #algoLine .algoGo, #trShowAll, #cn-risk button, #cRiskGo, #lvFlatAll, #tkConnect, #deskBox .sbtn, .optViewPos { min-height: 44px; } }
  /* Lane 3 production review: phone touch targets of 44 px on Strategies (algo cards and the settings panel), Options (chain + legs,
     expiry chips), Risk limits and the prediction market cards. */
  @media (pointer: coarse) {
    #strategies #paCard summary, #strategies #oaCard summary, #strategies .cardRules summary { min-height: 44px; display: flex; align-items: center; }
    #strategies #paCard details > summary::before, #strategies #oaCard details > summary::before, #strategies .cardRules > summary::before { content: '▸'; display: inline-block; width: 1em; margin-right: 4px; color: var(--muted); }
    #strategies #paCard details[open] > summary::before, #strategies #oaCard details[open] > summary::before, #strategies .cardRules[open] > summary::before { content: '▾'; }
    #strategies #paCard select, #strategies #paCard input:not([type=checkbox]):not([type=radio]), #strategies #oaCard select, #strategies #oaCard input:not([type=checkbox]):not([type=radio]),
    #strategies #oaCard button, #strategies #paCard button, #stDetail #pform select, #stDetail #pform input:not([type=checkbox]):not([type=radio]) { min-height: 44px; }
    #optTable .optAdd { min-width: 44px; min-height: 44px; }
    #options #optChips button, #options #optBuild button { min-height: 44px; }
    #riskSection button, #riskSection input.in { min-height: 44px; }
    #riskSection label.check { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
    #riskSection label.check input { width: 22px; height: 22px; }
    #predictions .prShare { min-height: 44px; padding: 8px 16px; }
  }
  /* Phone touch targets (44 px) on the first-run and account surfaces: Get started, the tour, notifications, Learn, the account
     dialogs, Connections and the sign-in links. Coarse pointers only, so the desktop layout does not change. */
  @media (pointer: coarse) {
    #gsCard button, .driver-popover.tourPop button, #ntfPanel button, #ntfSet label, #learnClose, #learnAll,
    #voiceDlg button, #voiceDlg select, #voiceDlg .row, #confDlg button, #confDlg select, #aboutDlg button, #accountDlg button, #accountDlg input,
    #agentDlg button, #agentDlg input:not([type=checkbox]), #cnBack, #cBack, #wzBack, #affClose, #cnAll, #cnGuide, #connections .cnCard button,
    #riskSum, #auth #haveAcctBtn, #auth #newHereBtn, #mPlan, #layoutSel, .driver-popover.tourPop .tourExtra button, #cnAi button, #agentDlg #agName { min-height: 44px; }
    #gsCard button, .driver-popover.tourPop button, #ntfPanel button, #learnClose, #learnAll { display: inline-flex; align-items: center; justify-content: center; }
    #gsDismiss, #obSkip, #learnClose, .driver-popover.tourPop .driver-popover-close-btn { min-width: 44px; }
    /* The tour's text buttons are reset with `all: unset`; body raises these above that rule. */
    body .driver-popover.tourPop .tourExtra button { display: inline-flex; align-items: center; min-height: 44px; }
    #gsCard .ctxHelp { min-width: 44px; }
    #cn-risk .check { min-height: 44px; }
    #ntfSet label, #voiceDlg .row { display: flex; align-items: center; gap: 8px; }
    #affTerms { display: inline-flex; align-items: center; min-height: 44px; }
  }
  #algoLine.run { background: rgba(0,208,132,.06); }
  #algoLine.trade { background: rgba(255,107,0,.08); color: var(--text); }
  #algoLine.trade.long { background: rgba(0,208,132,.12); border-left: 3px solid var(--bull); }
  #algoLine.trade.short { background: rgba(239,83,80,.12); border-left: 3px solid var(--bear); }
  #zLine { padding: 3px 14px; font-size: 11px; border-bottom: 1px solid var(--border); background: var(--panel); color: var(--muted); }
  #zLine b { color: var(--text); }
  #algoLine.warn { background: #241a12; color: #f0b27a; }
  .mc3Legend { position: absolute; left: 6px; bottom: 22px; z-index: 3; pointer-events: none; max-width: calc(100% - 84px); font-size: 10px; line-height: 1.3; color: var(--muted); background: color-mix(in srgb, var(--bg, #0b0e14) 70%, transparent); border-radius: 4px; padding: 2px 6px; }
  .mc3Legend[hidden] { display: none; }
  .mc3Legend .mc3L1, .mc3Legend .mc3L2 { display: block; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mc3Legend b { color: var(--text, #e6e6e6); font-weight: 600; } .mc3Legend .k { margin-left: 8px; } .mc3Legend .k b { font-weight: 400; } .mc3Legend .dim { color: #6b7380; }
  .mc3Legend .band { display: inline-block; width: 12px; height: 5px; margin-right: 3px; vertical-align: middle; border-radius: 2px; background: linear-gradient(90deg, rgba(38,166,154,.75) 50%, rgba(239,83,80,.75) 50%); }
  @media (max-width: 520px) { .mc3Legend .mc3L2 { display: none; } .mc3Legend { max-width: calc(100% - 64px); } }
  .mc3Ind [hidden] { display: none !important; }
  .mc3Ind .row select.mc3Src { max-width: 240px; }
  .mc3Ind .mc3Ro input:disabled, .mc3Ind .mc3Ro select:disabled { opacity: 1; color: var(--text, #e6e6e6); background: transparent; border-color: transparent; }
  .mc3Ind .mc3Sum { margin: 4px 0; font-size: 12px; color: var(--muted); } .mc3Ind .mc3Sum b { color: var(--text, #e6e6e6); font-weight: 600; }
  .mc3State.up { color: #26a69a; } .mc3State.dn { color: #ef5350; }
  .mc3Ind .row { display: flex; justify-content: space-between; gap: 6px; margin: 3px 0; } .mc3Ind .row input, .mc3Ind .row select { max-width: 140px; }
  .qbWarn { margin: 6px 0; padding: 7px 10px; font-size: 12px; background: #2b1d0c; color: #ffcf8a; border: 1px solid #b9722a; border-left: 4px solid #f59e0b; border-radius: 4px; }
  .qbWarn[hidden] { display: none; }
  .qbWarn label { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; color: var(--text); cursor: pointer; }
  aside { width: 360px; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
  .tabs { display: flex; border-bottom: 1px solid var(--border); }
  .tabs button { flex: 1; border: 0; border-radius: 0; background: transparent; color: var(--muted); padding: 10px 0; border-bottom: 2px solid transparent; }
  .tabs button.active { color: var(--text); border-bottom-color: var(--orange); }
  .optHead { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
  .optHead b { font-size: 14px; } .optHead span { color: var(--muted); flex: 1; }
  .optSideBar { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
  .optSideBar button { padding: 7px 0; font-weight: 800; border-radius: 8px; border: 1px solid var(--border); background: var(--panel2); color: var(--muted); }
  .optSideBar button.on[data-side=buy] { background: var(--bull); border-color: var(--bull); color: var(--onBull); }
  .optSideBar button.on[data-side=sell] { background: var(--bear); border-color: var(--bear); color: #fff; }
  .optSideBar button.on[data-premium] { background: var(--bull); border-color: var(--bull); color: var(--onBull); }
  .optSideBar button.on[data-mode] { background: var(--orange); border-color: var(--orange); color: var(--onOrange); }
  #optAutoGo { width: 100%; padding: 9px 0; font-weight: 800; border-radius: 8px; border: 1px solid var(--bull); background: var(--bull); color: var(--onBull); }
  #optAutoGo:disabled { opacity: .45; }
  .oaRow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
  .oaRow .oaTxt { flex: 1 1 220px; min-width: 0; }
  .oaRow .oaTxt small { display: block; color: var(--muted); }
  .oaRow .oaTxt small.roiTag { display: inline; } .oaRow .oaTxt .oaRoi b { font-size: 12px; }
  .oaRow .oaTxt em { font-style: normal; color: var(--muted); margin-left: 6px; font-size: 11px; }
  .optRow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 0; color: var(--muted); }
  .optExit { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; margin: 8px 0; }
  .optExit input[type=checkbox] { width: auto; }
  #optExitSet[hidden], .optXIn[hidden], .optXPrev[hidden] { display: none; }
  .optExitHead { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .optExitHead b { font-size: 13px; color: var(--text); }
  #optExitSum { color: var(--muted); font-size: 12px; }
  .optExitHow { margin: 2px 0 4px; }
  .optX { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 6px 0; border-top: 1px solid var(--border); }
  .optX:first-of-type { border-top: 0; }
  .optXOn { display: flex; align-items: center; gap: 6px; color: var(--text); font-weight: 700; cursor: pointer; }
  .optXIn { display: flex; gap: 4px; justify-content: flex-end; min-width: 0; }
  .optXIn input { width: 76px; min-width: 0; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 4px 6px; font: inherit; text-align: right; }
  .optXIn select { max-width: 150px; min-width: 0; }
  .optXPrev { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
  .optXPrev b { color: var(--text); }
  .optXPrev .neg { color: var(--bear); }
  .optXPrev .pos { color: var(--bull); }
  .optX.off .optXIn { opacity: .45; }
  .optX[hidden] { display: none; }
  .optXClose { border-top: 1px solid var(--border); padding-top: 6px; }
  .optXClose > span:first-child { display: flex; align-items: center; gap: 6px; }
  #optLad > summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 700; padding: 4px 0; }
  .optStruct { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 6px 0 2px; }
  .optStruct .optStructLbl { flex-basis: 100%; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
  .optStruct button { padding: 5px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel2); color: var(--text); font-size: 12px; }
  .optStruct button.on { background: var(--orange); border-color: var(--orange); color: var(--onOrange); font-weight: 800; }
  .optStruct button:disabled, .optSideBar button:disabled { opacity: .5; cursor: not-allowed; }
  .optStruct button small { font-size: 10px; color: var(--muted); }
  .optStructNote { margin: 2px 0 6px; }
  .optDiag { margin: 4px 0 8px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); }
  .optDiagGrid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 8px; align-items: end; margin-top: 6px; }
  .optDiagGrid label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); min-width: 0; }
  .optDiagGrid select { width: 100%; min-width: 0; min-height: 32px; }
  .optDiagH { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; align-self: center; }
  .optAssign { margin-top: 6px; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--orange); font-size: 12px; }
  .optDiagHow { margin: 2px 0 4px; font-size: 11px; }
  .oaDiag { margin: 4px 0 8px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
  .optRow select[name=direction] { width: 190px; }
  .optQtyIn { position: relative; display: inline-flex; align-items: center; }
  .optRow .optQtyIn input { padding-right: 70px; }
  .optQtyUnit { position: absolute; right: 8px; color: var(--muted); font-size: 12px; font-weight: 700; pointer-events: none; }
  .optQtyNote { margin: -2px 0 4px; color: var(--muted); font-size: 11px; text-align: right; }
  .optRow input, .optRow select { width: 130px; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 4px 6px; font: inherit; text-align: right; }
  #optTicket .optWide { width: 100%; margin: 3px 0; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 8px; font: inherit; }
  .optPxRow { display: flex; gap: 6px; align-items: center; margin: 3px 0; }
  .optPxRow input { flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 8px; font: inherit; }
  .optQuick { display: flex; gap: 4px; }
  .optQuick button { padding: 6px 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel2); color: var(--text); font-size: 12px; font-weight: 700; }
  .optQuick button:disabled { opacity: .4; cursor: not-allowed; }
  .optQuick button.on { border-color: var(--orange); color: var(--orangeText); }
  .optPxNote { margin-top: 4px; font-size: 12px; color: var(--muted); }
  .optPxNote.stale { color: var(--warn, #e0a030); font-weight: 600; }
  .optPxNote button { margin-left: 6px; }
  .optExit summary { cursor: pointer; font-weight: 700; color: var(--muted); }
  .optCloseAt { display: flex; gap: 6px; }
  .optCloseAt input, .optCloseAt select { width: auto; min-width: 0; }
  .optLad { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }
  .optHoldHelp { margin: 0 0 6px; }
  .optLad[hidden], .optLadTpl[hidden], #optAtmOnRow[hidden] { display: none; }
  .optLadHead { display: flex; justify-content: space-between; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; }
  .optLadRow { display: flex; align-items: center; gap: 4px; margin: 4px 0; flex-wrap: wrap; }
  .optLadRow input, .optTrailRow input { width: 64px; min-width: 0; }
  .optLadRow input { background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 4px 6px; font: inherit; text-align: right; }
  .optLadTpl { display: flex; gap: 6px; margin-top: 6px; }
  .optLadTpl select { flex: 1; min-width: 0; }
  .posAtm b { color: var(--text); }
  #optReview { margin: 8px 0 4px; font-weight: 700; }
  .optWarn { display: block; width: 100%; text-align: left; padding: 5px 8px; margin: 4px 0; border-radius: 8px; border: 1px solid var(--orange); background: rgba(255,107,0,.1); color: var(--text); font-size: 12px; line-height: 1.3; }
  .optWarn[hidden], #optWarnMore[hidden] { display: none; }
  #optSend { width: 100%; padding: 9px 0; font-weight: 800; border-radius: 8px; border: 0; color: var(--onBull); background: var(--bull); margin-top: 6px; }
  #optSend.sell { background: var(--bear); }
  #optSend:disabled { opacity: .5; }
  #optResult.err { color: var(--bear); }
  #optTable a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); }
  #optTable a:hover { color: var(--orangeText); }
  .tab { display: none; overflow: auto; padding: 10px 14px 0; flex: 1; }
  .tab.active { display: block; }
  h4 { margin: 9px 0 3px; font-size: 10px; letter-spacing: .8px; text-transform: uppercase; color: var(--orangeText); }
  h4:first-child { margin-top: 0; }
  .row { display: flex; justify-content: space-between; align-items: center; padding: 2px 0; border-bottom: 1px solid rgba(42,48,58,.5); gap: 10px; }
  .row label { color: var(--muted); font-size: 12px; }
  .row label small { opacity: .65; }
  .row input, .row select { width: 110px; text-align: right; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 4px; padding: 3px 6px; font: inherit; font-size: 12px; text-overflow: ellipsis; }
  .row input:focus, .row select:focus { outline: none; border-color: var(--orange); }
  /* Save stays visible at the bottom of the panel (never needs scrolling) */
  .saveBar { position: sticky; bottom: 0; background: var(--panel); padding: 8px 0 10px; margin-top: 8px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1.3fr .9fr; gap: 8px; }
  .saveBar button { white-space: nowrap; padding: 9px 8px; font-size: 12px; }
  #saveBtn { background: var(--panel2); border-color: var(--border); color: var(--muted); }
  #saveBtn.dirty { background: var(--orange); border-color: var(--orange); color: var(--onOrange); }
  #saveMsg { grid-column: 1 / -1; }
  #saveMsg { margin-top: 4px; font-size: 12px; min-height: 0; }
  #saveMsg:empty { display: none; }
  .stCard .cardLead { margin: 2px 0 10px; font-size: 13px; color: var(--text); }
  .stCard .cardKeys { color: var(--muted); white-space: nowrap; }
  .stCard .cardKeys:not(:empty)::before { content: '· '; }
  .stCard details.cardRules { margin-top: 8px; }
  .stCard details.cardRules > summary { cursor: pointer; color: var(--muted); font-size: 12px; min-height: 32px; display: inline-flex; align-items: center; }
  .stCard details.cardRules > p.help { margin-top: 4px; }
  @media (max-width: 800px) { .stCard details.cardRules > summary { min-height: 44px; min-width: 44px; } }
  #pform .fieldErr { margin: -2px 0 8px; font-size: 12px; line-height: 1.35; color: var(--bear); }
  #pform [aria-invalid=true] { border-color: var(--bear) !important; box-shadow: 0 0 0 1px var(--bear); }
  .explain { margin-top: 12px; padding: 10px; background: var(--panel2); border-radius: 6px; color: var(--muted); font-size: 12px; }
  table { width: 100%; border-collapse: collapse; font-size: 12px; }
  th { text-align: left; color: var(--muted); font-weight: 500; font-size: 10px; text-transform: uppercase; padding: 4px 2px; }
  td { padding: 4px 2px; border-top: 1px solid rgba(42,48,58,.5); }
  #log { font-family: ui-monospace, Menlo, monospace; font-size: 11px; white-space: pre-wrap; word-break: break-word; color: #c3c9d4; }
  #log div { padding: 2px 0; border-bottom: 1px solid rgba(42,48,58,.35); }
  #log .warn { color: #f0b27a; }
  .screen[hidden], #terminal[hidden] { display: none !important; }
  #terminal { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
  .logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; letter-spacing: -.2px; white-space: nowrap; }
  .logo .mark { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
  .logo em { font-style: normal; color: var(--orangeText); }
  .logo .lite { font-size: 10px; font-weight: 800; color: var(--orangeText); border: 1px solid rgba(255,107,0,.4); border-radius: 4px; padding: 1px 5px; letter-spacing: .8px; }
  /* Sign in and create account (matches the Total landing) */
  #auth { min-height: 100vh; display: flex; background: radial-gradient(60% 50% at 50% 0%, rgba(40,58,110,.32), rgba(5,6,10,0) 70%), radial-gradient(50% 40% at 0% 100%, rgba(255,107,0,.16), rgba(5,6,10,0) 70%), #05060A; color: #F5F5F7; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Instrument Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
  #auth .brandPanel { flex: 1 1 52%; padding: 56px 56px 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
  #auth .logo { gap: 10px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
  #auth .logo .mark { flex: none; width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 18px rgba(255,107,0,.35); }
  /* Public screens only: the logo and "Back to home" both go to the public home page (www). */
  #auth .authTop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
  #auth .backHome { white-space: nowrap; }
  #auth a.logo { color: inherit; text-decoration: none; min-height: 44px; border-radius: 10px; }
  #auth .backHome { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 999px; color: #E5E5EA; font-size: 14px; font-weight: 600; text-decoration: none; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); transition: background-color 200ms ease; }
  #auth .backHome:hover { background: rgba(255,255,255,.12); color: #fff; }
  #auth .backHome svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  #auth .eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #FF9A57; font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; margin: 0 0 18px; }
  #auth .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #FF6B00; box-shadow: 0 0 10px #FF6B00; }
  #auth .brandPanel h2 { font-size: clamp(34px, 4.2vw, 58px); font-weight: 700; line-height: 1.04; letter-spacing: -.03em; margin: 0 0 20px; color: #fff; }
  #auth .brandPanel h2 span { background: linear-gradient(180deg, #F5F5F7, #8E8E96); -webkit-background-clip: text; background-clip: text; color: transparent; }
  #auth .brandPanel p { color: #A1A1A6; font-size: 17px; line-height: 1.45; max-width: 460px; margin: 0 0 32px; }
  #auth .feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; max-width: 640px; }
  #auth .feat { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: start; align-content: start; margin: 0; color: #A1A1A6; font-size: 13.5px; line-height: 1.4; }
  #auth .feat b { color: #F5F5F7; font-size: 14.5px; font-weight: 600; margin-bottom: 2px; }
  #auth .feat i { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); display: grid; place-items: center; flex: none; }
  #auth .feat svg { width: 18px; height: 18px; stroke: #FF9A57; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  #auth .copy { font-size: 12px; color: #8E8E93; max-width: 640px; line-height: 1.5; }
  #auth .authCol { flex: 1 1 48%; display: flex; align-items: flex-start; justify-content: center; padding: 48px 32px; }
  #auth .authBox { margin-block: auto; width: 100%; max-width: 440px; padding: 32px; border-radius: 28px; background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.03)); -webkit-backdrop-filter: blur(40px) saturate(160%); backdrop-filter: blur(40px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 0 0 1px rgba(255,255,255,.07), 0 30px 80px -40px rgba(0,0,0,.8); }
  #auth .seg { display: flex; border-radius: 999px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); padding: 4px; margin-bottom: 28px; }
  #auth .seg[hidden] { display: none; }
  #auth .seg button { flex: 1; min-height: 44px; border: 0; background: transparent; color: #C7C7CC; padding: 0; border-radius: 999px; font-size: 15px; font-weight: 600; transition: background-color 200ms ease, color 200ms ease; }
  #auth .seg button.active { background: rgba(255,255,255,.92); color: #05060A; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
  #auth .authBox h1 { font-size: 30px; font-weight: 700; letter-spacing: -.028em; margin: 0 0 6px; }
  #auth .sub { color: #A1A1A6; font-size: 15px; margin: 0 0 22px; }
  #auth .field input { min-height: 52px; padding: 0 16px; border-radius: 16px; border: 0; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); font-size: 16px; color: #F5F5F7; }
  #auth .field input::placeholder { color: #8E8E93; }
  #auth .field input:focus { box-shadow: inset 0 0 0 1px rgba(255,154,87,.7), 0 0 0 3px rgba(255,107,0,.18); }
  #auth .field .eye { right: 4px; min-width: 44px; min-height: 44px; color: #A1A1A6; font-size: 13px; font-weight: 600; }
  #auth .field > label { display: block; margin: 0 0 6px 4px; font-size: 13px; font-weight: 600; color: #C7C7CC; }
  #auth .field .fBox { position: relative; }
  #auth .field .fHelp { margin: 6px 4px 0; font-size: 12px; color: #A1A1A6; }
  #auth #codeResendLink[aria-disabled="true"], #auth #resetResendLink[aria-disabled="true"] { color: #8E8E93; text-decoration: none; pointer-events: none; }
  #auth .authHelp a[role="button"] { display: inline-block; min-height: 44px; line-height: 44px; }
  #auth .authHelp a[role="button"][hidden], #auth .authHelp span[hidden] { display: none; }
  #auth #resetForm h1, #auth #setupForm h1 { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
  #auth #setupResendLink[aria-disabled="true"] { color: #8E8E93; text-decoration: none; pointer-events: none; }
  #auth .errBox { border-radius: 14px; background: rgba(255,90,78,.14); border: 0; color: #FFB4AD; font-size: 15px; }
  #auth .errBox.note { background: rgba(0,208,132,.10); color: #9BE8C8; }
  #auth .primary { min-height: 52px; padding: 0 26px; margin-top: 6px; border-radius: 999px; background: #FF6B00; color: #14090A; font-size: 17px; font-weight: 600; letter-spacing: -.005em; box-shadow: inset 0 0 0 1px rgba(255,170,110,.5), 0 10px 40px -10px rgba(255,107,0,.7); transition: background-color 200ms ease, transform 100ms ease-out; }
  #auth .primary:hover { background: #FF8A3D; }
  #auth .primary:active { transform: scale(.98); background: #F06400; }
  #auth .spin { border-color: #14090A; border-top-color: transparent; }
  #auth :focus-visible { outline: 2px solid #FF9A57; outline-offset: 3px; }
  #auth .authHelp { text-align: center; font-size: 14px; color: #A1A1A6; margin: 16px 0 0; }
  #auth .authHelp a { color: #FF9A57; text-decoration: underline; text-underline-offset: 3px; }
  #auth .authHelp[hidden] { display: none; }
  #auth .haveAcct { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 18px; padding: 12px 16px; border-radius: 14px; background: rgba(255,154,87,.1); box-shadow: inset 0 0 0 1px rgba(255,154,87,.35); font-size: 15px; color: #E5E5EA; }
  #auth .haveAcct[hidden] { display: none; }
  #auth .haveAcct button { min-height: 36px; border: 0; border-radius: 999px; background: #FF9A57; color: #05060A; padding: 0 16px; font-size: 14px; font-weight: 700; cursor: pointer; }
  /* The sign-in screen is always dark: its success note keeps the dark-theme green in the light theme too. */
  #auth .okBox { color: #00d084; }
  #auth .fine { text-align: center; font-size: 13px; line-height: 1.5; color: #8E8E93; margin: 22px 0 0; }
  @media (max-width: 1000px) {
    #auth { flex-direction: column; }
    #auth .brandPanel { flex: none; padding: 28px 24px 4px; gap: 0; }
    #auth .brandPanel .pitch > p, #auth .brandPanel .feats, #auth .brandPanel .copy { display: none; }
    #auth .eyebrow { margin: 22px 0 10px; font-size: 14px; }
    #auth .brandPanel h2 { font-size: 34px; margin: 0; }
    #auth .authCol { flex: none; padding: 24px 16px 40px; align-items: flex-start; }
    #auth .authBox { padding: 22px 20px; border-radius: 24px; }
    #auth .authBox h1 { font-size: 26px; }
  }
  @media (max-width: 560px) {
    #auth .brandPanel { padding: 16px 16px 0; }
    #auth .eyebrow { display: none; }
    #auth .brandPanel h2 { font-size: 20px; line-height: 1.25; margin: 10px 0 0; }
    #auth .brandPanel h2 br { display: none; }
    #auth .authCol { padding: 12px 12px 32px; }
    #auth .authBox { padding: 16px; }
    #auth .seg { margin-bottom: 14px; }
    #auth .authBox h1 { font-size: 22px; }
    #auth .sub { margin-bottom: 12px; }
  }
  @media (max-width: 440px) { #auth .brandPanel { padding-inline: 16px; } #auth .authTop { gap: 8px 12px; } #auth .logo { gap: 8px; font-size: 15px; } #auth .backHome { padding: 0 10px 0 4px; font-size: 13px; } }
  .sub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
  .field { position: relative; margin-bottom: 12px; }
  .field input, .field select { width: 100%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 14px; color: var(--text); outline: none; }
  .field input:focus, .field select:focus { border-color: rgba(255,107,0,.5); }
  .field .eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: rgba(255,255,255,.35); padding: 4px; font-weight: 500; font-size: 12px; }
  #updBar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; padding: 8px 14px; background: #12307a; color: #fff; font-size: 13px; border-bottom: 1px solid #2c4a8a; }
  #updBar[hidden] { display: none; }
  #updBar button { background: #fff; color: #12307a; border: 0; border-radius: 8px; padding: 4px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
  #licBar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 14px; background: #4a3300; color: #ffd58a; font-size: 13px; border-bottom: 1px solid #7a5600; }
  #licBar[hidden] { display: none; }
  #rsBar { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; padding: 6px 14px; background: #4a3300; color: #ffd58a; font-size: 13px; border-bottom: 1px solid #7a5600; max-height: 25vh; overflow: auto; }
  #rsBar[hidden], #rsPanel[hidden], #rsAll[hidden] { display: none; }
  #rsText { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #rsBar button { flex: 0 0 auto; white-space: nowrap; }
  #rsPanel { background: #2e2000; color: #ffd58a; font-size: 13px; border-bottom: 1px solid #7a5600; padding: 8px 14px; max-height: min(45vh, 360px); overflow: auto; }
  #rsPanel h4 { margin: 4px 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
  #rsPanel ul { list-style: none; margin: 0 0 10px; padding: 0; }
  #rsReasons li { padding: 2px 0; }
  #rsReasons b { display: inline-block; min-width: 2.2em; }
  #rsList li { display: flex; gap: 8px; align-items: center; padding: 4px 0; border-top: 1px solid rgba(255,213,138,.12); }
  #rsList .rsName { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #rsList .rsWhy { flex: 0 1 auto; opacity: .7; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
  #rsList .rsMode { flex: 0 0 auto; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.08); }
  #rsList .rsMode.live { background: #6a1a1a; color: #ffc4c4; }
  #rsPanel button { background: rgba(255,255,255,.1); color: inherit; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 3px 10px; font-size: 12px; cursor: pointer; flex: 0 0 auto; }
  @media (max-width: 600px) {
    #rsBar { flex-wrap: wrap; row-gap: 6px; }
    #rsText { flex-basis: 100%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    #rsList .rsWhy { max-width: 34%; font-size: 11px; }
  }
  #sdBar { padding: 8px 14px; background: #5a1414; color: #ffb4b4; font-size: 13px; border-bottom: 1px solid #8a2a2a; }
  #sdBar[hidden] { display: none; }
  #rsBar button { background: rgba(255,255,255,.1); color: inherit; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
  #licBar.soft { background: #1c2b3a; color: #9ec5ee; border-bottom-color: #2c4a66; }
  #licBar button, #licBar a { background: rgba(255,255,255,.1); color: inherit; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; text-decoration: none; }
  #trialBar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 14px; background: #1c2b3a; color: #9ec5ee; font-size: 13px; border-bottom: 1px solid #2c4a66; }
  #trialBar[hidden], #trialPill[hidden], #trialModal[hidden] { display: none; }
  #trialBar.urgent { background: #4a3300; color: #ffd58a; border-bottom-color: #7a5600; }
  #trialBar a, #trialBar button, .trialUp { background: var(--orange); color: var(--onOrange); border: 0; border-radius: 8px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none; }
  #trialPill { font-size: 11px; font-weight: 700; color: var(--pill, #9ec5ee); border: 1px solid var(--pillBorder, #2c4a66); border-radius: 12px; padding: 3px 10px; white-space: nowrap; }
  #trialModal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; pointer-events: none; }
  #trialModal .box { pointer-events: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 22px; max-width: 420px; width: 100%; }
  #trialModal h3 { margin: 0 0 8px; font-size: 18px; }
  #trialModal p { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
  .trialRow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
  #trialModal .box > .trialUp { display: inline-flex; align-items: center; margin-bottom: 12px; }
  @media (pointer: coarse) { #trialModal .trialUp, #trialModal .trialRow button { min-height: 44px; padding: 0 16px; font-size: 14px; } }
  .trialRow button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
  .pwPos { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
  .errBox { display: none; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25); color: var(--errText); font-size: 13px; margin-bottom: 12px; white-space: pre-wrap; }
  .errBox.show { display: block; }
  .okBox { padding: 12px; border-radius: 12px; background: rgba(0,208,132,.08); border: 1px solid rgba(0,208,132,.25); color: var(--bull); font-size: 13px; margin-bottom: 12px; }
  .primary { width: 100%; background: var(--orange); border: 0; color: var(--onOrange); padding: 14px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 8px 20px rgba(255,107,0,.2); display: flex; align-items: center; justify-content: center; gap: 8px; }
  .primary:hover { background: var(--orange2); }
  .primary:disabled { opacity: .5; }
  .spin { width: 16px; height: 16px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: rot 1s linear infinite; display: inline-block; }
  @keyframes rot { to { transform: rotate(360deg); } }
  /* Connect screen (mirrors the legacy app's Brokerage Connect) */
  #connectScreen, #wizardScreen, #paywallScreen { min-height: 100vh; display: flex; justify-content: center; padding: 40px 16px; }
  .card { width: 100%; max-width: 560px; }
  .card h1 { font-size: 24px; font-weight: 900; margin: 18px 0 6px; }
  .section { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin-top: 16px; }
  .section h3 { margin: 0 0 4px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
  .section .hint { color: var(--muted); font-size: 12px; margin: 0 0 14px; }
  .lbl { display: block; color: var(--muted); font-size: 13px; margin: 10px 0 6px; }
  .in { width: 100%; background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; color: var(--text); font: inherit; font-size: 13px; outline: none; }
  .in:focus { border-color: var(--orange); }
  .mono { font-family: ui-monospace, Menlo, monospace; }
  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .envSeg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .envSeg button { border: 1px solid var(--border); background: var(--panel2); color: var(--muted); padding: 12px 8px; border-radius: 10px; text-align: left; }
  .envSeg button b { display: block; color: var(--text); font-size: 13px; }
  .envSeg button small { font-size: 11px; font-weight: 500; }
  .envSeg button.active { border-color: var(--orange); background: rgba(255,107,0,.08); }
  .envSeg button[data-env=live].active { border-color: var(--bear); background: rgba(239,83,80,.1); }
  .liveWarn { margin-top: 14px; padding: 12px; border-radius: 10px; border: 1px solid rgba(239,83,80,.4); background: rgba(239,83,80,.08); color: var(--bearText); font-size: 13px; }
  .check[hidden] { display: none; }
  .check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13px; margin-top: 12px; }
  .check input { margin-top: 3px; accent-color: var(--orange); }
  .ghost { background: none; border: 1px solid var(--border); color: var(--muted); }
  .help { color: var(--muted); font-size: 12px; margin-top: 10px; }
  .help a { color: var(--orangeText); }
  .screen.overlay { position: fixed; inset: var(--hdrB, 0px) 0 0 0; z-index: 300; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); }
  #connectScreen.overlay, #wizardScreen.overlay { min-height: 0; }
  .screen .backRow { margin-top: 14px; }
  #connectScreen.overlay .backRow { position: static; }
  .screen.overlay .backRow { position: sticky; top: 0; z-index: 3; margin: 0 0 6px; padding: 10px 0; background: var(--bg); }
  .screen .backRow .ghost { width: auto; padding: 8px 14px; border-radius: 10px; font-size: 13px; }
  #gsCard { flex: none; background: var(--panel); border-bottom: 1px solid var(--border); border-left: 3px solid var(--orange); font-size: 12px; }
  #gsCard[hidden] { display: none; }
  #gsCard .gsHead { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 6px 10px 6px 12px; }
  #gsCard .gsHead b { font-size: 12px; }
  #gsCard .gsHead .gsCount { color: var(--muted); font-size: 11px; flex: 1 1 160px; min-width: 0; }
  #gsCard .gsHead button { background: none; border: 0; color: var(--muted); font-size: 12px; padding: 2px 6px; }
  #gsCard .gsHead button:hover { color: var(--text); }
  #gsCard #obPrompt { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; flex: 1 1 220px; min-width: 0; }
  #gsCard #obPrompt .obText { flex: 1 1 150px; min-width: 0; font-size: 12px; font-weight: 600; color: var(--text); }
  #gsCard #obPrompt button { background: var(--panel2); border: 1px solid var(--border); border-radius: 999px; color: var(--text); padding: 3px 10px; font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #gsCard #obPrompt #obTry { border-color: var(--orange); color: var(--orangeText); }
  #gsCard li.skipped b { color: var(--muted); }
  @media (max-width: 500px) { #gsCard .gsHead { flex-wrap: nowrap; align-items: flex-start; } #gsCard #obPrompt { flex: 1 1 0; } #gsCard #obPrompt button { padding: 2px 8px; font-size: 11px; } #gsCard #obPrompt #obWatch { flex: 1 1 90px; min-width: 0; } #gsCard li button { padding: 4px 6px; } #gsCard li:not(.cur) small { display: none; } #gsCard ol { padding: 2px 8px 6px 6px; } }
  body.obSpot.driver-active * { pointer-events: auto; }
  body.obSpot .driver-overlay { display: none; }
  body.obSpot .driver-active-element { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
  #gsCard .gsBar { height: 3px; background: var(--panel2); margin: 0 12px; border-radius: 2px; overflow: hidden; }
  #gsCard .gsBar i { display: block; height: 100%; background: var(--orange); }
  #gsCard ol { list-style: none; margin: 0; padding: 4px 8px 8px 6px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px 6px; }
  #gsCard.min ol, #gsCard.min .gsBar, #gsCard.min .gsTrackRow { display: none; }
  /* First login: ask the new member to take the tour (shown in the folded card too). */
  #gsCard.wel > :not(#obWelcome), #gsCard.pillMode { display: none; }
  #gsCard #obWelcome { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 8px 12px; }
  #gsCard #obWelcome .obWText { flex: 1 1 220px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text); }
  #gsCard #obWelcome .obShort { display: none; }
  #gsCard #obWelcome button { border-radius: 999px; padding: 6px 14px; min-height: 32px; font-size: 13px; font-weight: 600; background: var(--panel2); border: 1px solid var(--border); color: var(--text); white-space: nowrap; }
  #gsCard #obWelcome #obFirstTrade { background: var(--orange); border-color: var(--orange); color: #14090A; }
  #gsCard #obWelcome .obLink { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 6px 8px; }
  #gsPill { font-size: 11px; font-weight: 700; color: var(--orangeText); background: none; border: 1px solid var(--orange); border-radius: 12px; padding: 3px 10px; white-space: nowrap; cursor: pointer; }
  #gsPill[hidden] { display: none; }
  @media (max-width: 500px) {
    #gsCard #obWelcome { flex-wrap: nowrap; gap: 6px; padding: 4px 8px; }
    #gsCard #obWelcome .obLong { display: none; }
    #gsCard #obWelcome .obShort { display: inline; }
    #gsCard #obWelcome .obWText { flex: 1 1 auto; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    #gsCard #obWelcome button { flex: none; min-height: 44px; padding: 0 10px; }
    #gsCard.min .gsHead { align-items: center; }
    #gsCard.min #obPrompt { flex-wrap: nowrap; }
    #gsCard.min #obPrompt .obText { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    #gsCard.min #obPrompt #obWatch { display: none; }
  }
  #gsCard li button { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 7px 8px; color: var(--text); }
  #gsCard li button:hover { background: var(--panel2); }
  #gsCard .gsTick { flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--border2); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: var(--onBull); }
  #gsCard li.done .gsTick { background: var(--bull); border-color: var(--bull); }
  #gsCard li.done b { color: var(--muted); text-decoration: line-through; text-decoration-color: #3a4658; }
  #gsCard li b { display: block; font-size: 12px; }
  #gsCard li small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; margin-top: 1px; }
  #helpBtn { border: 1px solid var(--border); background: var(--panel2); color: var(--muted); border-radius: 8px; padding: 5px 9px; font-size: 14px; line-height: 1; font-weight: 700; }
  #helpBtn:hover, #helpBtn.on { color: var(--orangeText); border-color: rgba(255,107,0,.5); }
  body.learnOpen #sideDrawer { display: flex; }
  #learnPanel[hidden], #learnAsk[hidden] { display: none; }
  #learnPanel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
  #learnPanel .lnHead { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  #learnPanel .lnHead b { flex: 1; font-size: 14px; }
  #learnPanel .lnHead button { background: none; border: 0; color: var(--muted); font-size: 16px; padding: 4px 8px; }
  #learnPanel .lnHead #learnAll { font-size: 12px; color: var(--orangeText); }
  #learnList { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; }
  #learnNote { color: var(--muted); font-size: 12px; padding: 2px 4px; }
  .lnCard { border: 1px solid var(--border); border-radius: 10px; background: var(--panel2); }
  .lnCard.start { border-color: rgba(255,107,0,.5); }
  .lnCard > button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 9px 10px; border-radius: 10px; }
  .lnCard > button b { display: block; font-size: 13px; overflow-wrap: anywhere; }
  .lnCard > button small { display: block; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; margin-top: 2px; }
  .lnCard .lnBody { padding: 0 10px 10px; }
  .lnCard .lnBody[hidden] { display: none; }
  .lnCard video { width: 100%; border-radius: 8px; background: #000; margin-bottom: 8px; }
  .lnCard ol { margin: 0; padding-left: 18px; font-size: 12px; color: var(--text); }
  .lnCard li { margin: 3px 0; }
  .ctxHelp { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; min-width: 24px; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--panel2); color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1; margin: 0 2px; }
  .ctxHelp:hover { color: var(--orangeText); border-color: rgba(255,107,0,.5); }
  #gsCard .gsTrackRow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 2px 12px 8px; font-size: 12px; }
  #gsCard .gsTrackRow > span { color: var(--muted); }
  #gsCard .gsTrackRow button { background: var(--panel2); border: 1px solid var(--border); border-radius: 999px; color: var(--text); padding: 3px 10px; font-size: 12px; }
  #gsCard .gsTrackRow button.on { border-color: var(--orange); color: var(--orangeText); }
  #gsCard li { display: flex; align-items: flex-start; gap: 2px; }
  #gsCard li > button:first-child { flex: 1; min-width: 0; }
  #gsCard li button.ctxHelp { width: 24px; padding: 0; display: inline-flex; justify-content: center; align-items: center; background: var(--panel2); margin-top: 4px; }
  .driver-popover.tourPop { background: var(--panel2); color: var(--text); border: 1px solid var(--border); font-family: -apple-system, "Segoe UI", Roboto, sans-serif; max-width: min(320px, calc(100vw - 24px)); }
  .driver-popover.tourPop .driver-popover-title { font-size: 15px; color: var(--text); }
  .driver-popover.tourPop .driver-popover-description { font-size: 13px; color: var(--text); }
  .driver-popover.tourPop .driver-popover-progress-text { color: var(--muted); }
  .driver-popover.tourPop .driver-popover-footer-btn { background: var(--panel); color: var(--text); border-color: var(--border); padding: 5px 10px; font-size: 12px; }
  .driver-popover.tourPop .driver-popover-next-btn { background: var(--orange); border-color: var(--orange); color: #14090A; font-weight: 700; }
  .driver-popover.tourPop .driver-popover-close-btn { color: var(--muted); }
  .driver-popover.tourPop .tourExtra { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
  .driver-popover.tourPop .tourExtra button { all: unset; cursor: pointer; font-size: 12px; color: var(--orangeText); text-decoration: underline; padding: 4px 0; }
  .driver-popover.tourPop .tourExtra .tourSkip { color: var(--muted); }
  .driver-popover.tourPop .tourExtra { flex-wrap: wrap; }
  .driver-popover.tourPop .tourTracks { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
  .driver-popover.tourPop .tourTracks > span { flex: 1 1 100%; }
  .driver-popover.tourPop .tourExtra .tourTracks button { text-decoration: none; color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; }
  .driver-popover.tourPop .tourExtra .tourTracks button.on { border-color: var(--orange); color: var(--orangeText); }
  .driver-popover.tourPop .driver-popover-arrow-side-top.driver-popover-arrow { border-top-color: var(--panel2); }
  .driver-popover.tourPop .driver-popover-arrow-side-bottom.driver-popover-arrow { border-bottom-color: var(--panel2); }
  .driver-popover.tourPop .driver-popover-arrow-side-left.driver-popover-arrow { border-left-color: var(--panel2); }
  .driver-popover.tourPop .driver-popover-arrow-side-right.driver-popover-arrow { border-right-color: var(--panel2); }
  body.driver-active #ccFlatAll { position: relative; z-index: 1000000001; pointer-events: auto; }
  body.driver-active #tcDlg { z-index: 1000000002; }
  body.driver-active #tcDlg, body.driver-active #tcDlg * { pointer-events: auto; }
  #tourGhost { position: fixed; pointer-events: none; z-index: 1; }
  #tcDlg { position: fixed; inset: 0; z-index: 500; background: rgba(2,5,10,.72); display: flex; align-items: center; justify-content: center; padding: 16px; }
  #tcDlg[hidden] { display: none; }
  #tcDlg .tcBox { width: 100%; max-width: 420px; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
  #tcDlg h3 { margin: 0 0 10px; font-size: 17px; }
  #tcDlg .tcLive { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: #3a1212; border: 1px solid var(--bear); color: #ffd6d4; font-size: 12px; font-weight: 600; }
  #tcDlg dl { margin: 0 0 12px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
  #tcDlg dt { color: var(--muted); }
  #tcDlg dd { margin: 0; text-align: right; font-weight: 600; word-break: break-word; }
  #tcDlg dd.tcWide { grid-column: 1 / -1; text-align: left; font-weight: 500; }
  #tcDlg dd.tcContract { font-weight: 800; font-size: 14px; }
  #tcDlg dd.tcToday { justify-self: start; padding: 2px 8px; border-radius: 999px; background: var(--bear); color: #fff; font-weight: 800; font-size: 11px; }
  #tcDlg .tcAsk { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--muted); font-size: 12px; cursor: pointer; }
  #tcDlg .tcAsk[hidden] { display: none; }
  #tcDlg .tcAsk input { width: auto; margin: 0; }
  #tcDlg .tcTyped { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; font-size: 13px; }
  #tcDlg .tcTyped[hidden] { display: none; }
  #tcDlg .tcTyped input { min-height: 44px; font-size: 16px; }
  #tcDlg .tcBtns { display: flex; gap: 8px; }
  #tcDlg .tcBtns button { flex: 1; border-radius: 10px; padding: 12px 14px; font-weight: 700; font-size: 14px; width: auto; }
  #tcDlg .tcBtns .primary { box-shadow: none; }
  #tcDlg .tcBox[data-tone=buy] { border-top: 3px solid var(--bull); }
  #tcDlg .tcBox[data-tone=sell] { border-top: 3px solid var(--sell); }
  #tcDlg .tcBox[data-tone=buy] dd:first-of-type { color: var(--bull); }
  #tcDlg .tcBox[data-tone=sell] dd:first-of-type { color: var(--bear); }
  #tcDlg .tcBox[data-tone=buy] #tcYes { background: var(--bull); border-color: var(--bull); color: var(--onBull); }
  #tcDlg .tcBox[data-tone=sell] #tcYes { background: var(--bearSolid); border-color: var(--bearSolid); color: #fff; }
  #tcDlg .tcBox[data-tone=danger] { border-top: 3px solid var(--bear); }
  #tcDlg .tcBox[data-tone=danger] #tcYes { background: var(--bearSolid); border-color: var(--bearSolid); color: #fff; }
  #tcDlg .tcBtns .ghost { background: none; border: 1px solid var(--border); color: var(--text); }
  #tcDlg button:focus-visible, #tcDlg input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  /* The light dialog box is white, so a white ring would vanish: the ring takes the text colour there. */
  :root[data-theme=light] #tcDlg button:focus-visible, :root[data-theme=light] #tcDlg input:focus-visible { outline-color: var(--text); }
  #needDlg { position: fixed; inset: 0; z-index: 400; pointer-events: none; background: rgba(2,5,10,.66); display: flex; align-items: center; justify-content: center; padding: 16px; }
  #needDlg[hidden] { display: none; }
  #needDlg .needBox { pointer-events: auto; width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
  #needDlg h3 { margin: 0 0 6px; font-size: 16px; }
  #needDlg p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
  #needDlg .needRow { display: flex; gap: 8px; flex-wrap: wrap; }
  #needDlg .needRow button { border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 13px; width: auto; }
  #needDlg .needRow .primary { box-shadow: none; }
  #needDlg .needRow .ghost { background: none; }
  #needDlg .errBox { margin: 10px 0 0; }
  #acctMenu { position: relative; }
  #acctBtn { background: var(--panel2); }
  #acctList { display: none; position: absolute; right: 0; top: 110%; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; min-width: 200px; z-index: 120; overflow-y: auto; max-height: calc(100vh - var(--hdrB, 56px) - 12px); max-height: calc(100dvh - var(--hdrB, 56px) - 12px); }
  #acctList.open { display: block; }
  #acctList button { display: block; width: 100%; text-align: left; border: 0; border-radius: 0; background: none; padding: 10px 14px; font-weight: 500; }
  #acctList button:hover { background: var(--panel2); }
  #acctList button[hidden] { display: none; }
  #acctList button.mDanger { color: var(--bear); font-weight: 700; }
  #acctList .mGroup { border-top: 1px solid var(--border); padding: 4px 0; }
  #acctList .mGroup h4 { margin: 0; padding: 8px 14px 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  #acctList button.mSwitch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  #acctList button.mSwitch[hidden] { display: none; }
  .mSwitch i { flex: none; position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--border); transition: background .15s; }
  .mSwitch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform .15s; }
  .mSwitch[aria-checked=true] i { background: var(--orange); }
  .mSwitch[aria-checked=true] i::after { transform: translateX(14px); background: var(--onOrange); }
  #mLogout { border-top: 1px solid var(--border); }
  #acctList .who { padding: 10px 14px; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--border); }
  .aboutLinks { list-style: none; margin: 0 0 14px; padding: 0; }
  .aboutLinks li { border-top: 1px solid var(--border); }
  .aboutLinks a, .aboutLinks summary { display: flex; align-items: center; min-height: 44px; color: var(--orangeText); cursor: pointer; }
  .aboutLinks details p { margin: 0 0 10px; }
  #accountDlg { max-width: 460px; width: calc(100vw - 32px); }
  #accountDlg[open] { max-height: calc(100dvh - 140px - env(safe-area-inset-bottom)); box-sizing: border-box; overscroll-behavior: contain; }
  #accountDlg .acSect { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; }
  #accountDlg h4 { margin: 0 0 6px; font-size: 14px; }
  #accountDlg .in { width: 100%; box-sizing: border-box; }
  #accountDlg .acBtn { margin-top: 10px; min-height: 44px; }
  #accountDlg .acDanger { border-color: var(--bear); }
  #accountDlg .acDelBtn:not(:disabled) { background: var(--bear); border-color: var(--bear); color: #fff; }
  #mode.hide { display: none; }
  /* One status light: green = data + broker fine; red shows what's wrong */
  .health { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--bearText); max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .health::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bull); flex: none; }
  .health.bad::before { background: var(--bear); }
  /* Strategy bar: one pill per running strategy */
  #instBar { display: flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--bg); border-bottom: 1px solid var(--border); overflow-x: auto; }
  #instBar .pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
  #instBar .pill.cur { border-color: var(--orange); color: var(--text); background: rgba(255,107,0,.08); }
  #instBar .pill i { width: 7px; height: 7px; border-radius: 50%; background: #3a414d; flex: none; }
  #instBar .pill i.on { background: var(--bull); animation: pulse 1.2s infinite; }
  #instBar .pill i.err { background: var(--bear); }
  #instBar .pill .acct { font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; background: #2a3340; color: #9fb3c8; }
  #instBar .pill .acct.demo { background: #123528; color: #6fd3a0; }
  #instBar .pill .acct.live { background: #8b1a1a; color: #fff; }
  #instBar .add { border-style: dashed; color: var(--muted); padding: 5px 10px; font-size: 12px; }
  #instBar .ccBtn { margin-left: auto; padding: 5px 12px; font-size: 12px; }
  #center { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
  #dock { border-top: 1px solid var(--border); background: var(--panel); display: flex; flex-direction: column; flex: none; }
  #dockGrip { height: 5px; cursor: ns-resize; }
  #dockGrip:hover, #dockGrip.drag { background: rgba(255,107,0,.4); }
  #dockBar { display: flex; align-items: center; gap: 2px; padding: 0 8px; min-height: 34px; }
  #dockBar { overflow-x: auto; scrollbar-width: none; }
  #dockBar::-webkit-scrollbar { display: none; }
  #dockBar #dockToggle { position: sticky; right: 0; background: var(--panel); }
  #dockBar .dt { border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 12px; border-radius: 6px; }
  #dockBar .dt.on { color: var(--text); background: var(--panel2); }
  #dockBar .dt:hover { color: var(--text); }
  #dockBar .sbtn { padding: 4px 10px; font-size: 11px; }
  #dockBar .dt, #dockBar .sbtn { flex: none; white-space: nowrap; }
  @media (min-width: 801px) and (max-width: 1100px) { #dockBar .dt { padding: 6px 6px; } #dockSum { display: none; } }
  #ccFlatAll { line-height: 1.2; white-space: nowrap; font-weight: 800; font-size: 12px; letter-spacing: .02em; padding: 6px 10px; min-height: 36px; background: transparent; border-color: var(--bear); color: var(--text); }
  #ccFlatAll[aria-disabled=true] { opacity: .6; cursor: progress; }
  #ccFlatAll:hover, #ccFlatAll:focus, #ccFlatAll:active { background: rgba(239, 83, 80, .14); border-color: var(--bear); color: var(--text); }
  #ccFlatAll.hot, #ccFlatAll.hot:hover, #ccFlatAll.hot:focus, #ccFlatAll.hot:active { background: var(--bearSolid); border-color: var(--bearSolid); color: #fff; }
  #acctDot { display: none; position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--bearSolid); box-shadow: 0 0 0 2px var(--panel); pointer-events: none; }
  @media (max-width: 800px) { #acctDot:not([hidden]) { display: block; } }
  #ccFlatAll { -webkit-tap-highlight-color: transparent; }
  @media (max-width: 1600px) { #ccFlatAll .flMore { display: none; } }
  @media (max-width: 1100px) { #ccFlatAll { min-height: 44px; } }
  #dockSum { color: var(--muted); font-size: 12px; margin-left: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #dockBody { height: var(--dockH, 260px); overflow: auto; padding: 4px 14px 12px; border-top: 1px solid var(--border); }
  #dock.collapsed #dockBody, #dock.collapsed #dockGrip { display: none; }
  #dock .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
  #dock .acard { background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
  #dock .acard.live { border-color: rgba(239,83,80,.5); }
  #dock .acard h3 { margin: 0 0 4px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
  #dock .big { display: flex; gap: 22px; margin: 4px 0 8px; }
  #dock .big div small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
  #dock .big div b { font-size: 16px; }
  #dock .envHead { margin: 10px 0 6px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
  #dock .envHead b { color: var(--orangeText); text-transform: uppercase; letter-spacing: .8px; font-size: 11px; }
  #dock table td, #dock table th { padding: 5px 4px; }
  #dock .sbtn { padding: 3px 9px; font-size: 11px; }
  #dock .sumRow { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; margin: 8px 0 10px; }
  #dock .sumCard { background: var(--panel2); border: 1px solid var(--border); border-left: 3px solid #3a414d; border-radius: 8px; padding: 8px 12px; }
  #dock .sumCard.live { border-left-color: var(--bear); }
  #dock .sumCard.demo { border-left-color: var(--bull); }
  #dock .sumCard.paper { border-left-color: #9fb3c8; }
  #dock .sumCard.shadow { border-left-color: #9fb3c8; border-left-style: dashed; }
  #dock .trHow { display: inline-flex; gap: 6px; align-items: center; margin: 0 0 6px; font-size: 12px; }
  #dock .trHow select { min-height: 28px; }
  #dock .sumCard.practice { border-left-color: #c9a227; }
  #optReview.practice { border-left: 3px solid #c9a227; padding-left: 8px; }
  .badge.practice { background: #3a3320; color: #e6c75a; }
  #pracBox { margin-top: 14px; border-top: 1px dashed #5b4f1f; padding-top: 8px; }
  #dock .sumCard .t { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  #dock .sumCard .kv { display: flex; gap: 18px; margin-top: 4px; flex-wrap: wrap; }
  #dock .sumCard .kv div small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .4px; }
  #dock .sumCard .kv div b { font-size: 15px; }
  #dock .bkStatus, #dock .bkStray { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 3px 0 2px; font-size: 12px; }
  #dock .bkStray { margin: 6px 0 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); align-items: center; }
  #dock .bkLine { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
  #dock .bkLine .dot { gap: 0; }
  #dock .bkLine .sbtn { padding: 1px 8px; }
  #dock .bkMore { margin-top: 6px; font-size: 11px; color: var(--muted); }
  #dock .bkMore summary { cursor: pointer; }
  #dock .bkMore ul { margin: 4px 0 0; padding-left: 16px; }
  #dock .bkStray .bkMore { flex-basis: 100%; margin-top: 0; }
  #dock .ccpHead { margin: 14px 0 6px; font-size: 13px; }
  #dock .ccpHead small, #dock .ccpGroup h4 small { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
  #dock .ccpRows { align-items: stretch; }
  #dock .ccpCard { flex: 1 1 340px; min-width: 0; }
  #dock .ccpCard .t .badge { font-size: 10px; }
  #dock .ccpGroup h4 { margin: 10px 0 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
  #dock .ccpRow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--border); }
  #dock .ccpWhat { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
  #dock .ccpSide { color: var(--muted); font-weight: 700; }
  #dock .ccpNums { display: flex; gap: 12px; flex-wrap: wrap; }
  #dock .ccpNums small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .4px; }
  #dock .ccpNone { margin: 2px 0; }
  #dock .ccpRow .sbtn, #dock .ccpClaim { min-height: 36px; }
  @media (max-width: 760px) { #dock .ccpRow .sbtn, #dock .ccpClaim { min-height: 44px; min-width: 64px; } }
  #dock table.grid2t th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
  #dock table.grid2t td.r, #dock table.grid2t th.r { text-align: right; }
  #dock table.grid2t tr:hover td { background: rgba(255,255,255,.03); }
  #dock .figc[data-state=stale] .fv, #dock tr.posstale td { opacity: .55; }
  #dock .figc[data-state=unavailable] .fv { font-size: 11px; color: var(--muted); font-weight: 600; }
  #dock .figNote, #dock .asOf { color: #d29922; font-size: 10px; display: block; }
  #dock .asOf[data-state=live] { color: var(--muted); }
  #dock .posPts { color: var(--muted); font-size: 11px; white-space: nowrap; }
  /* ROI % of the premium (options) or of cost (stocks), next to Open P&L; levels (Stop / Trail / Target) on the same basis */
  .roiTag { font-size: 11px; font-weight: 700; white-space: nowrap; margin-left: 4px; cursor: help; }
  .roiTag.pos { color: var(--bullText, var(--bull)); } .roiTag.neg { color: var(--bearText, var(--bear)); }
  .roiLv { margin: 2px 0 0; font-size: 11px; white-space: nowrap; cursor: help; }
  @media (max-width: 760px) { .roiLv { white-space: normal; } }
  #dock .estTag { color: var(--muted); font-size: 9px; text-transform: uppercase; margin-left: 3px; }
  #dock .posNote { margin: 6px 0; }
  #dock .acctCard { background: var(--panel2); border: 1px solid var(--border); border-left: 3px solid #3a414d; border-radius: 8px; padding: 8px 10px; margin: 8px 0; min-width: 0; }
  #dock .acctCard.live { border-left-color: var(--bear); }
  #dock .acctCard.demo { border-left-color: var(--bull); }
  #dock .acctCard .acHead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  #dock .acctCard .acGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 6px 0; }
  #dock .acctCard .figc { min-width: 0; overflow-wrap: anywhere; }
  #dock .acctCard .figc small:first-child, #dock .acctCard .acLine small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .4px; }
  #dock .acctCard .acLine { margin-top: 4px; overflow-wrap: anywhere; font-size: 12px; }
  #dock .sumCard .kv > div { min-width: 0; overflow-wrap: anywhere; }
  #dock .sumCard .kv div b[data-state=unavailable] { font-size: 11px; font-weight: 600; color: var(--muted); }
  /* Split-screen chart layouts */
  #grid { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--border); }
  #grid[hidden] { display: none; }
  #grid .grow { display: flex; min-height: 0; flex-basis: 0; }
  #grid .pane { position: relative; min-width: 0; min-height: 0; flex-basis: 0; background: var(--bg); outline: 1px solid transparent; outline-offset: -1px; }
  #grid .pane.active { outline-color: var(--orange); }
  #grid .pane iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); color-scheme: dark; }
  #grid .vs { width: 4px; cursor: ew-resize; flex: none; background: var(--border); }
  #grid .hs { height: 4px; cursor: ns-resize; flex: none; background: var(--border); }
  #grid .vs:hover, #grid .hs:hover { background: var(--orange); }
  #grid.dragging iframe { pointer-events: none; }
  #grid .gone { display: none !important; }
  .layIco { display: inline-flex; align-items: center; color: var(--muted, #8a93a6); flex: none; }
  @media (max-width: 1279px) {
    #grid[data-lay="4c"] .grow { flex-wrap: wrap; gap: 4px; }
    #grid[data-lay="4c"] .grow > .vs { display: none !important; }
    #grid[data-lay="4c"] .pane { flex-basis: calc(50% - 2px); }
  }
  #layoutSel { background: var(--panel); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 4px 6px; font: inherit; font-size: 12px; }
  #instBar .mini { border-style: dotted; font-size: 11px; padding: 4px 8px; }
  /* A chart pane inside a split layout: chart + its own small header only */
  #paneBar { display: none; align-items: center; gap: 8px; padding: 4px 8px; background: var(--panel); border-bottom: 1px solid var(--border); font-size: 12px; white-space: nowrap; position: relative; z-index: 5; }
  #paneBar select { background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; font: inherit; font-weight: 700; padding: 2px 4px; max-width: 220px; }
  #paneBar button { padding: 2px 8px; font-size: 11px; }
  #paneBar .pb { border: 0; background: none; color: var(--muted); font-size: 14px; padding: 0 5px; }
  #paneBar .pb:hover { color: var(--text); }
  body.embed header, body.embed #restoreStrip, body.embed #instBar, body.embed aside:where(#sidePanel), body.embed #dock { display: none !important; }
  body.embed #paneBar { display: flex; flex-wrap: nowrap; gap: 4px; overflow: visible; }
  body.embed #paneBar select { padding: 2px 4px; }
  body.embed #tfSel { width: 72px; }
  body.embed #ctSlot select { width: 92px; }
  body.embed #paneBar > *, body.embed #paneInl > *, body.embed #paneMore > * { flex-shrink: 0; }
  body.embed #paneSel, body.embed #paneStats { flex-shrink: 1; min-width: 60px; }
  body.embed #paneBar .spacer { flex: 1 1 0; min-width: 0; }
  /* Narrow panes: chart type moves into the ƒx menu; the strategy picker shrinks. */
  @media (max-width: 620px) { body.embed #paneAcct, body.embed #ctSlot { display: none; } body.embed #paneSel { max-width: 120px; } }
  @media (max-width: 520px) { body.embed #paneStats { display: none; } }
  /* A pane never scrolls sideways: its toolbar wraps instead */
  html:has(body.embed), body.embed { overflow: hidden; }
  body.embed #paneSel { max-width: 170px; text-overflow: ellipsis; }
  body.embed #paneStats { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  body.embed #algoLine, body.embed #zLine, body.embed #tfBar { display: none !important; }
  #tvCustom { position: fixed; z-index: 60; display: flex; gap: 6px; align-items: center; background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.5); flex-wrap: wrap; max-width: 92vw; }
  #tvCustom[hidden] { display: none; }
  #ctyMenu { position: fixed; z-index: 59; background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 8px; font-size: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.5); width: min(760px, calc(100vw - 16px)); box-sizing: border-box; max-height: calc(100vh - 16px); overflow-y: auto; }
  #ctyMenu[hidden] { display: none; }
  #ctyMenu .ctyRow { display: grid; grid-template-columns: 74px 1fr; gap: 6px; align-items: start; padding: 6px 0; border-top: 1px solid var(--border); }
  #ctyMenu .ctyRow:first-of-type { border-top: 0; }
  #ctyMenu .ctyHead { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 4px 0 2px; }
  #ctyMenu .ctyStyles, #ctyMenu .ctyTm { padding-bottom: 4px; }
  body.embed #ctSel { display: none; }
  #ctyMenu .ctyKind { border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 6px; font: inherit; font-weight: 700; padding: 6px 4px; min-height: 32px; cursor: pointer; text-align: left; }
  #ctyMenu .ctyRow.on .ctyKind { border-color: var(--orange); color: var(--orangeText); }
  #ctyMenu .ctyRow.off .ctyKind { color: var(--muted); }
  #ctyMenu .ctySizes { display: flex; flex-wrap: wrap; gap: 4px; }
  #ctyMenu .ctySizes button { border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 6px; font: inherit; padding: 4px 8px; min-height: 30px; cursor: pointer; }
  #ctyMenu .ctySizes button.on { background: var(--orange); border-color: var(--orange); color: var(--onOrange); }
  #ctyMenu .ctyWhy { color: var(--muted); line-height: 1.4; white-space: normal; }
  #ctyMenu .ctyWhy a { color: var(--orangeText); margin-left: 4px; white-space: nowrap; }
  .ctyWhyForm { color: var(--muted); line-height: 1.4; display: flex; flex-direction: column; gap: 2px; }
  .ctyWhyForm a { color: var(--orangeText); }
  @media (max-width: 600px), (pointer: coarse) {
    #ctyBtn { min-height: 44px; }
    #ctyMenu .ctyKind, #ctyMenu .ctySizes button { min-height: 44px; }
  }
  #ctyMenu .ctyNote { color: var(--muted); display: block; margin-top: 6px; white-space: normal; line-height: 1.4; }
  #tvCustom input { width: 90px; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 3px 6px; font: inherit; }
  #tvCustom button { border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 6px; padding: 3px 9px; font: inherit; cursor: pointer; }
  #tvCustom small { color: var(--bear, #ef5350); flex-basis: 100%; }
  .tbSel { background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; font: inherit; font-size: 12px; font-weight: 600; padding: 2px 4px; }
  #paneSym { background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; font: inherit; font-weight: 800; padding: 2px 8px; }
  #paneSym:hover { border-color: var(--orange); }
  body.pairView #paneTrade, body.pairView #paneCT, body.pairView #ctxTrader, body.pairView #ctxBuyLim, body.pairView #ctxSellLim, body.pairView #ctxBuyStp, body.pairView #ctxSellStp { display: none !important; }
  body.optView #paneTrade, body.optView #paneCT, body.optView #ctxTrader, body.optView #ctxBuyLim, body.optView #ctxSellLim, body.optView #ctxBuyStp, body.optView #ctxSellStp { display: none !important; }
  /* Options on the chart (Dion 11-18): the option strip pinned to the chart. */
  #optStrip { position: absolute; left: 8px; bottom: 30px; z-index: 7; max-width: calc(100% - 96px); padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; background: color-mix(in srgb, var(--bg) 90%, transparent); font-size: 11px; line-height: 16px; pointer-events: auto; }
  #optStrip[hidden] { display: none; }
  #optStrip:not(.ocFlow) { max-height: calc(100% - 40px); overflow-y: auto; }
  #optStrip .ocHead, #optStrip .ocRow { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
  #optStrip .ocNote, #optStrip .ocAcct { color: var(--muted); }
  #optStrip button { border: 1px solid var(--border); background: var(--panel2); color: var(--text); border-radius: 4px; padding: 0 6px; font-size: 11px; line-height: 16px; cursor: pointer; }
  #optStrip button[aria-pressed="true"] { border-color: var(--accent, #4aa3ff); }
  #optStrip button.ocFold { border: 0; background: none; padding: 0; font-weight: 700; }
  #optStrip.fold .ocRow { display: none; }
  /* Out of the plot (phone, or a pane too narrow to keep it clear of the line titles): a compact band right above the chart,
     so the price axis and every line label stay readable (ordertrack.js placeStrip). */
  #optStrip.ocFlow { position: relative; left: auto; bottom: auto; top: auto; flex: none; max-width: none; max-height: 30%; overflow-y: auto; border-width: 0 0 1px; border-radius: 0; background: var(--panel); }
  @media (max-width: 640px) { #optStrip { font-size: 10px; line-height: 14px; } #optStrip.ocFlow { max-height: 40%; } #optStrip .ocAcct { display: none; } #optStrip .ocRow { flex-wrap: wrap; } #optStrip .ocRow > span:first-child { min-width: 0; white-space: normal; overflow-wrap: anywhere; } #optStrip .ocRow button { flex: none; } }
  .pairLegend { display: flex; align-items: baseline; gap: 8px; font-size: 13px; line-height: 18px; pointer-events: auto; }
  .pairLegend b { color: var(--text); font-weight: 800; }
  .pairLegend span { color: var(--muted); font-size: 11px; }
  .pvBar { flex-wrap: wrap; align-items: center; row-gap: 4px; max-width: 100%; }
  .pvBar .pvTitle { min-width: 0; overflow-wrap: anywhere; }
  .pvBar .pvBtns { display: inline-flex; flex-wrap: wrap; gap: 2px; font-size: 11px; }
  .pvBtn { font: inherit; font-size: 11px; line-height: 16px; padding: 1px 7px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel); color: var(--muted); cursor: pointer; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pvBtn[aria-pressed="true"] { background: var(--orange); color: #fff; border-color: var(--orange); font-weight: 700; }
  @media (max-width: 480px) { .pvBar { font-size: 12px; } .pvBtn { padding: 3px 8px; } }
  #symPop { position: fixed; z-index: 70; width: 340px; max-width: calc(100vw - 8px); background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 34px rgba(0,0,0,.55); padding: 8px; }
  #symQ { width: 100%; background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: inherit; padding: 8px 10px; text-transform: uppercase; }
  #symQ:focus { outline: none; border-color: var(--orange); }
  #symItems { max-height: 320px; overflow: auto; margin-top: 6px; }
  #symItems .g { font-size: 10px; letter-spacing: .8px; text-transform: uppercase; color: var(--orangeText); padding: 8px 6px 2px; }
  #symItems button { display: flex; width: 100%; gap: 10px; align-items: baseline; border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 6px; font-weight: 600; }
  #symItems button span { color: var(--muted); font-weight: 400; font-size: 12px; }
  #symItems button:hover, #symItems button.hi { background: var(--panel2); }
  #symItems button.cur { color: var(--orangeText); }
  /* Order-ticket panel folds away */
  #asideOpen { display: none; border: 0; border-left: 1px solid var(--border); border-radius: 0; background: var(--panel); color: var(--muted); padding: 10px 4px; writing-mode: vertical-rl; font-size: 11px; letter-spacing: .5px; }
  #asideOpen:hover { color: var(--text); }
  body.asideFolded aside:where(#sidePanel) { display: none; }
  body.asideFolded:not(.embed) #asideOpen { display: block; }
  .tabs .fold { flex: 0 0 auto; padding-left: 8px; padding-right: 8px; font-size: 12px; }
  body.embed #tfBar { padding: 3px 6px; }
  dialog[open]:not(:modal) { position: fixed; inset: 64px 0 auto 0; margin: 0 auto; z-index: 90; overflow-y: auto; }
  dialog { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 18px; width: min(420px, 92vw); }
  dialog::backdrop { background: rgba(0,0,0,.6); }
  dialog h3 { margin: 0 0 10px; }
  dialog .dlgX { position: sticky; top: 0; float: right; z-index: 3; width: 44px; height: 44px; min-height: 44px; margin: -10px -10px 0 8px; padding: 0; border-radius: 50%; font-size: 24px; line-height: 1; background: var(--panel2); border: 1px solid var(--border); color: var(--text); cursor: pointer; }
  dialog .dlgX:hover, dialog .dlgX:focus-visible { border-color: var(--orange); }
  #agentDlg { width: min(560px, 94vw); }
  #agentDlg h4 { margin: 14px 0 6px; }
  #agentDlg button, #agentDlg .agTog { min-height: 44px; }
  #agentDlg .row { flex-wrap: wrap; padding: 4px 0; }
  #agentDlg .row label { flex: 1 1 140px; }
  #agentDlg .row input:not([type=checkbox]) { flex: 1 1 180px; width: auto; min-width: 0; text-align: left; min-height: 40px; }
  #agentDlg .row input[type=checkbox] { width: 24px; height: 24px; }
  #agentDlg .agTog { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid rgba(42,48,58,.5); cursor: pointer; }
  #agentDlg .agTog input { width: 24px; height: 24px; margin: 0; flex: none; }
  #agentDlg .agTog span { flex: 1; font-size: 13px; font-weight: 600; }
  #agentDlg .agTog small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
  #agentDlg .agLive { background: var(--bear); color: #fff; border-radius: 4px; font-size: 10px; font-weight: 800; padding: 1px 6px; margin-left: 6px; letter-spacing: .04em; }
  #agentDlg .agBig { width: 100%; background: var(--orange); border-color: var(--orange); color: var(--onOrange); margin-top: 4px; }
  .aiSec { margin: 12px 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .aiGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; align-items: start; }
  #agentDlg .aiGrid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
  .aiCard { background: var(--panel2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  .aiCard.aiNote { background: transparent; border-style: dashed; }
  .aiCard.aiWide { grid-column: 1 / -1; }
  .aiHead { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .aiHead b { font-size: 14px; }
  .aiHead small { color: var(--muted); font-size: 11px; order: 3; flex-basis: 100%; }
  .aiTag { margin-left: auto; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(255,107,0,.35); color: var(--orangeText); background: rgba(255,107,0,.08); white-space: nowrap; }
  .aiCard ol { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
  .aiCard p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
  .aiCode { display: flex; gap: 6px; align-items: stretch; min-width: 0; }
  .aiCode pre { flex: 1; min-width: 0; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; font: 11px/1.45 ui-monospace, Menlo, monospace; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
  .aiBtns { display: flex; gap: 8px; flex-wrap: wrap; }
  .aiBtns a, .aiBtns button, .aiCode button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: 700 12.5px system-ui, sans-serif; text-decoration: none; cursor: pointer; }
  .aiBtns .aiAppCue { flex-basis: 100%; color: var(--muted); font-size: 11.5px; }
  .aiBtns a.go, .aiBtns button.go { background: var(--orange); border-color: var(--orange); color: var(--onOrange); }
  .aiCode button { flex: none; min-height: 0; padding: 0 10px; }
  #cnAi { margin-top: 28px; }
  #cnAi .cnAiUrl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 6px; }
  #cnAi .cnAiUrl code { font: 13px ui-monospace, Menlo, monospace; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; }
  #agentDlg .agKey { border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin: 0 0 8px; }
  #agentDlg .agKeyHead { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
  #agentDlg .agKeyHead b { font-size: 14px; }
  #agentDlg .agPill { background: var(--panel2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; font-size: 11px; color: var(--muted); }
  #agentDlg .agKeyBtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
  #agentDlg .agKeyBtns button { flex: 1 1 140px; }
  #agentDlg .agRevoke { background: none; border-color: var(--bear); color: var(--bear); }
  #agentDlg .agFeedRow { border-bottom: 1px solid rgba(42,48,58,.5); padding: 6px 0; font-size: 12px; word-break: break-word; }
  #agentDlg .agFeedRow .agOk { color: var(--bull); font-weight: 700; }
  #agentDlg .agFeedRow .agNo { color: var(--bear); font-weight: 700; }
  #agentDlg .agFeedBtns { display: flex; gap: 8px; margin-top: 8px; }
  #agentDlg .agFeedBtns button { flex: 1; }
  #agentDlg .help[hidden], #agentDlg [hidden] { display: none; }
  dialog .row select { width: 220px; text-align: left; }
  .indRow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(42,48,58,.5); font-size: 12px; }
  .indRow span { flex: 1; color: var(--text); }
  .indRow small { color: var(--muted); }
  .indRow .x { border: 0; background: none; color: var(--muted); padding: 2px 6px; }
  .linkBtn { border: 0; background: none; color: var(--muted); font-weight: 500; font-size: 12px; padding: 8px 0; text-decoration: underline; }
  /* Phone: one chart, full width, then the Control Center and the strategy panel below it. */
  body:not(.embed) header { position: sticky; top: 0; z-index: 110; }
  body.driver-active:not(.embed) header { z-index: 1000000001; }
  /* The tour card's title is a <header> too: the two rules above must not lift it over the card's close button. */
  .driver-popover.tourPop .driver-popover-title { position: static; z-index: auto; display: block; min-height: 0; padding: 0; background: none; border: 0; box-shadow: none; }
  @media (max-width: 800px), (max-height: 600px) {
    body:not(.embed) #terminal { height: auto; min-height: 100vh; min-height: 100dvh; flex: none; }
  }
  @media (max-height: 500px) { body:not(.embed) header .brand { display: none; } }
  @media (max-width: 800px) {
    header { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
    header .spacer { display: none; }
    #hdrLayout { flex-wrap: wrap; }
    #hdrLayout select { max-width: 46vw; }
    #hdrFocus { max-width: 100%; }
    body:not(.embed) main { flex-direction: column; }
    body:not(.embed) #center { flex: none; }
    #grid { flex: none; height: 64vh; height: 64dvh; min-height: 360px; }
    #grid .vs, #grid .hs { display: none !important; }
    #dock { flex: none; }
    #dockBar { overflow-x: auto; height: auto; min-height: 40px; flex-wrap: nowrap; }
    #dockBar .dt { white-space: nowrap; padding: 8px 10px; }
    #dockBody { height: auto; max-height: 70vh; max-height: 70dvh; padding: 4px 10px max(10px, env(safe-area-inset-bottom)); }
    #dockGrip { display: none; }
    #dock .grid { grid-template-columns: 1fr; }
    aside { width: 100%; height: auto; border-left: 0; border-top: 1px solid var(--border); }
    aside:where(#sidePanel) .tab { overflow: visible; }
    #charts { min-height: 50vh; }
    .saveBar button { min-height: 44px; }
    .saveBar { position: static !important; }
  }
  @media (max-width: 800px) and (min-height: 501px) {
    #hdrNav button, #helpBtn, #voiceBtn, #prRefresh, #wrPanelsBtn, #dock .sbtn[data-act=connect], #gsCard li button:not(.ctxHelp) { min-height: 44px; }
    #helpBtn, #voiceBtn { min-width: 44px; }
    /* Money buttons on a strategy row (Start, Stop, Flatten, Remove) and the notifications bell are full 44 px touch targets (craft floor 6).
       The gap and bell rules carry an extra id/element so they beat the later base rules (.stItem .stAct, #ntfBtn) of otherwise equal specificity. */
    #stList .stItem .stAct { gap: 8px; }
    .stItem .sbtn[data-act] { min-height: 44px; min-width: 44px; padding: 6px 14px; font-size: 13px; }
    .stItem .sbtn[data-act=remove] { margin-left: auto; }
    header #ntfBtn { min-height: 44px; min-width: 44px; }
    #wrPanelsMenu label { min-height: 44px; display: flex; align-items: center; gap: 10px; }
    #wrPanelsMenu input[type=checkbox] { width: 22px; height: 22px; flex: none; }
    .ctxHelp { position: relative; }
    .ctxHelp::after { content: ''; position: absolute; inset: -10px; }
    #dockBar > button.dt { position: relative; z-index: 1; }
  }
  @media (pointer: coarse) {
    body:not(.embed) header { padding-top: max(8px, env(safe-area-inset-top)); }
    body:not(.embed) #terminal { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
    body:not(.embed) aside { padding-bottom: env(safe-area-inset-bottom); }
    input, textarea, select { font-size: 16px !important; }
  }
  @media (pointer: coarse) and (max-height: 500px) {
    body:not(.embed) #grid { flex: none; height: 60vh; height: 60svh; min-height: 200px; }
    body:not(.embed) #charts { min-height: 200px; }
    #dockBody { max-height: 40vh; max-height: 40svh; }
    body:not(.embed) #dock { padding-bottom: max(4px, env(safe-area-inset-bottom)); }
    #dockBar { position: relative; }
    #dockToggle { position: sticky; right: 0; background: var(--panel); margin-left: auto; min-width: 44px; min-height: 44px; }
    body:not(.embed) header { gap: 6px; }
    body:not(.embed) header .spacer { display: none; }
    body:not(.embed) #hdrNav { flex: 3 1 96px; min-width: 96px; overflow-x: auto; scrollbar-width: none; }
    body:not(.embed) #hdrNav::-webkit-scrollbar { display: none; }
    body:not(.embed) #hdrNav button { flex: none; }
    body:not(.embed) #hdrFocus, body:not(.embed) #trialPill { flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    body:not(.embed) header .stat, body:not(.embed) #hdrPnl, body:not(.embed) #ccFlatAll, body:not(.embed) #acctMenu { flex: none; }
    body:not(.embed) #voiceBtn.down::after { content: ' !'; }
  }
  @media (max-width: 800px) {
    body.war #terminal, body.pred #terminal, body.conn #terminal, body.port #terminal, body.strat #terminal { padding-bottom: 0; }
  }
  /* ── War Room ── */
  #hdrNav { display: inline-flex; gap: 2px; background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
  #hdrNav button { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 12px; padding: 5px 12px; border-radius: 6px; }
  #hdrNav button:hover { color: var(--text); }
  #hdrNav button.on { background: var(--orange); color: var(--onOrange); }
  #trialPill.trialGo, #mPlan.trialGo { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
  #payModal { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; z-index: 70; padding: 12px; }
  #payModal[hidden] { display: none; }
  #payModal .box { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; width: 100%; max-width: 520px; max-height: calc(100vh - 24px); display: flex; flex-direction: column; overflow: hidden; }
  #payModal .payHead { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; }
  #payModal .payHead h3 { margin: 0; font-size: 17px; flex: 1; }
  #payModal .payBody { padding: 0 16px 14px; overflow: auto; }
  #payModal .payBody p { color: var(--muted); font-size: 13px; margin: 6px 0 10px; }
  #payFrame { width: 100%; height: 560px; border: 0; border-radius: 10px; background: #fff; display: block; }
  #payModal[data-mode="link"] #payFrame { display: none; }
  #payStatus { font-size: 13px; margin: 10px 0 0; }
  #payStatus.ok { color: var(--green, #30d158); }
  @media (max-width: 800px) { #payModal { padding: 0; align-items: stretch; } #payModal .box { max-width: none; max-height: none; height: 100%; border-radius: 0; } #payFrame { height: calc(100vh - 210px); min-height: 420px; } }
  #pwManage { display: inline-flex; align-items: center; padding: 10px 16px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 600; }
  #pwManage[hidden] { display: none; }
  #acSub .acSubState { font-weight: 700; margin: 0 0 2px; }
  #acSub .acSubRow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  #acSub .acSubRow a, #acSub .acSubRow button { min-height: 36px; }
  #acSub .acSubRow a.acBtn { display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 13px; }
  @media (pointer: coarse) { #acSub .acSubRow a, #acSub .acSubRow button, #payModal button, #payModal a { min-height: 44px; } }
  #trialPill.trialGo:hover, #mPlan.trialGo:hover { color: var(--text); }
  #warroom { flex: 1; min-height: 0; overflow: auto; background: var(--bg); padding: 0 10px 14px; }
  #warroom[hidden] { display: none; }
  body.war main, body.war #mLayoutRow { display: none !important; }
  #predictions { flex: 1; min-height: 0; overflow: auto; background: var(--bg); }
  #predictions[hidden] { display: none; }
  body.pred main, body.pred #mLayoutRow { display: none !important; }
  body.conn main, body.conn #mLayoutRow { display: none !important; }
  body.port main, body.port #mLayoutRow { display: none !important; }
  body.copy main, body.copy #mLayoutRow { display: none !important; }
  #copytrader { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); padding: 22px 18px 70px; }
  #copytrader[hidden] { display: none; }
  body.embed #copytrader { display: none !important; }
  #copytrader .cpWrap { max-width: 1040px; margin: 0 auto; }
  #copytrader .cpTop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
  #copytrader .cpTop h2 { margin: 0; }
  #copytrader .cpTop .spacer { flex: 1; }
  #copytrader .cpIntro { color: var(--muted); margin: 4px 0 14px; max-width: 760px; }
  #cpKill { background: var(--bear); border-color: var(--bear); color: #fff; font-weight: 800; }
  #cpList { display: grid; gap: 12px; }
  /* Portfolio > Copy trading: a follower's own links (the Copy Trader tab is the owner's). */
  #mpFollow { margin: 10px 0 18px; }
  #mpFollow[hidden] { display: none; }
  #mpFollow .cpTop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  #mpFollow .cpTop h3 { margin: 0; }
  #mpFollow .cpTop .spacer { flex: 1; }
  #mpFollow .cpIntro { color: var(--muted); margin: 4px 0 10px; max-width: 760px; }
  #mpFollowKill { background: var(--bear); border-color: var(--bear); color: #fff; font-weight: 800; min-height: 44px; }
  #mpFollowList { display: grid; gap: 12px; }
  #mpFollowMsg { font-size: 12px; color: var(--bearText); }
  #mpFollowMsg div { padding: 3px 0; overflow-wrap: anywhere; }
  .cpL { border: 1px solid var(--border); border-radius: 12px; background: var(--panel2); padding: 12px 14px; }
  .cpL .cpHead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .cpL .cpHead b { font-size: 15px; }
  .cpL .cpMeta { color: var(--muted); font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
  .cpL .cpNote { margin-top: 8px; font-size: 12.5px; }
  .cpState { font-size: 10px; font-weight: 800; letter-spacing: .6px; padding: 3px 9px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); }
  .cpState[data-s=copying] { background: var(--orange); color: var(--onOrange); border-color: var(--orange); }
  .cpL[data-s=copying] { border-color: rgba(255,107,0,.6); }
  .cpLive { font-size: 10px; font-weight: 800; letter-spacing: .6px; padding: 3px 9px; border-radius: 10px; background: rgba(239,83,80,.16); color: var(--bearText); border: 1px solid rgba(239,83,80,.5); }
  .cpL .cpLast { color: var(--muted); font-size: 12px; margin-top: 6px; overflow-wrap: anywhere; }
  .cpL .cpLast b { color: var(--text); font-weight: 600; }
  .cpL .cpAct .cpStart { background: var(--orange); border-color: var(--orange); color: var(--onOrange); font-weight: 800; }
  #cpGuide { border: 1px dashed var(--border); border-radius: 12px; padding: 18px; background: var(--panel2); }
  #cpGuide h3 { margin: 0 0 4px; }
  #cpGuide ol { list-style: none; counter-reset: cpg; margin: 12px 0 14px; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #cpGuide li { counter-increment: cpg; display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); min-width: 0; }
  #cpGuide li::before { content: counter(cpg); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: var(--onOrange); font-weight: 800; display: grid; place-items: center; }
  #cpGuide li b { display: block; font-size: 13.5px; }
  #cpGuide li small { color: var(--muted); font-size: 12px; }
  #cpGuide .cpGo { background: var(--orange); border-color: var(--orange); color: var(--onOrange); font-weight: 800; min-height: 40px; }
  #cpForm .cpSteps { display: flex; gap: 6px; flex-wrap: wrap; }
  #cpForm .cpSteps span { padding: 3px 9px; border-radius: 10px; border: 1px solid var(--border); font-size: 11.5px; }
  #cpForm .cpSteps span.on { background: var(--orange); border-color: var(--orange); color: var(--onOrange); font-weight: 700; }
  #cpFollowers label:has(input:checked) { border-color: var(--orange); background: rgba(255,107,0,.12); }
  #cpFollowers label .cpLive { margin-left: auto; }
  #cpForm .cpHint { color: var(--muted); font-size: 12px; margin: 2px 0 8px; }
  #cpForm .check { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
  .cpState[data-s=exits_only] { background: rgba(255,107,0,.15); color: var(--orangeText); border-color: rgba(255,107,0,.45); }
  .cpState[data-s=paused] { background: rgba(255,107,0,.15); color: var(--orangeText); border-color: rgba(255,107,0,.45); }
  .cpState[data-s=desync] { background: rgba(239,83,80,.16); color: var(--bearText); border-color: rgba(239,83,80,.5); }
  .cpL .cpSync { margin-left: auto; color: var(--muted); font-size: 11.5px; }
  .cpL table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12.5px; }
  .cpL th { text-align: left; color: var(--muted); font-weight: 600; padding: 3px 6px; }
  .cpL td { padding: 4px 6px; border-top: 1px solid rgba(30,45,69,.6); }
  .cpL td.num, .cpL th.num { text-align: right; }
  .cpL .cpAct { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .cpL .cpAct button { min-height: 36px; }
  .cpL .cpAct .cpFlat { background: var(--bear); border-color: var(--bear); color: #fff; }
  #cpEmpty { color: var(--muted); padding: 22px; border: 1px dashed var(--border); border-radius: 12px; text-align: center; }
  #cpLog { margin-top: 6px; display: grid; gap: 2px; font-size: 12px; max-height: 320px; overflow-y: auto; }
  #cpLog div { display: flex; gap: 8px; padding: 3px 0; border-bottom: 1px solid rgba(30,45,69,.5); overflow-wrap: anywhere; }
  #cpLog time { color: var(--muted); flex: none; }
  #cpLog .refused, #cpLog .unclear { color: var(--bearText); }
  #cpForm { border: 1px solid var(--border); border-radius: 14px; background: var(--panel); color: var(--text); padding: 18px; width: min(560px, calc(100vw - 24px)); }
  #cpForm::backdrop { background: rgba(0,0,0,.6); }
  #cpForm h3 { margin: 0 0 4px; }
  #cpForm .cpSteps { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
  #cpForm .cpStep[hidden], #cpForm [hidden] { display: none !important; }
  #cpForm select, #cpForm input[type=number], #cpForm input[type=text] { width: 100%; min-height: 38px; }
  #cpForm .row label { flex: 1; }
  #cpFollowers { display: grid; gap: 6px; margin: 8px 0; }
  #cpNoFollower { display: grid; gap: 6px; justify-items: start; padding: 12px; border: 1px dashed var(--border); border-radius: 8px; }
  #cpNoFollower small { color: var(--muted); line-height: 1.45; }
  #cpNoFollower button { min-height: 44px; padding: 0 16px; background: var(--orange); border-color: var(--orange); color: var(--onOrange); font-weight: 700; }
  #cpFollowers label { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
  #cpForm .cpBtns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
  #cpErr { color: var(--bearText); min-height: 18px; margin-top: 8px; font-size: 12.5px; }
  #cpReview { white-space: pre-line; line-height: 1.6; }
  @media (max-width: 800px) { #copytrader { padding: 16px 12px 80px; } .cpL .cpSync { margin-left: 0; width: 100%; } .cpL table { font-size: 12px; } #cpGuide ol { grid-template-columns: minmax(0, 1fr); } .cpL .cpAct button, #cpGuide .cpGo, #copytrader .cpTop button { min-height: 44px; } }
  #portfolio { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); padding: 22px 18px 60px; }
  #portfolio[hidden] { display: none; }
  body.embed #portfolio { display: none !important; }
  #portfolio .mpWrap { max-width: 1040px; margin: 0 auto; }
  #portfolio h2 { margin: 0 0 12px; font-size: 20px; font-weight: 900; }
  #portfolio .mpBar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
  #portfolio .mpNav { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
  #portfolio .mpSeg button, #portfolio .mpBar > button, #portfolio .mpNav > button { border: 1px solid var(--border); background: none; color: var(--muted); padding: 7px 12px; font-weight: 700; cursor: pointer; border-radius: 8px; }
  #portfolio .mpSeg button.on { background: var(--accent, #2962ff); color: #fff; border-color: transparent; }
  #mpMoney button[data-m=live], #txMoney button[data-m=live] { color: var(--bull); border-color: var(--bull); }
  #mpMoney button[data-m=live]::before, #txMoney button[data-m=live]::before { content: '● '; }
  #mpMoney button[data-m=live].on, #txMoney button[data-m=live].on { background: #26a69a; color: #04110d; border-color: #26a69a; }
  :root[data-theme=light] #mpMoney button[data-m=live], :root[data-theme=light] #txMoney button[data-m=live] { color: var(--bull); border-color: var(--bull); }
  :root[data-theme=light] #mpMoney button[data-m=live].on, :root[data-theme=light] #txMoney button[data-m=live].on { background: var(--bull); color: #fff; border-color: var(--bull); }
  #mpMoney button[data-m=sim].on, #txMoney button[data-m=sim].on { background: var(--accent, #2962ff); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
  #portfolio .mpNav > button:disabled { opacity: .35; cursor: default; }
  #mpErr { border: 1px solid #ef5350; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; color: #ef9a9a; font-size: 13px; }
  #mpErr[hidden] { display: none; }
  #mpPnl.mpNone #mpSum, #mpPnl.mpNone #mpConf, #mpPnl.mpNone #mpCurve, #mpPnl.mpNone h3, #mpPnl.mpNone .mpScroll, #mpPnl.mpNone #mpCsv, #mpPnl.mpNone #mpSince { display: none; }
  #mpEmpty:not([hidden]) { border: 1px dashed var(--border); border-radius: 10px; padding: 18px 16px; margin: 6px 0 14px; color: var(--muted); }
  #mpPnl.mpNone #mpEmpty { text-align: center; padding: 36px 16px; font-size: 14px; }
  #mpConnect { display: inline-block; margin-left: 6px; }
  #mpConnect[hidden] { display: none !important; }
  #mpPnl.mpNone #mpConnect { display: block; width: max-content; margin: 12px auto 0; background: var(--accent, #2962ff); color: #fff; padding: 10px 18px; border-radius: 8px; font-weight: 700; text-decoration: none; }
  .discLink { color: inherit; text-decoration: underline; }
  #portfolio select, #portfolio input[type=date] { background: var(--panel, #161b22); color: inherit; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; }
  #mpSum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
  #mpSum > div { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
  #mpPaperSum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
  #mpPaperSum > div { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
  #mpPaperSum small { display: block; }
  #mpPaperReset { margin: 8px 0 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  #mpPaperStart { width: 130px; }
  #mpSum small, #mpConf, #mp441, #mpSince, #mpGaps { color: var(--muted); font-size: 12px; }
  #mpSum b { display: block; font-size: 20px; }
  #mpCurve { height: 220px; margin: 12px 0; border: 1px solid var(--border); border-radius: 10px; }
  #portfolio table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px; }
  #portfolio th, #portfolio td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
  #portfolio h3 { margin: 14px 0 6px; font-size: 14px; }
  #portfolio .mpScroll { overflow-x: auto; }
  #portfolio .up { color: var(--bull); } #portfolio .dn { color: var(--bear); }
  @media (max-width: 800px) { #portfolio { padding: 16px 12px 70px; } }
  #mpTabs { display: inline-flex; margin: 0 0 12px; }
  #mpTabs[hidden], #mpPnl[hidden], #mpTax[hidden], #txSpec[hidden], #txSim[hidden] { display: none; }
  #txAdvice { border: 1px solid var(--border); border-left: 4px solid #f0b429; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-weight: 700; }
  #txSum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
  #txSum > div { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
  #txSum small, #txSim, #txMsg, #txIfToday, #portfolio .txHint, #txNotes { color: var(--muted); font-size: 12px; }
  #txSum b { display: block; font-size: 20px; }
  #txNotes { padding-left: 18px; }
  #portfolio .txHint, #txNotes, #txMsg { overflow-wrap: anywhere; }
  #portfolio .txFile { border: 1px solid var(--border); color: var(--muted); padding: 7px 12px; font-weight: 700; cursor: pointer; border-radius: 8px; }
  #portfolio .txSale { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
  #portfolio .txSale input, #txMarkForm input { width: 110px; background: var(--panel, #161b22); color: inherit; border: 1px solid var(--border); border-radius: 8px; padding: 5px 7px; }
  #txMarkForm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
  #txMarkForm button, #portfolio .txSale button { border: 1px solid var(--border); background: none; color: inherit; padding: 6px 12px; font-weight: 700; cursor: pointer; border-radius: 8px; }
  #portfolio td.txWrap { white-space: normal; min-width: 260px; }
  #mpRebal[hidden], #rbSim[hidden] { display: none; }
  #rbAdvice { border: 1px solid var(--border); border-left: 4px solid #2962ff; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-weight: 700; }
  #rbSum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
  #rbSum > div { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
  #rbSum small, #rbSim, #rbMsg, #rbNotes { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
  #rbSum b { display: block; font-size: 20px; }
  #rbNotes { padding-left: 18px; }
  #rbTargets input, #rbTargets select, #rbSettings input { background: var(--panel, #161b22); color: inherit; border: 1px solid var(--border); border-radius: 8px; padding: 5px 7px; }
  #rbTargets input { width: 110px; }
  #rbSettings { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }
  #rbSettings label { display: flex; gap: 6px; align-items: center; font-size: 13px; }
  #rbSettings input { width: 90px; }
  #mpRebal button.rbBtn { border: 1px solid var(--border); background: none; color: inherit; padding: 6px 12px; font-weight: 700; cursor: pointer; border-radius: 8px; }
  #rbSettings button { width: auto; flex: none; }
  #mpRebal button.rbBtn.primary { background: var(--accent, #2962ff); color: #fff; border-color: transparent; }
  body.bt main, body.bt #mLayoutRow { display: none !important; }
  #backtest { flex: 1; min-height: 0; overflow: hidden; background: var(--bg); padding: 12px 16px; display: flex; flex-direction: column; }
  #backtest[hidden], body.embed #backtest { display: none !important; }
  #scanner { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); padding: 20px 18px 70px; }
  #scanner[hidden], body.embed #scanner { display: none !important; }
  body.scan main, body.scan #mLayoutRow { display: none !important; }
  #screener { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); padding: 20px 18px 70px; }
  #screener[hidden], body.embed #screener { display: none !important; }
  body.screen main, body.screen #mLayoutRow { display: none !important; }
  #screener .srWrap { max-width: 1180px; margin: 0 auto; }
  #screener h2 { margin: 0; }
  #screener .srIntro { color: var(--muted); margin: 6px 0 12px; max-width: 820px; }
  #screener .srSrc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
  #screener .srSrc span { border: 1px solid var(--border); background: var(--panel); border-radius: 14px; padding: 4px 10px; font-size: 12px; color: var(--muted); }
  #screener .srSrc b { color: var(--text); }
  #screener .srCard { border: 1px solid var(--border); background: var(--panel); border-radius: 8px; padding: 12px; margin: 0 0 12px; }
  #screener .srRow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
  #screener .srRow label { color: var(--muted); font-size: 12px; }
  #screener select, #screener input[type=number], #screener input[type=text] { min-height: 40px; min-width: 0; }
  #screener .srRule { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 6px; align-items: center; margin: 0 0 6px; }
  #screener .srRule input[data-k=value2][hidden] { display: block; visibility: hidden; }
  #screener button { min-height: 40px; padding: 0 12px; }
  #screener .srHow { color: var(--muted); font-size: 12px; margin: 2px 0 8px; }
  #screener .srRes { width: 100%; border-collapse: collapse; font-size: 13px; }
  #screener .srRes th, #screener .srRes td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
  #screener .srRes td.n { font-variant-numeric: tabular-nums; text-align: right; }
  #screener .srRes th.n { text-align: right; }
  #screener .srResWrap { overflow-x: auto; }
  #screener .srMeta { color: var(--muted); font-size: 12px; margin: 6px 0; }
  #screener .srList > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 8px 0; }
  #screener .srList small { color: var(--muted); }
  #screener .srAlert { color: var(--orangeText); font-size: 11px; font-weight: 700; }
  #screener .srNew { border-left: 3px solid var(--orange); padding-left: 8px; }
  @media (max-width: 800px) {
    #screener { padding: 14px 16px 90px; }
    #screener .srRule { grid-template-columns: 1fr 1fr; }
    #screener .srRule select[data-k=metric] { grid-column: 1 / -1; }
    #screener .srRes .hideS { display: none; }
  }
  #scanner .scWrap { max-width: 1180px; margin: 0 auto; }
  #scanner .scTop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  #scanner .scTop h2 { margin: 0; }
  #scanner .scTop button { min-height: 40px; padding: 0 14px; }
  #scanner .scTop .spacer { flex: 1; }
  #scanner .scIntro { color: var(--muted); margin: 6px 0 12px; max-width: 820px; }
  #scanner .scSrc { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 0 0 12px; }
  #scanner .scSrcCard { border: 1px solid var(--border); background: var(--panel); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  #scanner .scSrcCard b { display: flex; align-items: center; gap: 6px; }
  #scanner .scSrcCard small { color: var(--muted); overflow-wrap: anywhere; }
  #scanner .scDot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
  #scanner .scDot[data-s=ok] { background: var(--bull); }
  .scErr { border: 1px solid var(--bear); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; color: #ef9a9a; font-size: 13px; }
  .scErr[hidden], .srNote[hidden] { display: none; }
  .scErr button { margin-left: 8px; }
  .srNote { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
  #screener .srSrc .srEmpty { color: var(--orangeText); }
  #screener .srSrc .srEmpty small { display: block; color: var(--muted); font-weight: 400; max-width: 360px; white-space: normal; }
  #scanner .scDot[data-s=error], #scanner .scDot[data-s=budget] { background: var(--bear); }
  #scanner .scDot[data-s=no_key] { background: var(--orange); }
  #scanner .scSrcCard button { align-self: flex-start; margin-top: 4px; min-height: 40px; padding: 0 12px; }
  #scanner .scFilters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 10px; }
  #scanner .scFilters button { min-height: 40px; padding: 0 12px; border-radius: 20px; }
  #scanner .scFilters button.on { border-color: var(--orange); color: var(--text); }
  #scanner .scFilters select { min-height: 40px; }
  #scanner .scBudget { color: var(--muted); font-size: 12px; margin: 0 0 8px; }
  #scanner .scList { display: flex; flex-direction: column; gap: 6px; }
  #scanner .scRow { display: grid; grid-template-columns: 92px 130px 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--border); background: var(--panel); border-radius: 8px; padding: 8px 10px; }
  #scanner .scRow .scT { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
  #scanner .scRow .scT b { display: block; color: var(--text); font-size: 13px; }
  #scanner .scSym b { display: block; overflow-wrap: anywhere; }
  #scanner .scSym small { color: var(--muted); font-size: 11px; }
  #scanner .scWhat b { font-size: 13px; }
  #scanner .scWhat small { display: block; color: var(--muted); overflow-wrap: anywhere; }
  #scanner .scSide { font-size: 11px; font-weight: 700; margin-left: 6px; }
  #scanner .scSide[data-s="1"] { color: var(--bull); }
  #scanner .scSide[data-s="-1"] { color: var(--bear); }
  #scanner .scAct { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  #scanner .scAct button { min-height: 40px; min-width: 44px; padding: 0 10px; }
  #scanner .scEmpty { color: var(--muted); padding: 18px; border: 1px dashed var(--border); border-radius: 8px; text-align: center; }
  #scanner .scFoot { color: var(--muted); font-size: 11px; margin-top: 16px; }
  @media (max-width: 800px) {
    #scanner { padding: 14px 16px 90px; }
    #scanner .scRow { grid-template-columns: 1fr auto; grid-template-areas: "sym t" "what what" "act act"; }
    #scanner .scRow .scT { grid-area: t; text-align: right; }
    #scanner .scSym { grid-area: sym; }
    #scanner .scWhat { grid-area: what; }
    #scanner .scAct { grid-area: act; justify-content: stretch; }
    #scanner .scAct button { flex: 1; }
    #scanner .scSrc { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 420px) { #scanner .scSrc { grid-template-columns: 1fr; } }
  #backtest [hidden], #btParams [hidden] { display: none !important; }
  .btGrid { flex: 1; min-height: 0; width: 100%; max-width: 1600px; margin: 0 auto; display: grid; grid-template-columns: 340px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "side out" "run out"; column-gap: 12px; }
  .btScrollArea { display: contents; }
  #btFormCard { grid-area: side; min-width: 0; min-height: 0; display: flex; flex-direction: column; margin: 0; padding: 0; border-bottom: 0; border-radius: 10px 10px 0 0; overflow: hidden; }
  .btSideHead { flex: none; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
  #btForm { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 8px; }
  .btRunBar { grid-area: run; min-width: 0; border: 1px solid var(--border); border-radius: 0 0 10px 10px; padding: 10px 12px; background: var(--panel2); display: flex; flex-direction: column; gap: 6px; }
  .btOut { grid-area: out; min-width: 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 16px; }
  .btOutHead { position: sticky; top: 0; z-index: 3; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
  .btSec { border-bottom: 1px solid var(--border); }
  .btSec:last-of-type { border-bottom: 0; }
  .btSec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 0; font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
  .btSec > summary::-webkit-details-marker { display: none; }
  .btSec > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; font-size: 11px; }
  .btSec[open] > summary::before { transform: rotate(90deg); }
  .btSec > summary span { flex: none; }
  .btSec > summary small { flex: 1 1 auto; min-width: 0; text-align: right; color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .btSec[open] > summary small { visibility: hidden; }
  .btSec[open] { padding-bottom: 8px; }
  .btDisc { font-size: 11.5px; line-height: 1.45; color: var(--muted); }
  .btDisc summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 24px; }
  .btDisc summary::-webkit-details-marker { display: none; }
  .btDiscMore { color: var(--orangeText); font-weight: 700; text-decoration: underline; }
  .btDisc[open] .btDiscMore { display: none; }
  .btDisc p { margin: 6px 0 0; padding: 8px 10px; border-left: 3px solid var(--orange); background: var(--panel2); border-radius: 0 6px 6px 0; }
  .btDisc p + p { margin-top: 0; padding-top: 0; color: var(--text); font-weight: 700; }
  #btTabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
  #btTabs button { flex: none; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); padding: 8px 12px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
  #btTabs button[aria-selected=true] { color: var(--text); border-bottom-color: var(--orange); }
  #btResult [data-pane] { display: none; }
  .btOut[data-tab=summary] #btResult [data-pane=summary], .btOut[data-tab=chart] #btResult [data-pane=chart], .btOut[data-tab=trades] #btResult [data-pane=trades], .btOut[data-tab=settings] #btResult [data-pane=settings] { display: block; }
  .btOut[data-tab=runs] #btResult, .btOut[data-tab=runs] #btIdle, .btOut:not([data-tab=runs]) #btHistory { display: none; }
  .btOut:has(#btResult:not([hidden])) #btIdle, .btOut:has(#btProgress:not([hidden])) #btIdle { display: none; }
  .rgAllow { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 2px 0 6px; font-size: 12px; }
  .rgAllow label { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; cursor: pointer; }
  .rgTh summary { font-size: 12px; color: var(--muted); cursor: pointer; min-height: 40px; display: flex; align-items: center; }
  .rgNote { font-size: 11px; color: var(--muted); margin: 4px 0 0; }
  .btRegime { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
  .btRegime th, .btRegime td { padding: 4px 6px; text-align: right; border-bottom: 1px solid var(--line, #26324a); white-space: nowrap; }
  .btRegime th:first-child, .btRegime td:first-child { text-align: left; }
  .btRegime tr.off td { color: var(--muted); }
  .btRegimeWrap { overflow-x: auto; }
  #backtest .stCard { margin-top: 0; padding: 10px 12px; }
  #backtest #btFormCard { padding: 0; }
  #backtest .row { min-height: 34px; }
  #backtest .row input, #backtest .row select { width: 170px; max-width: 100%; }
  #backtest #btStartFrom, #backtest #btAlgo, #backtest #btSymbol { width: 100%; max-width: 220px; text-overflow: ellipsis; }
  #backtest #btStartFrom { max-width: 100%; text-align: left; }
  #backtest .row:has(#btStartFrom) { flex-direction: column; align-items: stretch; gap: 4px; padding: 2px 0 6px; }
  #btAlgoNote { margin: 2px 0 6px; color: var(--orangeText); }
  .btField { margin: 6px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
  .btDates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
  .btDates label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); min-width: 0; }
  .btDates input { width: 100%; min-width: 0; min-height: 36px; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 13px; color-scheme: dark; }
  .btDates input:focus { outline: none; border-color: var(--orange); }
  #backtest .row input[type=checkbox] { width: 38px; }
  #backtest .row label { flex: 1 1 auto; min-width: 0; }
  #btParams h4 { margin: 10px 0 2px; font-size: 12px; }
  #btRes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; margin: 4px 0 6px; }
  #btRes button { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; min-width: 0; }
  #btRes button b { font-size: 13px; }
  #btRes button small { font-size: 11px; font-weight: 600; line-height: 1.3; opacity: .85; text-align: left; }
  #btRes button:only-of-type { grid-column: 1 / -1; }
  #backtest .mpSeg button { border: 1px solid var(--border); background: none; color: var(--muted); padding: 7px 12px; font-weight: 700; cursor: pointer; border-radius: 8px; text-align: left; }
  #backtest .mpSeg button.on { background: var(--accent, #2962ff); color: #fff; border-color: transparent; }
  #btRange { display: flex; gap: 6px; margin: 4px 0 2px; flex-wrap: wrap; }
  #btRange button { padding: 5px 10px; font-size: 12px; }
  #btErr { margin: 0; }
  #btConnect { margin: 6px 0; }
  #btEstimate { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); font-size: 12px; line-height: 1.4; }
  #btErr.show { max-height: 6.2em; overflow-y: auto; }
  #backtest[data-state=ready] #btEstimate { border-left: 3px solid var(--bull); }
  #backtest[data-state=needs-confirm] #btEstimate, #backtest[data-state=cancelled] #btEstimate { border-left: 3px solid var(--orange); }
  #backtest[data-state=error] #btEstimate { border-left: 3px solid var(--bear); }
  #btEstimate .btNote { color: var(--orangeText); font-weight: 700; }
  #btRun { width: 100%; min-height: 44px; background: var(--orange); border-color: var(--orange); color: var(--onOrange); font-weight: 800; }
  #btRun:disabled { opacity: .45; cursor: not-allowed; }
  #btIdle { padding: 28px 4px; color: var(--muted); font-size: 13px; line-height: 1.55; }
  #btIdle p { display: none; margin: 0; }
  #backtest[data-state=empty] #btIdle p[data-s=empty], #backtest[data-state=estimating] #btIdle p[data-s=estimating], #backtest[data-state=ready] #btIdle p[data-s=ready], #backtest[data-state=needs-confirm] #btIdle p[data-s="needs-confirm"], #backtest[data-state=error] #btIdle p[data-s=error], #backtest[data-state=blocked] #btIdle p[data-s=blocked], #backtest[data-state=cancelled] #btIdle p[data-s=cancelled] { display: block; }
  #btProgress { display: flex; flex-direction: column; gap: 8px; }
  #btProgress .btProgTop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  #btPct { margin-left: 8px; font-weight: 800; color: var(--orangeText); font-variant-numeric: tabular-nums; }
  .btProgHint { color: var(--muted); font-size: 12px; }
  #btBar { height: 10px; border-radius: 4px; background: var(--panel); overflow: hidden; border: 1px solid var(--border); }
  #btBar i { display: block; height: 100%; width: 0; background: var(--orange); transition: width .4s; }
  #btWord { font-weight: 700; }
  .btResHead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 32px; }
  .btResHead .spacer { flex: 1; }
  #btResTitle { font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
  #btSimChip { background: rgba(255,107,0,.12); color: var(--orangeText); border-color: rgba(255,107,0,.4); }
  #btCostToggle button { padding: 5px 10px; font-size: 12px; }
  #btCsv { color: var(--orangeText); font-weight: 700; font-size: 12.5px; text-decoration: underline; min-height: 24px; display: inline-flex; align-items: center; }
  #btStats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
  #btStats > div { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--panel); min-width: 0; }
  #btStats small { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 2px; }
  #btStats b { display: block; font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; font-family: ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap: anywhere; }
  #btStats b small { display: block; margin: 3px 0 0; font-size: 10.5px; font-weight: 500; font-family: inherit; }
  #btStats b.up, #btTrades .up { color: var(--bull); }
  #btStats b.dn, #btTrades .dn { color: var(--bear); }
  #btWarn { color: var(--muted); font-size: 12px; margin: 6px 0 12px; padding: 8px 12px; border-left: 3px solid var(--border); background: var(--panel); border-radius: 0 8px 8px 0; }
  #btWarn:empty { display: none; }
  #btWarn div { padding: 2px 0; line-height: 1.45; }
  .btChartTitle { margin: 12px 0 6px; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--text); font-weight: 800; }
  .btChartTitle:first-child { margin-top: 4px; }
  .btChartTitle small { margin-left: 8px; text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 500; font-size: 11.5px; }
  #btPrice { height: 380px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
  #btEquity { height: 180px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
  #btDD { height: 90px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
  .btScroll { overflow: auto; max-height: 640px; border: 1px solid var(--border); border-radius: 10px; }
  #btTrades { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  #btTrades th { position: sticky; top: 0; z-index: 1; background: var(--panel2); color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; user-select: none; }
  #btTrades th button { all: unset; cursor: pointer; display: block; width: 100%; }
  #btTrades th button:focus-visible, #btTrades tbody tr:focus-visible, #btTabs button:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
  #btTrades th[aria-sort=ascending] button::after { content: " ▲"; }
  #btTrades th[aria-sort=descending] button::after { content: " ▼"; }
  #btTrades th, #btTrades td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
  #btTrades td { font-variant-numeric: tabular-nums; }
  #btTrades td.side { font-weight: 800; text-transform: capitalize; }
  #btTrades td.why { color: var(--muted); }
  #btTrades td.num, #btTrades th.num { text-align: right; }
  #btTrades tbody tr { cursor: pointer; }
  #btTrades tbody tr:hover { background: var(--panel); }
  #btTradesMore { margin-top: 8px; }
  #btUsed { border-collapse: collapse; font-size: 12.5px; min-width: min(100%, 420px); }
  #btUsed th, #btUsed td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
  #btUsed th { color: var(--muted); font-weight: 600; white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: 12.5px; }
  #btUsed td { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  .btRow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); margin-top: 6px; font-size: 12px; }
  .btRow .btWhat { flex: 1 1 200px; min-width: 0; }
  .btRow .btWhat b { display: block; }
  .btRow .btWhat small { color: var(--muted); }
  .btRow .btAct { display: flex; gap: 6px; margin-left: auto; }
  .btRow .sbtn { padding: 5px 10px; font-size: 12px; }
  .btRow.cur { border-color: var(--orange); }
  #btHistEmpty { color: var(--muted); font-size: 12.5px; padding: 8px 0; }
  /* --pbH is the phone tab bar's height (0 when there is none), so Run backtest is never hidden behind it. */
  @media (max-height: 600px) { #backtest { flex: none; height: calc(100vh - var(--hdrB, 0px) - var(--pbH, 0px)); height: calc(100dvh - var(--hdrB, 0px) - var(--pbH, 0px)); } }
  @media (max-width: 1180px) { #btStats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 900px) {
    #backtest { padding: 0; flex: none; height: calc(100vh - var(--hdrB, 0px) - var(--pbH, 0px)); height: calc(100dvh - var(--hdrB, 0px) - var(--pbH, 0px)); }
    .btGrid { display: flex; flex-direction: column; max-width: none; }
    .btScrollArea { display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 10px 16px; }
    #btFormCard { display: block; border-bottom: 1px solid var(--border); border-radius: 10px; overflow: visible; margin-bottom: 12px; }
    #btForm { overflow: visible; }
    .btOut { overflow: visible; padding-bottom: 0; }
    .btOutHead { position: static; }
    .btRunBar { flex: none; border-radius: 0; border-width: 1px 0 0; padding: 8px 10px max(8px, env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(0,0,0,.35); }
    .btScroll { max-height: 420px; }
    #btIdle { padding: 8px 2px; }
  }
  @media (max-width: 800px) {
    #btStats b { font-size: 18px; }
    #btPrice { height: 260px; }
    #btEquity { height: 150px; }
    #btDD { height: 70px; }
    #backtest button, #backtest select, #backtest input:not([type=checkbox]) { min-height: 40px; }
    #backtest label.row { min-height: 40px; }
    #btCsv, .btDisc summary, .btSec > summary { min-height: 40px; }
    #backtest .row input, #backtest .row select { width: 150px; }
    #btRun { min-height: 44px; }
    #btEstimate { font-size: 11.5px; padding: 4px 8px; }
    #btTabs button { padding: 8px 8px; font-size: 12px; }
    #btTrades th button { min-height: 40px; display: flex; align-items: center; }
    #btTrades th.num button { justify-content: flex-end; }
  }
  body.tut #charts, body.tut #grid, body.tut aside:where(#sidePanel), body.tut #asideOpen, body.tut #paneBar, body.tut #instBar, body.tut #restoreStrip, body.tut #mLayoutRow { display: none !important; }
  body.opts #charts, body.opts #grid, body.opts aside:where(#sidePanel), body.opts #asideOpen, body.opts #paneBar, body.opts #instBar, body.opts #restoreStrip, body.opts #mLayoutRow { display: none !important; }
  #options { flex: 1; min-height: 0; display: flex; background: var(--bg); }
  #options[hidden], body.embed #options { display: none !important; }
  #tutorials { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); padding: 18px 18px 24px; }
  #tutorials[hidden], body.embed #tutorials { display: none !important; }
  #tutorials .tutWrap { max-width: 1280px; margin: 0 auto; }
  #tutorials h3 { margin: 0; font-size: 16px; font-weight: 900; }
  #tutSwitch { display: flex; max-width: 420px; gap: 4px; padding: 3px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); }
  #tutSwitch button { flex: 1; background: none; border: 0; border-radius: 999px; color: var(--muted); padding: 8px 12px; font-size: 13px; font-weight: 800; }
  #tutSwitch button[aria-pressed=true] { background: var(--orange); color: var(--onOrange); }
  .tutCols { display: block; }
  #tutorials[data-tab=videos] #tutStepsSec, #tutorials[data-tab=steps] #tutVideos { display: none; }
  .tutColHead h3 { display: none; }
  #tutStepsSec .tutColHead { display: none; }
  #tutVideos .tutColHead { justify-content: flex-end; }
  #tutVideos .tutColHead[hidden], #tutVideos .tutColHead:has(#tutUnwatched[hidden]) { display: none; }
  .tutColHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
  #tutNote { color: var(--muted); font-size: 13px; padding: 2px 0 10px; }
  #tutNote[hidden] { display: none; }
  #tutUnwatched { background: var(--panel2); border: 1px solid var(--border); border-radius: 999px; color: var(--text); padding: 4px 12px; font-size: 12px; }
  #tutUnwatched[aria-pressed=true] { border-color: var(--orange); color: var(--orangeText); }
  #tutList { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
  .tutCat { min-width: 0; }
  .tutCatHead { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 15px; font-weight: 900; overflow-wrap: anywhere; }
  .tutCatHead .tutCatN { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); }
  .tutCatSub { margin: -4px 0 10px; font-size: 12px; color: var(--muted); }
  .tutGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; align-items: start; }
  .tutCard { border: 1px solid var(--border); border-radius: 10px; background: var(--panel2); overflow: hidden; min-width: 0; }
  .tutCard.open { grid-column: 1 / -1; }
  .tutCard.open .tutPoster { display: none; }
  .tutHead { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 0 0 10px; }
  .tutPoster { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--panel); object-fit: cover; }
  .tutHead b { display: block; font-size: 13px; margin: 8px 10px 0; overflow-wrap: anywhere; }
  .tutHead .tutLine { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 10px 0; font-size: 12px; color: var(--muted); }
  .tutState:not(:empty) { color: var(--bull); }
  .tutCard:not(.open) .tutWritten { display: none; }
  .tutAllRow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 10px; font-size: 12px; color: var(--muted); }
  .tutAllRow .tutAll { margin: 0; }
  #tutPath h4 { margin: 0 0 8px; font-size: 13px; font-weight: 800; }
  .tutWritten { display: block; background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 12px; padding: 0 10px 10px; }
  .tutPlay { margin-left: auto; border: 1px solid var(--orange); border-radius: 999px; color: var(--orangeText); padding: 2px 12px; font-weight: 800; }
  .tutBody { padding: 0 10px 10px; }
  .tutBody[hidden] { display: none; }
  .tutVideo { width: 100%; display: block; border-radius: 8px; background: #000; max-height: max(180px, calc(100vh - 480px)); }
  .tutCard { scroll-margin-top: 64px; }
  #tutPath .tutChips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 12px; font-size: 13px; }
  #tutPath .tutChips > span { color: var(--muted); }
  #tutPath .tutPathHead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; }
  #tutPath .tutPathHead b { flex: 1; min-width: 160px; }
  #tutPath .tutPathHead button, #tutPath .tutChips button { background: var(--panel2); border: 1px solid var(--border); border-radius: 999px; color: var(--text); padding: 4px 12px; font-size: 12px; }
  #tutPath button.on, #tutPath #tutResume { border-color: var(--orange); color: var(--orangeText); }
  #tutSteps, #tutGuides { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  #tutGuides { margin-top: 8px; } #tutGuides[hidden] { display: none; }
  .tutPathDone { margin: 0; font-size: 13px; color: var(--muted); }
  .stepItem { border: 1px solid var(--border); border-radius: 10px; background: var(--panel2); min-width: 0; }
  .stepItem.done .stepHead b { color: var(--muted); }
  .stepHead { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 10px; }
  .stepNum { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--muted); }
  .stepItem.done .stepNum { background: var(--bull); border-color: var(--bull); color: var(--onBull); }
  .stepText { flex: 1; min-width: 0; }
  .stepText b { display: block; font-size: 13px; overflow-wrap: anywhere; }
  .stepText .stepDesc { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
  .stepHead small { flex: none; font-size: 11px; color: var(--muted); }
  .stepItem.done .stepHead small { color: var(--bull); }
  .stepBody { padding: 0 10px 10px 44px; }
  .stepBody[hidden] { display: none; }
  .stepItem[hidden] { display: none; }
  .tutAll { display: block; margin: 0; background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 12px; padding: 4px 8px; }
  #tutTrack { background: var(--panel2); border: 1px solid var(--border); border-radius: 999px; color: var(--text); padding: 5px 12px; font-size: 12px; max-width: 100%; }
  .tutSteps { margin: 0 0 8px; padding-left: 18px; font-size: 12px; }
  .tutSteps li { margin: 3px 0; }
  .tutTry, .tutRead { background: var(--panel); border: 1px solid var(--orange); border-radius: 999px; color: var(--orangeText); padding: 5px 14px; font-size: 12px; margin-right: 6px; }
  @media (max-width: 800px) {
    #tutorials { flex: 1 0 auto; overflow: visible; min-height: 60vh; padding: 14px 12px; }
    body.tut:not(.embed) #center { flex: 1 0 auto; }
    .tutGrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  }
  #connections { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); padding: 22px 18px 60px; }
  #connections[hidden] { display: none; }
  body.embed #connections { display: none !important; }
  #connections .cnWrap { max-width: 1040px; margin: 0 auto; }
  #connections h2 { margin: 0 0 4px; font-size: 20px; font-weight: 900; }
  #connections .cnSub { color: var(--muted); font-size: 13px; margin: 0 0 18px; max-width: 640px; }
  #cnGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
  .cnCard { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
  .cnCard.flash { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(255,107,0,.25); }
  .cnCard.soon { opacity: .72; }
  .cnHead { display: flex; align-items: center; gap: 10px; }
  .cnHead h3 { margin: 0; font-size: 15px; }
  .cnChip { margin-left: auto; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--panel2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
  .cnChip.ok { background: rgba(0,208,132,.1); color: var(--bull); border-color: rgba(0,208,132,.3); }
  .cnChip.paper { background: rgba(255,107,0,.1); color: var(--orangeText); border-color: rgba(255,107,0,.3); }
  .cnChip.bad { background: rgba(239,68,68,.1); color: var(--bearText); border-color: rgba(239,68,68,.35); }
  #apAuthDlg { width: min(540px, 94vw); box-shadow: 0 0 0 100vmax rgba(4,7,12,.62), 0 18px 60px rgba(0,0,0,.6); }
  #apAuthDlg h3 { font-size: 18px; }
  #apAuthDlg p { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--text); }
  #apAuthDlg a { color: var(--orangeText); }
  #apAuthDlg .apAuthBtns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
  #apAuthDlg .apAuthBtns button { min-width: 110px; padding: 10px 18px; border-radius: 9px; font-weight: 800; letter-spacing: .4px; border: 1px solid var(--border); background: var(--panel2); color: var(--text); }
  #apAuthDlg .apAuthBtns button.primary { background: var(--orange); border-color: var(--orange); color: var(--onOrange); }
  #apAuthDlg .apAuthBtns button:disabled { opacity: .5; cursor: not-allowed; }
  .cnCard p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
  .cnCard .cnMeta { color: var(--text); font-size: 12px; }
  .cnCard .cnDs { color: var(--muted); font-size: 12px; margin: 2px 0; }
  .cnCard .cnDs b { color: var(--text); font-weight: 700; }
  /* Starts below the pane's own toolbar (#paneBar: instrument, Order ticket, Chart trader, START/STOP),
     and lets clicks through everywhere but the box, so the chart's controls and Chart trader's order
     lines stay usable under the prompt. --dsTop is the toolbar's measured bottom (dsPaint). */
  #grid .pane .dsGate { position: absolute; left: 0; right: 0; bottom: 0; top: var(--dsTop, 0px); z-index: 3; display: flex; align-items: center; justify-content: center; padding: 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); pointer-events: none; }
  #grid .pane .dsGate .dsBox { pointer-events: auto; }
  #grid .pane .dsGate[hidden] { display: none; }
  #grid .pane .dsGate .dsBox { max-width: 340px; text-align: center; padding: 18px 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel, var(--bg)); box-shadow: 0 4px 18px rgba(0,0,0,.18); }
  #grid .pane .dsGate h4 { margin: 0 0 6px; font-size: 15px; font-weight: 800; }
  #grid .pane .dsGate p { margin: 0 0 12px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
  #grid .pane .dsGate button { min-height: 36px; padding: 0 16px; border-radius: 8px; border: 0; background: var(--accent, #2962ff); color: #fff; font-weight: 700; cursor: pointer; }
  .cnBtns { display: flex; gap: 8px; flex-wrap: wrap; }
  .cnForm { display: flex; flex-direction: column; gap: 8px; }
  .cnForm label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
  .cnForm input, .cnForm textarea { background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 8px 10px; font: 12px ui-monospace, monospace; }
  .wbForm { display: flex; flex-direction: column; gap: 8px; }
  .wbForm label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
  .wbForm label.wbEnv { flex-direction: row; align-items: center; gap: 8px; }
  .wbForm input[type=text], .wbForm input[type=password], .wbQuote input { background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 8px 10px; font: 12px ui-monospace, monospace; }
  .wbBody { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
  .wbAcct { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
  .wbAcct b { color: var(--text); }
  .wbPos { display: flex; gap: 10px; flex-wrap: wrap; }
  .wbQuote { display: flex; gap: 8px; align-items: center; }
  .cnBtns button { border: 1px solid var(--border); background: var(--panel2); color: var(--text); border-radius: 9px; padding: 8px 14px; font-weight: 700; font-size: 12.5px; }
  .cnBtns button.go { background: var(--orange); border-color: var(--orange); color: var(--onOrange); }
  .cnBtns button:disabled { opacity: .45; cursor: not-allowed; }
  .cnBtns button.danger { color: var(--bearText); }
  .cnCard details { border-top: 1px solid var(--border); padding-top: 8px; }
  .cnCard .cnChecked { color: var(--muted); font-size: 11px; margin: 4px 0 0; }
  .cnCard summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--text); }
  .cnCard ol { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
  .cnCard ol li { margin-bottom: 4px; }
  .cnCard a { color: var(--orangeText); }
  .cnCard input { background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font-size: 13px; width: 100%; box-sizing: border-box; }
  #cn-risk .check { margin-top: 6px; align-items: center; }
  #cn-risk .check input { width: auto; padding: 0; margin: 0; }
  #cn-risk h4 { margin: 6px 0 4px; }
  /* Risk limits sits first in Connections but starts folded, so the broker cards are in view on arrival (☰ Risk limits… opens it). */
  #riskSum { cursor: pointer; list-style: none; min-height: 32px; }
  #riskSum::-webkit-details-marker { display: none; }
  #riskSum h3::before { content: '▸ '; color: var(--muted); }
  #riskDet[open] #riskSum h3::before { content: '▾ '; }
  #riskDet[open] #riskSum { margin-bottom: 10px; }
  #riskSection { display: flex; flex-direction: column; gap: 10px; }
  .cnMsg { font-size: 12px; min-height: 0; }
  .cnForm input[aria-invalid=true], #cForm .in[aria-invalid=true] { border-color: #fca5a5; }
  @media (max-width: 800px) { .cnForm input, .cnForm textarea, .cnBtns button, .cnCard input:not([type=checkbox]):not([type=radio]) { min-height: 44px; font-size: 16px; } }
  .cnCard a.ext { padding: 15px 0; margin: -15px 0; }
  .cnCard summary { padding: 14px 0; margin: -6px 0; }
  .cnSoon { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12.5px; }
  .cnMsg.bad { color: var(--bearText); } .cnMsg.good { color: var(--bull); }
  .cnFoot { margin-top: 18px; color: var(--muted); font-size: 12.5px; }
  .cnFoot button { background: none; border: 1px solid var(--border); color: var(--text); border-radius: 9px; padding: 8px 14px; font-weight: 700; font-size: 12.5px; margin-right: 8px; }
  @media (max-width: 800px) { #hdrNav { max-width: 100%; overflow-x: auto; scrollbar-width: none; } #hdrNav::-webkit-scrollbar { display: none; } #hdrNav button { flex: none; padding: 5px 10px; } }
  @media (max-width: 800px) { #connections { padding: 16px 12px 70px; } #cnGrid { grid-template-columns: 1fr; } }
  /* Connections picker: logo + name tiles in sections; a tile opens that connection's own card in #cnFocus. */
  #cnPick[hidden], #cnFocus[hidden], #cnGrid[hidden], #cnExtra[hidden], #connections #cn-risk[hidden], #cnLead[hidden] { display: none; }
  .cnFind { display: flex; align-items: center; gap: 8px; margin: 18px 0 4px; max-width: 420px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; }
  .cnFind:focus-within { border-color: var(--orange); }
  .cnFind svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
  .cnFind input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font-size: 14px; padding: 10px 0; }
  .cnSec { margin-top: 22px; }
  .cnSec[hidden] { display: none; }
  .cnSecHead { margin: 0 0 10px; font-size: 16px; font-weight: 800; color: var(--text); }
  .cnTileGrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
  .cnTileGrid.cnBig { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cnTile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-width: 0; height: 104px; padding: 12px 8px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; text-align: center; }
  .cnTile:hover { border-color: var(--muted); background: var(--panel2); }
  .cnTile:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
  .cnTile[hidden] { display: none; }
  .cnTile.soon { opacity: .6; }
  .cnBig .cnTile { flex-direction: row; justify-content: flex-start; gap: 14px; height: 84px; padding: 12px 18px; text-align: left; }
  .cnTileName { font-size: 12.5px; font-weight: 700; line-height: 1.25; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
  .cnBig .cnTileName { font-size: 14px; -webkit-line-clamp: 1; }
  .cnTileText { display: flex; flex-direction: column; min-width: 0; padding-right: 64px; }
  .cnTileSub { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cnLogo { width: 36px; height: 36px; flex: none; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; letter-spacing: -.02em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
  .cnLogo svg { width: 20px; height: 20px; fill: currentColor; }
  .cnBig .cnLogo { width: 42px; height: 42px; font-size: 16px; }
  .cnLogo[data-logo] { overflow: hidden; }
  .cnLogo[data-brand=tradestation], .cnLogo[data-brand=edge], .cnLogo[data-brand=webull] { box-shadow: inset 0 0 0 1px var(--border); }
  .cnLogo[data-logo] img { display: block; width: 62%; height: 62%; object-fit: contain; }
  .cnLogo[data-logo=fill] img { width: 100%; height: 100%; object-fit: cover; }
  .cnBadge { position: absolute; top: 6px; right: 6px; font-size: 10px; font-weight: 800; line-height: 1; padding: 3px 6px; border-radius: 999px; background: rgba(0,208,132,.12); color: var(--bull); border: 1px solid rgba(0,208,132,.35); }
  .cnBadge.soon { background: var(--panel2); color: var(--muted); border-color: var(--border); }
  .cnHead .cnLogo { width: 28px; height: 28px; border-radius: 7px; font-size: 11px; }
  .cnHead .cnLogo svg { width: 16px; height: 16px; }
  .cnNeed { margin: 18px 0 0; text-align: center; }
  .cnNeed .linkBtn { font-size: 13px; color: var(--text); }
  .cnCard:has(> .cnForm) > .cnBtns { display: none; }
  .cnCrumb { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
  .cnCrumb b { color: var(--text); font-weight: 700; }
  .cnCrumb .cnFocusBack { margin: 0; }
  .cnFocusBack { margin: 0 0 12px; border: 1px solid var(--border); background: none; color: var(--text); border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: 13px; }
  #cnFocus { max-width: 640px; }
  #cnFocus #cnGrid, #cnFocus #cnExtra { display: block; }
  #cnGrid > :not(.cnOn), #cnExtra > :not(.cnOn), #cnAiApps > .aiCard:not(.cnOn) { display: none; }
  #cnAi.cnAiOne { margin-top: 0; }
  #cnAi.cnAiOne > h2, #cnAi.cnAiOne > .cnSub { display: none; }
  .cnNeedList { display: flex; flex-direction: column; gap: 8px; }
  .cnNeedList button { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--border); background: var(--panel2); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 13px; }
  .cnNeedList button b { display: block; }
  .cnNeedList button span.cnNeedTxt { color: var(--muted); font-size: 12px; }
  .aiTiles .aiSec { margin-top: 14px; }
  .aiBack { margin: 4px 0 10px; }
  .aiCardsOne > .aiCard:not(.cnOn) { display: none; }
  .aiCardsOne[hidden], .aiBack[hidden], .aiTiles[hidden] { display: none; }
  @media (max-width: 1100px) { .cnTileGrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
  @media (max-width: 640px) { .cnTileGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .cnTile { height: 116px; padding: 26px 4px 8px; justify-content: flex-start; gap: 8px; } .cnBadge { top: 4px; right: 4px; font-size: 9px; padding: 2px 5px; } .cnBig .cnTile { padding: 10px 14px; justify-content: flex-start; } .cnTileName { font-size: 12px; } .cnTileGrid.cnBig { grid-template-columns: 1fr; } .cnBig .cnTile { height: 72px; } .cnFind { max-width: none; } .cnFind input { font-size: 16px; } }
  #agentDlg .cnTileGrid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  @media (max-width: 640px) { #agentDlg .cnTileGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .prWrap { max-width: 1360px; margin: 0 auto; padding: var(--pd-space-4) var(--pd-space-4) var(--pd-space-8); }
  #prTop { display: flex; align-items: center; gap: var(--pd-space-3); flex-wrap: wrap; margin-bottom: var(--pd-space-2); }
  #prTop h2 { margin: 0; font-size: var(--pd-fs-xl); letter-spacing: -.02em; }
  #prTop .prFind { display: flex; align-items: center; gap: 6px; flex: 1 1 260px; max-width: 520px; margin-left: auto; min-width: 0; }
  #prSearch { flex: 1 1 auto; background: var(--pd-raised); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); color: var(--pd-text); font: inherit; font-size: var(--pd-fs-md); padding: 9px 12px; min-width: 0; }
  #prSearch:focus { outline: none; border-color: var(--pd-accent); }
  #prTicket { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
  #prTicket button.prGo { border: 0; font: 700 14px inherit; font-family: inherit; cursor: pointer; }
  #prTicket button.prGo:disabled { opacity: .45; cursor: not-allowed; }
  .pmWallet { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
  .pmWallet b { color: var(--text); font-family: 'JetBrains Mono', monospace; }
  .pmWallet button { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
  .pmDisc h4 { margin: 0 0 6px; font-size: 14px; }
  .pmDisc p { font-size: 12px; line-height: 1.55; color: #c8d3e0; margin: 0 0 8px; }
  .pmDisc label { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--text); margin: 10px 0; cursor: pointer; }
  .pmForm { display: flex; flex-direction: column; gap: 8px; }
  .pmFrame { width: 100%; height: 640px; border: 0; border-radius: 8px; margin-top: 8px; background: #0b1017; }
  .pmRow { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
  .pmRow select, .pmRow input { background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font: inherit; padding: 6px 8px; min-width: 0; width: 55%; }
  .pmReview { background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-size: 12px; line-height: 1.6; display: flex; flex-direction: column; gap: 4px; }
  .pmReview[hidden] { display: none; }
  #prConfirm { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 15px; font-weight: 700; line-height: 1.4; background: var(--panel); color: var(--text); border-bottom: 3px solid var(--bull); box-shadow: 0 6px 18px rgba(0,0,0,.45); }
  #prConfirm[hidden] { display: none; }
  @media (max-width: 800px) { #prConfirm { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 120; padding-bottom: max(10px, env(safe-area-inset-bottom)); border-bottom: 0; border-top: 3px solid var(--bull); box-shadow: 0 -6px 18px rgba(0,0,0,.45); } #prConfirm.real { border-top-color: var(--orange); } }
  #prConfirm.real { border-bottom-color: var(--orange); }
  @media (max-width: 800px) { #predictions.prcOn .prWrap { padding-bottom: 96px; } }
  #prConfirm .prcText { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
  #prConfirm .badge[data-acct-label], #dock .ccpCard .t [data-acct-label], #dock .ccpGroup h4 [data-acct-label] { text-transform: none; white-space: nowrap; }
  #prConfirm .prcX { flex: none; min-width: 44px; min-height: 44px; background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); font-size: 18px; cursor: pointer; }
  .pmMsg { font-size: 12px; color: var(--muted); line-height: 1.5; }
  .pmMsg.bad { color: var(--msgBad); }
  .oaGo { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; margin-top: 10px; }
  .oaGo button { white-space: nowrap; padding: 9px 8px; font-size: 12px; min-height: 40px; }
  .prNoteBox { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 8px 0 0; }
  #prNav { display: flex; gap: 2px; padding: 3px; background: var(--pd-raised); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); }
  #prNav button { background: none; border: 0; color: var(--pd-muted); font: 600 var(--pd-fs-sm) inherit; font-family: inherit; padding: 6px 12px; border-radius: var(--pd-radius-xs); cursor: pointer; min-height: 32px; }
  .prInvPill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 14px; border: 1px solid var(--pd-accent); border-radius: 999px; background: none; color: var(--pd-accent); font: 700 var(--pd-fs-sm) inherit; font-family: inherit; white-space: nowrap; cursor: pointer; }
  .prInvPill svg { width: 16px; height: 16px; flex: none; }
  .prInvPill.on { background: var(--pd-accent); color: #fff; }
  .prInvPill[hidden] { display: none; }
  #prNav button.on { color: var(--pd-text); background: var(--pd-surface); box-shadow: inset 0 -2px 0 var(--pd-accent); }
  #umCreate[hidden], #umNavBtn[hidden] { display: none; }
  .umBtn { background: var(--pd-accent); color: var(--pd-on-accent); border: 0; border-radius: var(--pd-radius-sm); font: 700 var(--pd-fs-md) inherit; font-family: inherit; padding: 10px 16px; min-height: 44px; cursor: pointer; }
  .umBtn:hover:not(:disabled) { background: var(--pd-accent-strong); }
  .umBtn.sm { min-height: 36px; padding: 6px 14px; font-size: var(--pd-fs-sm); }
  .umBtn:disabled { opacity: .45; cursor: not-allowed; }
  .umGhost { background: transparent; color: var(--pd-text); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); font: 600 var(--pd-fs-sm) inherit; font-family: inherit; padding: 8px 12px; min-height: 40px; cursor: pointer; }
  .umGhost:hover { border-color: var(--pd-accent); color: var(--pd-accent); }
  .umLinkBtn { background: none; border: 0; color: var(--pd-muted); text-decoration: underline; font: inherit; font-size: var(--pd-fs-sm); cursor: pointer; padding: 8px 0; text-align: left; }
  #umWiz { position: fixed; inset: 0; z-index: 140; background: color-mix(in srgb, var(--bg) 86%, transparent); display: flex; justify-content: center; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  #umWiz[hidden], #umList[hidden], #umView[hidden] { display: none; }
  .umSheet { background: var(--pd-surface); border: 1px solid var(--pd-border); width: 100%; max-width: 560px; min-height: 100%; padding: var(--pd-space-4) var(--pd-space-4) calc(var(--pd-space-8) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--pd-space-4); box-sizing: border-box; min-width: 0; }
  .umSheet h2 { margin: 0; font-size: var(--pd-fs-2xl); letter-spacing: -.02em; line-height: 1.15; }
  @media (min-width: 801px) { #umWiz { align-items: flex-start; padding: 48px 24px; } .umSheet { min-height: 0; border-radius: var(--pd-radius-lg); box-shadow: var(--pd-shadow-card); } }
  .umTop { display: flex; align-items: center; justify-content: space-between; gap: var(--pd-space-3); }
  .umStep { color: var(--pd-muted); font-size: var(--pd-fs-sm); }
  .umNote { color: var(--pd-muted); font-size: var(--pd-fs-sm); line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
  .umH { margin: var(--pd-space-2) 0 0; font-size: var(--pd-fs-md); }
  .umTpl, .umGames, .umForm, .umGrid { display: flex; flex-direction: column; gap: var(--pd-space-2); min-width: 0; }
  .umTplBtn, .umGame { text-align: left; background: var(--pd-raised); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); padding: var(--pd-space-3) var(--pd-space-4); color: var(--pd-text); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 56px; }
  .umTplBtn b, .umGame b { font-size: var(--pd-fs-lg); }
  .umTplBtn span, .umGame span { color: var(--pd-muted); font-size: var(--pd-fs-sm); }
  .umTplBtn:hover, .umTplBtn.on, .umGame:hover { border-color: var(--pd-accent); }
  .umGames { max-height: 46vh; overflow-y: auto; }
  .umPicked { background: var(--pd-raised); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); padding: var(--pd-space-3) var(--pd-space-4); display: flex; flex-direction: column; gap: 2px; }
  .umPicked span { color: var(--pd-muted); font-size: var(--pd-fs-sm); }
  .umFld { display: flex; flex-direction: column; gap: 4px; font-size: var(--pd-fs-sm); color: var(--pd-muted); min-width: 0; }
  .umFld input, .umFld textarea, .umFld select, #umAmt, #umFlagReason, #umNoteIn, #umVerdict { background: var(--pd-raised); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); color: var(--pd-text); font: inherit; font-size: var(--pd-fs-lg); padding: 11px 12px; min-width: 0; width: 100%; box-sizing: border-box; }
  .umFld input:focus, .umFld textarea:focus, .umFld select:focus, #umAmt:focus { outline: none; border-color: var(--pd-accent); }
  .umFld .bad, .umFld input.bad { border-color: var(--pd-no); }
  .umErr { color: var(--pd-no); font-size: var(--pd-fs-sm); line-height: 1.4; }
  .umErr[hidden] { display: none; }
  .umBanner { background: var(--pd-raised); border: 1px solid var(--pd-border); border-left: 3px solid var(--pd-accent); border-radius: var(--pd-radius-sm); padding: var(--pd-space-3); font-size: var(--pd-fs-sm); line-height: 1.5; display: flex; gap: var(--pd-space-3); align-items: center; justify-content: space-between; overflow-wrap: anywhere; }
  .umBanner[hidden] { display: none; }
  .umBanner[data-kind=error] { border-left-color: var(--pd-no); }
  .umBanner[data-kind=hint] { color: var(--pd-muted); }
  .umSeg, .umSides, .umChips, .umRow { display: flex; gap: var(--pd-space-2); flex-wrap: wrap; align-items: center; }
  .umSeg button { flex: 1 1 0; background: var(--pd-raised); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); color: var(--pd-muted); font: 600 var(--pd-fs-md) inherit; font-family: inherit; padding: 10px; min-height: 44px; cursor: pointer; }
  .umSeg button.on { color: var(--pd-text); border-color: var(--pd-accent); box-shadow: inset 0 -2px 0 var(--pd-accent); }
  .umSides button { flex: 1 1 0; border-radius: var(--pd-radius-sm); border: 1px solid transparent; font: 700 var(--pd-fs-lg) inherit; font-family: inherit; min-height: 52px; cursor: pointer; color: var(--pd-text); overflow-wrap: anywhere; }
  .umSides .yes { background: var(--pd-yes-soft); } .umSides .no { background: var(--pd-no-soft); }
  .umSides .yes:hover:not(:disabled) { background: var(--pd-yes-hover); } .umSides .no:hover:not(:disabled) { background: var(--pd-no-hover); }
  .umSides .yes.on { background: var(--pd-yes); color: var(--pd-bg); } .umSides .no.on { background: var(--pd-no); color: var(--pd-bg); }
  .umSides button:disabled { opacity: .4; cursor: not-allowed; }
  .umFeeBox { background: var(--pd-raised); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); padding: var(--pd-space-3) var(--pd-space-4); display: flex; flex-direction: column; gap: 6px; }
  .umFeeRow { display: flex; justify-content: space-between; gap: var(--pd-space-3); font-size: var(--pd-fs-md); font-variant-numeric: tabular-nums; }
  .umFeeRow span { color: var(--pd-muted); }
  .umFeeRow.tot { border-top: 1px solid var(--pd-border); padding-top: 6px; font-size: var(--pd-fs-lg); } .umFeeRow.tot span { color: var(--pd-text); }
  .umRulesBox, .umVideoBox { background: var(--pd-raised); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); padding: var(--pd-space-2) var(--pd-space-3); }
  .umRulesBox summary, .umVideoBox summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
  .umRules { font-size: var(--pd-fs-sm); line-height: 1.55; color: var(--pd-text-2); overflow-wrap: anywhere; }
  .umVid { display: flex; flex-direction: column; gap: var(--pd-space-2); padding-top: var(--pd-space-2); }
  .umPrev { width: 100%; max-height: 320px; border-radius: var(--pd-radius-sm); background: #000; }
  .umCheck { display: flex; gap: var(--pd-space-2); align-items: flex-start; font-size: var(--pd-fs-sm); color: var(--pd-text-2); cursor: pointer; }
  .umCheck input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
  .umSuggest { display: flex; gap: var(--pd-space-3); align-items: center; justify-content: space-between; background: var(--pd-raised); border: 1px solid var(--pd-accent); border-radius: var(--pd-radius-sm); padding: var(--pd-space-2) var(--pd-space-3); font-size: var(--pd-fs-sm); }
  .umSuggest[hidden] { display: none; }
  .umCardImg { width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: var(--pd-radius-lg); border: 1px solid var(--pd-border); background: var(--pd-raised); }
  .umLink { font-family: var(--pd-font-mono); font-size: var(--pd-fs-sm); background: var(--pd-raised); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); padding: 10px 12px; overflow-wrap: anywhere; }
  .umGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--pd-space-3); }
  .umCard { text-align: left; background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); padding: var(--pd-space-3) var(--pd-space-4); display: flex; flex-direction: column; gap: var(--pd-space-2); color: var(--pd-text); font: inherit; cursor: pointer; min-width: 0; }
  .umCard:hover, .umCard:focus-visible { border-color: #31496d; }
  .umCardTop, .umMeta { display: flex; gap: var(--pd-space-3); flex-wrap: wrap; align-items: center; color: var(--pd-muted); font-size: var(--pd-fs-sm); }
  .umTitle { font-weight: 600; font-size: var(--pd-fs-lg); line-height: 1.3; overflow-wrap: anywhere; }
  .umMine { color: var(--pd-accent); font-weight: 600; }
  .umChip { background: var(--pd-raised); border: 1px solid var(--pd-border); border-radius: 999px; padding: 2px 10px; font-size: var(--pd-fs-xs); font-weight: 600; color: var(--pd-text-2); }
  .umChip.open { color: var(--pd-yes); border-color: var(--pd-yes); } .umChip.resolved { color: var(--pd-accent); border-color: var(--pd-accent); } .umChip.voided, .umChip.admin_review { color: var(--pd-no); border-color: var(--pd-no); }
  .umBar { height: 6px; border-radius: 3px; background: var(--pd-no-soft); overflow: hidden; } .umBar i { display: block; height: 100%; background: var(--pd-yes); } .umBar.lg { height: 10px; border-radius: 5px; }
  .umVHead { display: flex; align-items: flex-start; gap: var(--pd-space-3); margin-bottom: var(--pd-space-2); } .umVTtl { flex: 1 1 auto; min-width: 0; } .umVTtl h2 { margin: 4px 0 0; font-size: var(--pd-fs-2xl); letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
  #umView { max-width: 720px; display: flex; flex-direction: column; gap: var(--pd-space-3); } #umView .umChips { margin-bottom: 0; }
  .umOdds { display: flex; flex-direction: column; gap: var(--pd-space-2); } .umBig b { font-size: var(--pd-fs-3xl); letter-spacing: -.02em; font-variant-numeric: tabular-nums; } .umBig span { color: var(--pd-muted); font-size: var(--pd-fs-lg); }
  .umLive { font-weight: 600; } .umWon { color: var(--pd-yes); font-weight: 600; }
  .umStatus p, .umJoin p { margin: 0 0 var(--pd-space-2); line-height: 1.5; overflow-wrap: anywhere; }
  .umJoin, .umStatus, .umAdmin { display: flex; flex-direction: column; gap: var(--pd-space-2); }
  @media (max-width: 800px) { .umGrid { grid-template-columns: minmax(0, 1fr); } #umView, #umList { max-width: 100%; } }
  #prNav .ctxHelp { align-self: center; margin-left: 6px; }
  @media (max-width: 800px) { #prNav .ctxHelp { width: 44px; height: 44px; min-width: 44px; margin-left: 8px; } #prNav .ctxHelp::after { inset: 0; } }
  #prMarkets[hidden], #prPortfolio[hidden] { display: none; }
  .tkBox [hidden] { display: none !important; }
  .ctxPrompt { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--panel2); border: 1px solid var(--border); border-left: 3px solid var(--orange); border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.5; }
  .ctxPrompt.warn { border-left-color: var(--bear); }
  .ctxPrompt .ctxTitle { font-size: 13px; color: var(--text); }
  .ctxPrompt .ctxBody { margin: 0; color: var(--text2); }
  .ctxPrompt .ctxMore summary { cursor: pointer; color: var(--orangeText); }
  .ctxPrompt .ctxAct { width: 100%; border: 0; padding: 10px; border-radius: 8px; cursor: pointer; font: 700 13px inherit; font-family: inherit; }
  .ctxPrompt .ctxAct:disabled { opacity: .45; cursor: not-allowed; }
  .ctxPrompt .ctxX { position: absolute; top: 4px; right: 6px; background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; }
  .kuHost { display: flex; flex-direction: column; gap: 8px; }
  .kuWallet { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
  .kuWallet span { color: var(--text); font-family: 'JetBrains Mono', monospace; min-width: 0; overflow-wrap: anywhere; }
  .kuWallet button { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; flex: none; }
  .kuFund { align-items: center; text-align: center; }
  .kuFund img { background: #fff; padding: 6px; border-radius: 8px; width: 176px; height: 176px; }
  .kuAddr { display: block; font-family: 'JetBrains Mono', monospace; font-size: 11px; overflow-wrap: anywhere; color: var(--text); user-select: all; }
  .kuWarn { color: var(--bear) !important; }
  .kuPlace { background: var(--bear) !important; }
  .ku1Steps { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
  .ku1Row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
  .ku1Row.done { color: var(--text); }
  .ku1Row.fail { color: var(--bear); }
  .ku1Row.doing { color: var(--text); font-weight: 600; }
  .ku1Dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--muted); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 10px; flex: none; }
  .ku1Row.done .ku1Dot { background: var(--bull); border-color: var(--bull); color: #04130a; }
  .ku1Row.fail .ku1Dot { background: var(--bear); border-color: var(--bear); color: #fff; }
  .ku1Btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
  .ku1Practice { align-self: flex-start; margin-top: 4px; }
  .ku1Done { color: var(--bull); }
  .kuWon { color: var(--bull); }
  .kuWonNote { display: block; color: var(--muted); }
  .kuH { margin: 10px 0 4px; font-size: 12px; color: var(--muted); }
  .tkBox { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 10px; }
  .tkTitle { font-size: 12px; color: var(--muted); }
  .tkSub { font-size: 16px; font-weight: 700; }
  .tkTop { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
  .tkTabs { display: flex; gap: 14px; }
  .tkTabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: 700 14px inherit; font-family: inherit; padding: 4px 0; cursor: pointer; }
  .tkTabs button.on { color: var(--text); border-bottom-color: var(--text); }
  .tkTop select { background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 4px 6px; font: inherit; }
  .tkYN { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .tkYN button { border: 1px solid var(--pd-border); background: var(--pd-raised); color: var(--pd-muted); font: 700 var(--pd-fs-lg) inherit; font-family: inherit; padding: 12px 6px; border-radius: var(--pd-radius-sm); cursor: pointer; min-height: 48px; font-variant-numeric: tabular-nums; }
  .tkYN button.yes:not(.on):hover { color: var(--pd-yes); border-color: var(--pd-yes); }
  .tkYN button.no:not(.on):hover { color: var(--pd-no); border-color: var(--pd-no); }
  .tkYN button.yes.on { background: var(--pd-yes); border-color: var(--pd-yes); color: var(--pd-bg); }
  .tkYN button.no.on { background: var(--pd-no); border-color: var(--pd-no); color: var(--pd-bg); }
  .tkAmtRow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .tkAmtLbl { font-size: 18px; font-weight: 700; }
  #tkAmount { width: 50%; text-align: right; font-size: 28px; font-weight: 700; background: none; border: 0; color: var(--text); }
  .tkChips { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
  .tkCalc { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
  .tkLine { display: flex; justify-content: space-between; }
  .tkLine b { color: var(--text); }
  #tkGo, #tkPlace { width: 100%; padding: 12px; border: 0; border-radius: 8px; background: var(--orange); color: var(--onOrange); font: 700 14px inherit; font-family: inherit; cursor: pointer; }
  #predictions #tkGo { background: var(--pd-accent); color: var(--pd-on-accent); font-size: var(--pd-fs-lg); min-height: 48px; }
  #predictions #tkGo:hover:not(:disabled) { background: var(--pd-accent-strong); }
  #kuWithdraw a { color: inherit; text-decoration: underline; }
  #tkGo:disabled, #tkPlace:disabled { opacity: .45; cursor: not-allowed; }
  .tkBookTabs { display: flex; gap: 6px; margin-bottom: 8px; }
  .tkBookTabs .on { border-color: var(--orange); }
  .tkLiveRow { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; padding: 4px 0; }
  .tkAuto { align-self: flex-start; }
  #tkMode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--pd-raised); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); }
  #tkMode button { display: flex; flex-direction: column; align-items: center; gap: 1px; background: none; border: 0; border-radius: var(--pd-radius-xs); color: var(--pd-muted); padding: 7px 6px; min-height: 44px; cursor: pointer; font-family: inherit; }
  #tkMode button b { font-size: var(--pd-fs-md); }
  #tkMode button small { font-size: var(--pd-fs-xs); font-weight: 500; }
  #tkMode button { border: 1px solid var(--pd-border); color: var(--pd-text); }
  #tkMode button.on { background: var(--pd-accent); border-color: var(--pd-accent); color: var(--pd-on-accent); }
  #tkMode button.on:hover { background: var(--pd-accent-strong); }
  #tkMode button:disabled { opacity: .45; cursor: not-allowed; }
  #tkBox #tkMode button[data-v=live].on, #tkBox #tkMode button[data-v=live].on:hover { background: var(--bearSolid); border-color: var(--bearSolid); color: #fff; }
  #tkBox #tkGo.live, #tkBox #tkGo.live:hover:not(:disabled) { background: var(--bearSolid); color: #fff; }
  #prCached { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; padding: 8px 12px; border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); background: var(--pd-raised); color: var(--pd-text); font-size: 13px; }
  #prCached[hidden] { display: none; }
  #prCached button { min-height: 44px; padding: 0 14px; }
  #prMarkets[data-cached] :is(#prGrid .prCard, #prHero, #prPop, #spView) { opacity: .55; }
  .tkModeNote { font-size: var(--pd-fs-xs); color: var(--pd-muted); line-height: 1.4; margin-top: -4px; }
  .prTkAcct { display: flex; flex-direction: column; gap: var(--pd-space-2); }
  .prTkAcct .prNoteBox { margin: 0; }
  .tkLivePane { display: flex; flex-direction: column; gap: var(--pd-space-2); background: var(--pd-raised); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); padding: var(--pd-space-3); }
  .tkLivePane p { margin: 0; font-size: var(--pd-fs-sm); color: var(--pd-text-2); line-height: 1.45; }
  .tkAutoBox { display: flex; align-items: center; gap: var(--pd-space-3); margin-left: auto; flex: none; max-width: 360px; }
  @media (max-width: 760px) { .prDHead { flex-wrap: wrap; } .prDHead .tkAutoBox { margin-left: 0; max-width: none; width: 100%; } }
  .tkAutoTxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-size: var(--pd-fs-xs); color: var(--pd-muted); }
  .tkAutoTxt b { font-size: var(--pd-fs-sm); color: var(--pd-text); }
  .tkAutoState { align-self: flex-start; margin-top: 2px; font-weight: 700; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--pd-border); color: var(--pd-muted); }
  .tkAutoState[data-state=on] { color: var(--pd-yes); border-color: var(--pd-yes); }
  .tkAutoBox .tkAuto { align-self: center; flex: none; min-height: 40px; padding: 0 var(--pd-space-4); background: var(--pd-raised); border: 1px solid var(--pd-text-2); color: var(--pd-text); border-radius: var(--pd-radius-sm); font: 700 var(--pd-fs-md) inherit; font-family: inherit; cursor: pointer; }
  .tkAutoBox .tkAuto:hover { border-color: var(--pd-text); }
  .ppTicket { display: flex; flex-direction: column; gap: 8px; }
  .ppTicket button.prGo { border: 0; font: 700 14px inherit; font-family: inherit; cursor: pointer; }
  .ppTicket button.prGo:disabled { opacity: .45; cursor: not-allowed; }
  .ppSeg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .ppSeg button { background: var(--panel2); border: 1px solid var(--border); color: var(--muted); font: 700 13px inherit; font-family: inherit; padding: 8px; border-radius: 8px; cursor: pointer; }
  .ppSeg button.on.yes { color: var(--bull); border-color: var(--bull); }
  .ppSeg button.on.no { color: var(--bear); border-color: var(--bear); }
  .ppSeg button.on:not(.yes):not(.no) { color: var(--text); border-color: var(--orange); }
  .ppSum { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
  .ppSum div { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 11px; color: var(--muted); }
  .ppSum b { display: block; font-size: 20px; color: var(--text); letter-spacing: -.4px; margin-top: 3px; }
  .ppTbl { width: 100%; border-collapse: collapse; font-size: 12px; }
  .ppTbl th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
  .ppTbl td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
  .ppTbl td.num, .ppTbl th.num { text-align: right; font-family: 'JetBrains Mono', monospace; }
  .ppWrap { overflow-x: auto; }
  .ppUp { color: var(--bull); }
  .ppDown { color: var(--bear); }
  .ppMkt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
  .ppActs { display: inline-flex; gap: 6px; white-space: nowrap; }
  .ppActs .tbBtn { min-height: 44px; padding: 0 14px; border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); font-weight: 700; }
  .ppRow { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  #prCats { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--pd-border); margin: 8px 0 14px; }
  #prCats::-webkit-scrollbar { display: none; }
  #prCats button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--pd-muted); font: 600 13px/1 inherit; font-family: inherit; padding: 10px 12px; white-space: nowrap; cursor: pointer; }
  #prCats button:hover { color: var(--pd-text); }
  #prCats button.on { color: var(--pd-text); border-bottom-color: var(--pd-accent); }
  #prCats button i { font-style: normal; font-weight: 500; color: var(--pd-muted); margin-left: 5px; font-size: 11px; }
  #prLive { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--pd-muted); }
  #prLive i { width: 8px; height: 8px; border-radius: 50%; background: var(--pd-muted); flex: none; }
  #prLive b { font-weight: 700; }
  #prLive[data-state=live] i { background: var(--pd-live); animation: prPulse 1.8s ease-out infinite; }
  #prLive[data-state=live] b { color: var(--pd-live); }
  #prLive[data-state=poll] i { background: var(--pd-accent); }
  #prLive[hidden] { display: none; }
  .prStale { opacity: .55; }
  @keyframes prPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pd-live) 50%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }
  @media (prefers-reduced-motion: reduce) { #prLive[data-state=live] i { animation: none; } }
  #prLeagues { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -6px 0 12px; padding-bottom: 2px; }
  #prLeagues::-webkit-scrollbar { display: none; }
  #prLeagues button { flex: none; background: var(--pd-raised); border: 1px solid var(--pd-border); color: var(--pd-muted); font: 600 12px/1 inherit; font-family: inherit; padding: 7px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
  #prLeagues button.on { color: var(--pd-text); border-color: var(--pd-accent); }
  #prLeagues button i { font-style: normal; font-weight: 500; margin-left: 5px; font-size: 11px; }
  #prMore { color: var(--pd-muted); font-size: 12px; margin: -6px 0 10px; }
  #prMore[hidden], #spView[hidden], #prLeagues[hidden], #prGrid[hidden] { display: none; }
  #spView { display: flex; flex-direction: column; gap: 18px; }
  .spLeague { background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); overflow: hidden; }
  .spLeagueHd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 10px 14px; font-size: 13px; letter-spacing: .02em; border-bottom: 1px solid var(--pd-border); background: var(--pd-raised); }
  .spLeagueHd small { color: var(--pd-muted); font-weight: 500; font-size: 11px; }
  .spLeagueHd .spLive { color: var(--pd-live); }
  .spGame { display: grid; grid-template-columns: 112px minmax(0, 1fr) minmax(0, 2.4fr); gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--pd-border); cursor: pointer; }
  .spGame:last-child { border-bottom: 0; }
  .spGame:hover, .spGame:focus-visible { background: var(--pd-raised); outline: none; }
  .spWhen { font-size: 12px; color: var(--pd-muted); line-height: 1.4; }
  .spWhen b { display: block; color: var(--pd-text); font-size: 12px; }
  .spWhen .spNow { color: var(--pd-live); font-weight: 700; }
  .spWhen .spNow::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--pd-live); margin-right: 5px; }
  .spTeams { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .spTeam { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 600; }
  .spTeam span.spName { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .spTeam .spScore { margin-left: auto; font-family: var(--pd-font-mono); }
  .spChip { flex: none; min-width: 38px; text-align: center; font-size: 11px; font-weight: 700; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--pd-border); color: var(--pd-text); }
  .spLines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; }
  .spLine { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .spLine > small { color: var(--pd-muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
  .spPx { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-width: 0; background: var(--pd-raised); border: 1px solid var(--pd-border); color: var(--pd-text); border-radius: var(--pd-radius-sm); padding: 7px 8px; font: 600 12px/1.1 inherit; font-family: inherit; cursor: pointer; min-height: 34px; }
  .spPx:hover { border-color: var(--pd-accent); }
  .spPx span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .spPx b { flex: none; color: var(--pd-yes); font-family: var(--pd-font-mono); }
  .spLine.none .spPx { opacity: .35; pointer-events: none; }
  .spLine .spPxs { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .cbEntry { display: block; width: 100%; margin: 0 0 var(--pd-space-3); min-height: 48px; padding: 0 var(--pd-space-4); background: var(--pd-raised); color: var(--pd-text); border: 1px solid var(--pd-accent); border-radius: var(--pd-radius-sm); font: 700 var(--pd-fs-md) inherit; font-family: inherit; cursor: pointer; }
  .cbEntry:hover { background: var(--pd-surface); }
  .cbEntry[hidden], .cbQuoteBox[hidden] { display: none; }
  @media (max-width: 900px) { #prDetail #cbEntry { order: 3; margin: var(--pd-space-3) 0 0; } }
  #cbPill { position: fixed; right: var(--pd-space-4); bottom: var(--pd-space-4); z-index: 125; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--pd-accent); background: var(--pd-raised); color: var(--pd-text); font: 700 var(--pd-fs-md) inherit; font-family: inherit; box-shadow: var(--pd-shadow-card); cursor: pointer; }
  #cbSlip { position: fixed; right: var(--pd-space-4); bottom: var(--pd-space-4); z-index: 130; width: 360px; max-width: calc(100vw - 2 * var(--pd-space-4)); max-height: min(82vh, 760px); overflow-y: auto; display: flex; flex-direction: column; gap: var(--pd-space-3); padding: var(--pd-space-4); background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); box-shadow: var(--pd-shadow-card); color: var(--pd-text); }
  #cbSlip[hidden], #cbPill[hidden] { display: none; }
  #cbSlip:focus { outline: none; }
  #cbSlip .cbHd { display: flex; align-items: center; justify-content: space-between; gap: var(--pd-space-2); }
  #cbSlip h3 { margin: 0; font-size: var(--pd-fs-md); }
  #cbSlip button { font-family: inherit; }
  #cbSlip .cbX, #cbSlip .cbMore { min-width: 44px; min-height: 44px; background: var(--pd-raised); border: 1px solid var(--pd-border); color: var(--pd-text); border-radius: var(--pd-radius-sm); cursor: pointer; font: 600 var(--pd-fs-sm) inherit; font-family: inherit; padding: 0 12px; }
  #cbSlip .cbBar { display: flex; gap: var(--pd-space-2); }
  .cbNote { min-height: 0; font-size: var(--pd-fs-sm); color: var(--pd-muted); line-height: 1.4; }
  .cbNote:empty, .cbResult:empty { margin-top: calc(-1 * var(--pd-space-3)); }
  .cbNote.bad { color: var(--pd-no); }
  .cbLegs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--pd-space-2); }
  .cbLeg { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--pd-space-2); align-items: center; padding: 10px 12px; background: var(--pd-raised); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); }
  .cbLegTitle { grid-column: 1; font-size: var(--pd-fs-sm); color: var(--pd-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cbLegPick { grid-column: 1; font-weight: 600; font-size: var(--pd-fs-md); min-width: 0; overflow-wrap: anywhere; }
  .cbLegPick span { margin-left: 8px; color: var(--pd-yes); font-variant-numeric: tabular-nums; }
  .cbLegX { grid-column: 2; grid-row: 1 / span 2; min-width: 44px; min-height: 44px; background: none; border: 0; color: var(--pd-muted); font-size: 20px; cursor: pointer; border-radius: var(--pd-radius-sm); }
  .cbLegX:hover { color: var(--pd-no); }
  .cbHint { margin: 0; color: var(--pd-muted); font-size: var(--pd-fs-sm); }
  .cbHint:empty { display: none; }
  .cbStakeRow { display: flex; align-items: center; justify-content: space-between; gap: var(--pd-space-3); font-size: var(--pd-fs-sm); color: var(--pd-muted); }
  .cbStakeRow input { width: 110px; min-height: 44px; background: var(--pd-raised); color: var(--pd-text); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); padding: 0 12px; font: 600 var(--pd-fs-md) inherit; font-family: inherit; text-align: right; font-variant-numeric: tabular-nums; }
  .cbStakeRow input:focus { outline: none; border-color: var(--pd-accent); }
  #cbQuote, #cbBuy, #cbRecheck { min-height: 48px; border: 0; cursor: pointer; font: 700 var(--pd-fs-md) inherit; font-family: inherit; border-radius: var(--pd-radius-sm); }
  #cbQuote, #cbRecheck { background: var(--pd-raised); color: var(--pd-text); border: 1px solid var(--pd-border); }
  #cbQuote:disabled, #cbBuy:disabled { opacity: .45; cursor: default; }
  #cbBuy { background: var(--pd-accent); color: var(--pd-on-accent); position: sticky; bottom: 0; box-shadow: 0 -10px 12px -6px var(--pd-surface); }
  .cbQuoteBox { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); }
  .cbQuoteBox[data-stale="1"] { opacity: .55; }
  .cbQuoteBox .cbRow { display: flex; justify-content: space-between; gap: var(--pd-space-3); font-size: var(--pd-fs-sm); color: var(--pd-muted); }
  .cbQuoteBox .cbRow b { color: var(--pd-text); font-variant-numeric: tabular-nums; }
  .cbQuoteBox .cbAll { margin: 2px 0 0; font-size: var(--pd-fs-sm); color: var(--pd-text-2); }
  .cbResult { font-size: var(--pd-fs-md); line-height: 1.4; }
  .cbResult.bad { color: var(--pd-no); }
  button.cbIn { outline: 2px solid var(--pd-accent); outline-offset: -2px; }
  @media (max-width: 900px) { #cbSlip { left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 78vh; border-radius: var(--pd-radius-lg) var(--pd-radius-lg) 0 0; padding-bottom: max(var(--pd-space-4), env(safe-area-inset-bottom)); } #cbPill { left: var(--pd-space-4); right: var(--pd-space-4); bottom: max(var(--pd-space-4), env(safe-area-inset-bottom)); } }
  .spFuturesHd { margin: 4px 0 8px; font-size: 13px; color: var(--pd-muted); letter-spacing: .04em; text-transform: uppercase; }
  .spFutures { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
  @media (max-width: 760px) { .spGame { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px; } .spWhen b { display: inline; margin-right: 8px; } .spLines { grid-template-columns: minmax(0, 1fr); } .spLine { flex-direction: row; align-items: center; gap: 8px; } .spLine > small { flex: none; width: 66px; } .spLine .spPxs { flex: 1; min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; } .spPx { min-height: 44px; } #prLeagues button, #prCats button { min-height: 40px; } }
  #prGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--pd-space-3); }
  .prCard, .prSkel { background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); padding: var(--pd-space-3) var(--pd-space-4) var(--pd-space-3); display: flex; flex-direction: column; gap: var(--pd-space-3); cursor: pointer; min-width: 0; min-height: 168px; transition: border-color .12s var(--pd-ease), transform .12s var(--pd-ease); }
  .prFeat { flex: none; align-self: flex-start; font-size: 10px; font-weight: 700; color: var(--pd-yes); border: 1px solid var(--pd-yes); border-radius: 999px; padding: 1px 7px; }
  .prSk { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--pd-raised) 25%, var(--pd-border) 50%, var(--pd-raised) 75%); background-size: 200% 100%; animation: prShimmer 1.2s linear infinite; }
  #prGrid[data-state=stale]::before { content: 'Updating…'; grid-column: 1 / -1; color: var(--pd-muted); font-size: 11px; margin-bottom: -6px; }
  #prGrid[data-state=stale] .prCard { opacity: .85; }
  .prSkel { cursor: default; pointer-events: none; }
  .prSkIcon { width: 40px; height: 40px; flex: none; border-radius: 8px; }
  .prSkLine { height: 12px; margin: 4px 0; }
  .prSkLine.short { width: 60%; }
  .prSkLine.tiny { width: 45%; height: 10px; }
  .prSkPct { width: 44px; height: 24px; flex: none; }
  .prSkBtn { height: 34px; border-radius: 8px; }
  .prSkTab { display: inline-block; width: 78px; height: 28px; margin-right: 8px; border-radius: 999px; }
  .tkBookSk { display: grid; gap: 8px; padding: 6px 0; }
  .tkBookSkRow { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .tkBookSkRow .prSkLine { width: 70%; }
  @keyframes prShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
  @media (prefers-reduced-motion: reduce) { .prSk { animation: none; } }
  .prCard:hover, .prCard:focus-visible { border-color: #31496d; transform: translateY(-1px); }
  .prTitle:focus-visible, .prHeroTtl h3:focus-visible, #predictions button:focus-visible { outline: 2px solid var(--pd-accent); outline-offset: 2px; }
  .prHd { display: flex; gap: var(--pd-space-3); align-items: flex-start; min-width: 0; }
  .prIcon { width: var(--pd-media); height: var(--pd-media); border-radius: var(--pd-radius-xs); flex: none; object-fit: cover; background: var(--pd-raised); display: grid; place-items: center; color: var(--pd-muted); font-weight: 700; }
  .prIcon.sm { width: 32px; height: 32px; font-size: 13px; }
  .prIcon.lg { width: 56px; height: 56px; font-size: 20px; border-radius: var(--pd-radius-sm); }
  .prIcon.xl { width: var(--pd-media-lg); height: var(--pd-media-lg); font-size: 24px; border-radius: var(--pd-radius-sm); }
  .prTitle { flex: 1; min-width: 0; font-size: var(--pd-fs-md); font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-height: 2.6em; }
  .prPct { position: relative; flex: none; width: 64px; text-align: center; font-size: var(--pd-fs-lg); font-weight: 700; letter-spacing: -.02em; line-height: 1; padding-top: 16px; font-variant-numeric: tabular-nums; }
  .prPct small { display: block; font-size: 10px; font-weight: 500; color: var(--pd-muted); letter-spacing: 0; margin-top: 2px; }
  .prGauge { position: absolute; top: -6px; left: 0; width: 64px; height: 36px; overflow: visible; }
  .prGauge path { fill: none; stroke-width: 5; stroke-linecap: round; }
  .prGauge .bg { stroke: var(--pd-raised); stroke-dasharray: 100 100; }
  .prGauge .v { stroke: var(--pd-yes); transition: stroke-dasharray .4s var(--pd-ease); }
  .prGauge .v[data-tone=no] { stroke: var(--pd-no); }
  .prYN { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pd-space-2); margin-top: auto; }
  .prYes, .prNo { display: block; text-align: center; font: 700 var(--pd-fs-md) inherit; font-family: inherit; padding: 10px 6px; border: 0; border-radius: var(--pd-radius-sm); text-decoration: none; white-space: nowrap; cursor: pointer; font-variant-numeric: tabular-nums; min-height: 40px; overflow: hidden; text-overflow: ellipsis; }
  .prYes { background: var(--pd-yes-soft); color: var(--pd-yes); }
  .prNo { background: var(--pd-no-soft); color: var(--pd-no); }
  button.prYes:hover, a.prYes:hover { background: var(--pd-yes-hover); }
  button.prNo:hover, a.prNo:hover { background: var(--pd-no-hover); }
  .prRows { display: flex; flex-direction: column; gap: 6px; }
  .prRow { display: flex; align-items: center; gap: var(--pd-space-2); min-width: 0; }
  .prRow > span { flex: 1; min-width: 0; overflow: hidden; color: var(--pd-text-2); line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .prRow .prName { display: flex; align-items: center; gap: var(--pd-space-2); }
  .prRow .prName .prAv { align-self: flex-start; }
  .prName .prAv { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; background: var(--pd-raised); }
  .prName .prAvNone { display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--pd-muted); border: 1px solid var(--pd-border); }
  .prRow b { flex: none; width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
  .prRow .prYes, .prRow .prNo { flex: none; padding: 5px 6px; font-size: var(--pd-fs-xs); min-height: 32px; min-width: 52px; }
  @media (max-width: 560px) { .prRow .prYes, .prRow .prNo { min-height: 44px; } }
  .prChartPanel .prChance ~ .prLegend { display: none; }
  .prMoreOut { color: var(--pd-muted); font-size: var(--pd-fs-xs); }
  .prFt { display: flex; align-items: center; gap: var(--pd-space-2); color: var(--pd-muted); font-size: var(--pd-fs-xs); margin-top: auto; }
  .prFt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .prFt .prChg { margin-left: auto; }
  .prLiveTag { color: var(--pd-live); font-weight: 700; flex: none; }
  .prLiveTag::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--pd-live); margin-right: 4px; vertical-align: 1px; }
  .prChg { flex: none; font-size: var(--pd-fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
  .prChg.up { color: var(--pd-yes); } .prChg.down { color: var(--pd-no); }
  .prTick { animation: prTickUp .6s var(--pd-ease); }
  .prTick.down { animation-name: prTickDown; }
  @keyframes prTickUp { from { color: var(--pd-yes); } }
  @keyframes prTickDown { from { color: var(--pd-no); } }
  @media (prefers-reduced-motion: reduce) { .prTick { animation: none; } .prGauge .v { transition: none; } .prCard { transition: none; } }
  #prHome { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: var(--pd-space-4); margin-bottom: var(--pd-space-6); align-items: start; }
  #prHome[hidden] { display: none; }
  #prHome.solo { grid-template-columns: minmax(0, 1fr); }
  #prHero { min-width: 0; }
  #fpHero { margin: 0 0 var(--pd-space-4); min-width: 0; }
  .fpCard { background: var(--pd-surface); border: 1px solid var(--pd-accent); border-radius: var(--pd-radius-lg); box-shadow: var(--pd-shadow-card); padding: var(--pd-space-4) var(--pd-space-6); display: flex; flex-direction: column; gap: var(--pd-space-3); min-width: 0; }
  .fpKick { display: flex; align-items: center; justify-content: space-between; gap: var(--pd-space-2); }
  .fpTag { color: var(--pd-accent); font-weight: 800; font-size: var(--pd-fs-sm); text-transform: uppercase; letter-spacing: .05em; }
  .fpShare { min-height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--pd-border); background: none; color: var(--pd-text-2); font-weight: 700; cursor: pointer; }
  .fpTitle { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; cursor: pointer; }
  .fpOdds { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
  .fpOdds b { font-size: 40px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--pd-text); }
  .fpOdds > span:not(.fpChg) { color: var(--pd-muted); }
  .fpChg { font-size: var(--pd-fs-sm); font-weight: 700; color: var(--pd-muted); font-variant-numeric: tabular-nums; }
  .fpChg.up { color: var(--pd-yes); } .fpChg.down { color: var(--pd-no); }
  .fpMeta { color: var(--pd-muted); font-size: var(--pd-fs-sm); }
  .fpBtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .fpBtn { min-height: 56px; border-radius: 10px; border: 1px solid transparent; font-size: 17px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-variant-numeric: tabular-nums; }
  .fpBtn.yes { background: var(--pd-yes-soft); color: var(--pd-yes); } .fpBtn.yes:hover { background: var(--pd-yes-hover); }
  .fpBtn.no { background: var(--pd-no-soft); color: var(--pd-no); } .fpBtn.no:hover { background: var(--pd-no-hover); }
  .fpRules { color: var(--pd-text-2); font-size: var(--pd-fs-sm); }
  .fpRules summary { cursor: pointer; } .fpRules p { white-space: pre-line; color: var(--pd-muted); }
  .fpDone h3 { margin: 0 0 6px; } .fpDoneTxt { margin: 0 0 10px; font-weight: 600; }
  .fpDoneRow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .fpDoneRow .prGo { flex: 1 1 200px; } .fpDoneRow .tbBtn { min-height: 44px; }
  .fpUpsell { margin: 10px 0 0; color: var(--pd-muted); font-size: var(--pd-fs-sm); } .fpUpsell a { color: var(--pd-accent); font-weight: 700; }
  #tkChips .tbBtn.on { border-color: var(--pd-accent); color: var(--pd-text); }
  @media (max-width: 560px) { .fpCard { padding: var(--pd-space-3) var(--pd-space-4); box-shadow: none; } .fpTitle { font-size: 18px; } .fpOdds b { font-size: 34px; } }
  .prHeroCard { background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); box-shadow: var(--pd-shadow-card); padding: var(--pd-space-4) var(--pd-space-6) var(--pd-space-4); cursor: pointer; animation: prFade .2s var(--pd-ease); }
  @keyframes prFade { from { opacity: .4; } }
  .prHeroHd { display: flex; gap: var(--pd-space-3); align-items: center; min-width: 0; }
  .prHeroTtl { min-width: 0; }
  .prHeroTtl h3 { margin: 2px 0 0; font-size: var(--pd-fs-xl); line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
  .prHeroBody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--pd-space-6); margin-top: var(--pd-space-3); align-items: center; }
  .prHeroOuts { display: flex; flex-direction: column; gap: var(--pd-space-2); min-width: 0; }
  .prHeroOuts .prRow { padding: 6px 0; border-bottom: 1px solid var(--pd-border); }
  .prHeroOuts .prRow b { font-size: var(--pd-fs-lg); width: 52px; }
  .prHeroPct { display: flex; align-items: baseline; gap: 6px; }
  .prHeroPct b { font-size: var(--pd-fs-3xl); letter-spacing: -.03em; color: var(--pd-text); font-variant-numeric: tabular-nums; }
  .prHeroPct > span:not(.prChg) { color: var(--pd-muted); font-size: var(--pd-fs-md); }
  .prHeroFt { color: var(--pd-muted); font-size: var(--pd-fs-sm); margin-top: var(--pd-space-1); }
  .prHeroChart { min-width: 0; min-height: 0; display: grid; align-content: start; gap: var(--pd-space-2); }
  .prHeroLegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--pd-fs-sm); color: var(--pd-text-2); }
  .prHeroLegend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
  .prHeroLegend b { margin-left: 4px; color: var(--pd-text); font-variant-numeric: tabular-nums; }
  .prHeroChart svg { width: 100%; height: auto; display: block; }
  .prHeroChart polyline { fill: none; stroke-width: 2.2; stroke-linejoin: round; }
  .prHeroChart line.grid { stroke: var(--pd-border); stroke-dasharray: 2 4; }
  .prHeroChart text { fill: var(--pd-muted); font-size: 11px; }
  .prHeroIdle { place-self: center; color: var(--pd-muted); font-size: var(--pd-fs-sm); }
  .prHeroNav { display: flex; align-items: center; gap: var(--pd-space-2); margin-top: var(--pd-space-2); }
  .prDots { display: flex; gap: 6px; margin-right: auto; padding-left: var(--pd-space-2); }
  .prDots button { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: var(--pd-border); cursor: pointer; transition: width .2s var(--pd-ease); position: relative; }
  .prDots button::after { content: ''; position: absolute; inset: -18px -4px; }
  .prDots button.on { width: 22px; background: var(--pd-text); }
  .prHeroNav .tbBtn { min-width: 36px; min-height: 32px; font-size: 16px; }
  #prSide { display: flex; flex-direction: column; gap: var(--pd-space-4); min-width: 0; }
  #prSide[hidden] { display: none; }
  .prSideSec h3 { margin: 0 0 var(--pd-space-2); font-size: var(--pd-fs-lg); letter-spacing: -.01em; }
  .prSideList { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .prSideRow { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: var(--pd-space-2); align-items: center; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--pd-border); color: var(--pd-text); font: inherit; font-size: var(--pd-fs-md); text-align: left; padding: 8px 2px; cursor: pointer; min-height: 44px; }
  .prSideRow:hover .prSideTxt { color: var(--pd-text); text-decoration: underline; }
  .prSideRow i { font-style: normal; color: var(--pd-muted); font-size: var(--pd-fs-sm); }
  .prSideTxt { color: var(--pd-text-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .prSideNum { display: flex; flex-direction: column; align-items: flex-end; color: var(--pd-muted); font-size: var(--pd-fs-sm); font-variant-numeric: tabular-nums; }
  .prSideNum b { color: var(--pd-text); font-size: var(--pd-fs-lg); }
  #prBar { display: flex; align-items: center; gap: var(--pd-space-3); flex-wrap: wrap; margin: 0 0 var(--pd-space-3); }
  #prBar[hidden] { display: none; }
  #prHead { margin: 0; font-size: var(--pd-fs-lg); letter-spacing: -.01em; overflow-wrap: anywhere; min-width: 0; }
  #prSort { display: flex; gap: 6px; margin-left: auto; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  #prSort button { flex: none; background: var(--pd-raised); border: 1px solid var(--pd-border); color: var(--pd-muted); font: 600 var(--pd-fs-sm) inherit; font-family: inherit; padding: 6px 12px; border-radius: 999px; cursor: pointer; min-height: 32px; }
  #prSort button.on { color: var(--pd-text); border-color: var(--pd-accent); }
  #prSubs { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: -4px 0 var(--pd-space-3); }
  @media (max-width: 560px) { #prSubs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } }
  #prSubs[hidden] { display: none; }
  #prSubs::-webkit-scrollbar { display: none; }
  #prSubs button { flex: none; background: none; border: 0; color: var(--pd-muted); font: 600 var(--pd-fs-sm) inherit; font-family: inherit; padding: 6px 10px; border-radius: var(--pd-radius-xs); cursor: pointer; min-height: 32px; }
  #prSubs button:hover { color: var(--pd-text); }
  #prSubs button.on { color: var(--pd-text); background: var(--pd-raised); }
  #prSubs button i { font-style: normal; font-weight: 500; margin-left: 5px; font-size: var(--pd-fs-xs); color: var(--pd-muted); }
  #prPager { display: flex; align-items: center; justify-content: center; gap: var(--pd-space-3); padding: var(--pd-space-6) 0 var(--pd-space-2); color: var(--pd-muted); font-size: var(--pd-fs-sm); flex-wrap: wrap; }
  #prPager[hidden] { display: none; }
  #prMoreBtn { min-height: 40px; padding: 0 var(--pd-space-4); }
  @media (max-width: 900px) { #prHome { grid-template-columns: minmax(0, 1fr); } .prHeroBody { grid-template-columns: minmax(0, 1fr); } .prHeroChart { min-height: 0; } }
  @media (max-width: 560px) { body.pred header #hdrFocus, body.pred header .stat, body.pred header #voiceBtn { display: none; } .prHeroCard { padding: var(--pd-space-3) var(--pd-space-4); box-shadow: none; } .prHeroChart { display: none; } .prHeroTtl h3 { font-size: var(--pd-fs-lg); } .prHeroPct b { font-size: var(--pd-fs-2xl); } #prSort { margin-left: 0; } #prNav, .prInvPill { order: 3; } #prTop .prFind { order: 4; flex-basis: 100%; max-width: none; } }
  #prEmpty { color: var(--pd-muted); font-size: 13px; padding: 28px 0; text-align: center; }
  #prDetail { scroll-margin-top: var(--hdrB, 0px); }
  #prDetail[hidden], #prList[hidden] { display: none; }
  .prBack { background: none; border: 0; color: var(--pd-muted); font: 600 13px inherit; font-family: inherit; cursor: pointer; padding: 4px 0 12px; }
  .prBack:hover { color: var(--pd-text); }
  #prInvite { max-width: 1240px; padding: 16px 4px 40px; }
  #prInvite .prBack { min-height: 44px; padding: 0 0 4px; }
  #prInvite h3 { margin: 0 0 6px; font-size: 20px; }
  #prInvite .invSub { color: var(--pd-muted, var(--muted)); font-size: 13px; line-height: 1.55; margin: 0 0 14px; }
  #prInvite .invLink { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
  #prInvite .invLink input { flex: 1 1 260px; min-width: 0; background: var(--pd-surface, var(--panel)); color: var(--pd-text, var(--text)); border: 1px solid var(--pd-border, var(--border)); border-radius: 8px; padding: 9px 10px; font-size: 14px; min-height: 40px; }
  #prInvite .invLink button { min-height: 40px; }
  #prInvite .affH { margin: 18px 0 4px; font-size: 15px; }
  #prInvite .affShareBtn { background: var(--orange, #FF6B00); color: #14090A; border-color: transparent; font-weight: 700; }
  #prInvite .invMsg { background: var(--pd-surface, var(--panel2)); border: 1px solid var(--pd-border, var(--border)); }
  #prInvite .invTotals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
  #prInvite .invTotals div { background: var(--pd-surface, var(--panel)); border: 1px solid var(--pd-border, var(--border)); border-radius: 12px; padding: 10px 12px; }
  #prInvite .invTotals b { display: block; font-size: 20px; }
  #prInvite .invTotals small { color: var(--pd-muted, var(--muted)); font-size: 12px; }
  #prInvite .invRow { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--pd-border, var(--border)); font-size: 14px; }
  #prInvite .invRow span:last-child { color: var(--pd-muted, var(--muted)); text-align: right; }
  #prInvite .affTabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
  #prInvite .affTabs button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--pd-border, var(--border)); background: none; color: var(--pd-muted, var(--muted)); font: 600 14px inherit; font-family: inherit; cursor: pointer; }
  #prInvite .affTabs button[aria-selected="true"] { color: var(--pd-text, var(--text)); background: var(--pd-raised, var(--panel)); border-color: var(--pd-accent, var(--accent)); }
  #prInvite .affCard { background: var(--pd-surface, var(--panel)); border: 1px solid var(--pd-border, var(--border)); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
  #prInvite .affCard h4 { margin: 0 0 6px; font-size: 16px; }
  #prInvite .affCard ul { margin: 6px 0 12px; padding-left: 18px; color: var(--pd-muted, var(--muted)); font-size: 14px; line-height: 1.55; }
  #prInvite .affJoinBtn { min-height: 44px; padding: 0 18px; }
  #prInvite .affGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
  #prInvite .affGrid div { background: var(--pd-surface, var(--panel)); border: 1px solid var(--pd-border, var(--border)); border-radius: 12px; padding: 10px 12px; min-width: 0; }
  #prInvite .affGrid b { display: block; font-size: 20px; }
  #prInvite .affGrid small { color: var(--pd-muted, var(--muted)); font-size: 12px; }
  #prInvite .affRow { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--pd-border, var(--border)); font-size: 14px; }
  #prInvite .affRow span:last-child { color: var(--pd-muted, var(--muted)); text-align: right; }
  #prInvite .affAdmin { overflow-x: auto; margin-bottom: 14px; }
  #prInvite .affAdmin table { border-collapse: collapse; width: 100%; font-size: 13px; }
  #prInvite .affAdmin th, #prInvite .affAdmin td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--pd-border, var(--border)); white-space: nowrap; }
  #prInvite .affBar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
  #prInvite .affBar input { width: 90px; min-height: 40px; background: var(--pd-surface, var(--panel)); color: var(--pd-text, var(--text)); border: 1px solid var(--pd-border, var(--border)); border-radius: 8px; padding: 0 8px; }
  #prInvite .affBar a, #prInvite .affFine a { color: var(--pd-accent, var(--accent)); }
  #prInvite .affBar button[aria-pressed="true"] { color: var(--pd-text, var(--text)); background: var(--pd-raised, var(--panel)); box-shadow: inset 0 -2px 0 var(--pd-accent, var(--accent)); }
  #prInvite .affMsg { font-size: 13px; color: var(--pd-muted, var(--muted)); min-height: 18px; }
  @media (max-width: 560px) { #prInvite .affGrid b { font-size: 17px; } }
  #prInvite .invFine { color: var(--pd-muted, var(--muted)); font-size: 12px; line-height: 1.5; margin: 14px 0 0; }
  .refHero { position: relative; overflow: hidden; border-radius: 18px; padding: 22px 20px 18px; margin: 4px 0 14px; background: radial-gradient(120% 140% at 100% 0%, rgba(255,107,0,.32) 0%, rgba(255,107,0,0) 55%), linear-gradient(135deg, #16223b 0%, #070d18 100%); border: 1px solid rgba(255,107,0,.35); }
  .refHero .refEyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #ffb27a; margin-bottom: 6px; }
  .refHero h3 { margin: 0 0 6px; font-size: 34px; line-height: 1.1; font-weight: 900; color: #fff; }
  .refHero p { margin: 0 0 14px; color: #c8d3e3; font-size: 14px; line-height: 1.55; max-width: 560px; }
  .refLink { display: flex; gap: 8px; flex-wrap: wrap; }
  .refLink input { flex: 1 1 240px; min-width: 0; min-height: 44px; background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--text); border: 1px solid var(--border2); border-radius: 10px; padding: 0 12px; font-size: 14px; }
  .refBtn { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--pd-border, var(--border)); background: var(--pd-raised, var(--panel2)); color: var(--pd-text, var(--text)); font: 600 14px inherit; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
  .refBtn.main { background: var(--orange, #FF6B00); border-color: transparent; color: #14090A; font-weight: 800; }
  .refShare { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
  .refShare .refBtn { padding: 0 8px; font-size: 13px; }
  .refCards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
  .refCards div { background: var(--pd-surface, var(--panel)); border: 1px solid var(--pd-border, var(--border)); border-radius: 12px; padding: 12px; min-width: 0; }
  .refCards b { display: block; font-size: 22px; font-weight: 800; }
  .refCards small { color: var(--pd-muted, var(--muted)); font-size: 12px; }
  .refCards .refBal { border-color: rgba(0,208,132,.45); }
  .refCards .refBal b { color: var(--bull, #00d084); }
  .refSec { background: var(--pd-surface, var(--panel)); border: 1px solid var(--pd-border, var(--border)); border-radius: 14px; padding: 14px 16px; margin: 0 0 14px; }
  .refSec h4 { margin: 0 0 10px; font-size: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .refSteps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .refSteps li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--pd-muted, var(--muted)); line-height: 1.5; min-width: 0; }
  .refSteps li b { display: block; color: var(--pd-text, var(--text)); font-size: 14px; margin-bottom: 2px; }
  .refSteps .refNum { flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,107,0,.16); color: var(--refNum, #ffb27a); font-weight: 800; display: flex; align-items: center; justify-content: center; }
  .refFriend { padding: 10px 0; border-bottom: 1px solid var(--pd-border, var(--border)); }
  .refFriend:last-child { border-bottom: 0; }
  .refFriend .refWho { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 8px; }
  .refFriend .refWho em { font-style: normal; color: var(--pd-muted, var(--muted)); font-size: 13px; text-align: right; }
  .refTrack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .refTrack span { position: relative; padding-top: 10px; font-size: 12px; color: var(--pd-muted, var(--muted)); }
  .refTrack span::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 4px; background: var(--pd-border, var(--border)); }
  .refTrack span.done { color: var(--pd-text, var(--text)); }
  .refTrack span.done::before { background: var(--bull, #00d084); }
  .refRow { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--pd-border, var(--border)); font-size: 14px; }
  .refRow:last-child { border-bottom: 0; }
  .refRow span:last-child { text-align: right; white-space: nowrap; }
  .refRow small { display: block; color: var(--pd-muted, var(--muted)); font-size: 12px; }
  .refRow[data-state=paid] span:last-child b, .refRow[data-state=ready] span:last-child b { color: var(--bull, #00d084); }
  .refTerms ul { margin: 0 0 8px; padding-left: 18px; color: var(--pd-muted, var(--muted)); font-size: 13px; line-height: 1.55; }
  .refTerms a, .refSec a { color: var(--orangeText); }
  .refNote { font-size: 13px; color: var(--pd-muted, var(--muted)); margin: 0; }
  .refVideo { margin-top: 2px; }
  .refBtn[hidden] { display: none; }
  .refGrid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .refMain, .refSide { display: flex; flex-direction: column; min-width: 0; }
  .refSide .refCards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .refSide .refBalance { background: linear-gradient(135deg, rgba(0,208,132,.14), rgba(0,208,132,0) 70%), var(--pd-surface, var(--panel)); border: 1px solid rgba(0,208,132,.45); border-radius: 14px; padding: 16px; margin: 0 0 14px; }
  .refBalance small { display: block; color: var(--pd-muted, var(--muted)); font-size: 13px; }
  .refBalance b { display: block; font-size: 40px; font-weight: 900; line-height: 1.1; color: var(--bull, #00d084); margin: 2px 0 4px; }
  .refBalance span { color: var(--pd-muted, var(--muted)); font-size: 13px; }
  .refCardSec img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--pd-border, var(--border)); }
  .refCardSec p { margin: 8px 0 0; }
  @media (max-width: 900px) {
    .refGrid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
    .refMain, .refSide { display: contents; }
    #refHero { order: 1; } #refBalance { order: 2; } #refStats { order: 3; } #refHow { order: 4; } #refFriends { order: 5; } #refHistory { order: 6; } #refCardSec { order: 7; } #refTerms { order: 8; } #refAdminBox { order: 9; }
  }
  .refAdmin summary { cursor: pointer; font-weight: 700; min-height: 40px; display: flex; align-items: center; }
  #affPage.screen.overlay { z-index: 104; }
  #affPage .affWrap { max-width: 860px; margin: 0 auto; padding: 0 16px 48px; box-sizing: border-box; }
  @media (max-width: 800px) { #affPage .affWrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); } }
  #affPage h2 { margin: 6px 0 6px; font-size: 26px; }
  #affPage .affLead { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 0 16px; max-width: 640px; }
  #affPage .affHero { border-radius: 16px; padding: 18px; margin: 0 0 14px; background: linear-gradient(135deg, var(--affHero, #0f1c33) 0%, var(--panel) 100%); border: 1px solid var(--border); }
  #affPage .affHero .affPct { font-size: 40px; font-weight: 900; line-height: 1; color: var(--text); }
  #affPage .affHero .affPct small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 6px; }
  #affPage .affHero > .refNote { margin: 12px 0 8px; }
  #affPage .affNums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 8px; }
  #affPage .affNums div { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px; min-width: 0; }
  #affPage .affNums b { display: block; font-size: 22px; }
  #affPage .affNums small { color: var(--muted); font-size: 12px; }
  #affPage .affAdmin { overflow-x: auto; margin-bottom: 14px; }
  #affPage .affAdmin table, .refAdmin table { border-collapse: collapse; width: 100%; font-size: 13px; }
  #affPage .affAdmin th, #affPage .affAdmin td, .refAdmin th, .refAdmin td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
  .refAdmin .affAdmin { overflow-x: auto; }
  #affPage .affBar, .refAdmin .affBar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
  #affPage .affBar input { width: 90px; min-height: 40px; background: var(--panel2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; }
  #affPage .affBar a, .refAdmin .affBar a { color: var(--orangeText); }
  #affPage .affMsg, .refAdmin .affMsg { font-size: 13px; color: var(--muted); min-height: 18px; }
  #affPage .affRow, .refAdmin .affRow { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
  #affPage .affRow span:last-child { color: var(--muted); text-align: right; }
  @media (max-width: 640px) {
    .refHero h3 { font-size: 28px; }
    .refShare { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .refCards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .refSteps { grid-template-columns: 1fr; }
    #affPage .affNums b { font-size: 18px; }
    #affPage h2 { font-size: 22px; }
  }
  .prShare { margin-left: auto; background: transparent; color: var(--pd-text); border: 1px solid var(--pd-border, var(--border)); border-radius: 999px; font: 600 12px inherit; font-family: inherit; padding: 5px 12px; min-height: 28px; cursor: pointer; flex: none; }
  .prShare:hover { border-color: var(--pd-accent); color: var(--pd-accent); }
  .prShare.lg { font-size: 14px; padding: 8px 16px; min-height: 40px; }
  .prFt .prShare { margin-left: auto; }
  .prFt .prChg + .prShare { margin-left: var(--pd-space-2); }
  .prDHead { display: flex; gap: var(--pd-space-4); align-items: center; margin-bottom: var(--pd-space-4); min-width: 0; }
  .prDTtl { min-width: 0; }
  .prKick { font-size: var(--pd-fs-sm); font-weight: 500; color: var(--pd-muted); }
  .prDHead h2 { margin: 2px 0 0; font-size: var(--pd-fs-2xl); line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
  .prCols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--pd-space-6); align-items: start; }
  .prAside { position: sticky; top: 8px; display: flex; flex-direction: column; gap: var(--pd-space-3); min-width: 0; grid-column: 2; grid-row: 1; }
  .prMain { grid-column: 1; grid-row: 1; min-width: 0; }
  .prAside .tkBox { position: static; box-shadow: var(--pd-shadow-card); }
  .prChance { display: flex; align-items: baseline; gap: 6px; margin-bottom: var(--pd-space-2); }
  .prChance { flex-wrap: wrap; }
  .prChance b { font-size: var(--pd-fs-2xl); letter-spacing: -.02em; color: var(--pd-text); font-variant-numeric: tabular-nums; }
  .prChance .prYN { margin: 0 0 0 auto; display: flex; gap: var(--pd-space-2); }
  .prChance .prYN .prYes, .prChance .prYN .prNo { background: none; padding: 0; min-height: 0; font-size: var(--pd-fs-sm); cursor: default; }
  .prChance > span:not(.prChg) { color: var(--pd-muted); font-size: var(--pd-fs-md); }
  .prChartPanel #prNote { display: block; color: var(--pd-muted); font-size: var(--pd-fs-xs); margin-top: 6px; }
  .prChartFt .prMeta { margin: 0; }
  #prRelated .prRelRow, #prUsSimilar .prRelRow { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: var(--pd-space-3); align-items: center; width: 100%; background: none; border: 0; border-top: 1px solid var(--pd-border); color: var(--pd-text-2); font: inherit; font-size: var(--pd-fs-md); text-align: left; padding: 10px 0; cursor: pointer; min-height: 48px; }
  #prRelated .prRelRow:first-of-type, #prUsSimilar .prRelRow:first-of-type { border-top: 0; }
  #prRelated .prRelRow:hover .prRelTxt, #prUsSimilar .prRelRow:hover .prRelTxt { color: var(--pd-text); text-decoration: underline; }
  .prRelTxt { line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #prRelated .prRelRow b, #prUsSimilar .prRelRow b { font-size: var(--pd-fs-lg); color: var(--pd-text); font-variant-numeric: tabular-nums; }
  .tkHead { display: flex; gap: var(--pd-space-3); align-items: center; min-width: 0; }
  .tkHdTxt { min-width: 0; }
  .tkHdTxt .tkTitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  @media (max-width: 900px) { .prCols { display: flex; flex-direction: column; gap: var(--pd-space-4); } .prAside { position: static; } }
  @media (max-width: 900px) { .prCols { align-items: stretch; } .prCols > .prAside, .prCols > .prMain { width: 100%; max-width: 100%; } }
  .prPanel { background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); padding: var(--pd-space-4); margin-bottom: var(--pd-space-4); min-width: 0; }
  .prAside .prPanel { margin-bottom: 0; }
  .prLegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; font-size: 12px; color: var(--text2); }
  .prLegend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
  .prLegend b { margin-left: 5px; color: var(--pd-text); }
  #prChart { position: relative; }
  #prChart svg { width: 100%; height: auto; display: block; }
  #prChart .prEmptyChart { height: 180px; display: grid; place-items: center; text-align: center; color: var(--pd-muted); }
  #prChart .prEmptyChart b { display: block; color: var(--pd-text); font-size: 30px; letter-spacing: -.5px; }
  .prChartFt { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 11px; color: var(--pd-muted); }
  .prRange { display: flex; gap: 2px; }
  .prRange button { background: none; border: 0; color: var(--pd-muted); font: 600 11px inherit; font-family: inherit; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
  .prRange button.on { background: var(--pd-raised); color: var(--pd-text); }
  .prTbl .prRow { padding: 11px 0; border-top: 1px solid var(--pd-border); font-size: 14px; }
  .prTbl .prRow:first-child { border-top: 0; }
  .prTbl .prRow b { font-size: 18px; width: 64px; }
  @media (max-width: 760px) { .prTbl .prRow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .prTbl .prRow > span { grid-column: 1; white-space: normal; } .prTbl .prRow > b { grid-column: 2; width: auto; } .prTbl .prRow .prYes, .prTbl .prRow .prNo { min-height: 44px; width: 100%; } }
  .prTbl .prRow .prYes, .prTbl .prRow .prNo { padding: 8px 10px; font-size: 12px; min-width: 76px; }
  .prRules { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text2); font-size: 13px; line-height: 1.55; max-height: 220px; overflow: auto; }
  .prPanel h3 { margin: 0 0 var(--pd-space-3); font-size: var(--pd-fs-lg); letter-spacing: -.01em; }
  .prTrade .prBig { font-size: 30px; font-weight: 700; letter-spacing: -.6px; }
  .prTrade p { color: var(--pd-muted); font-size: 12px; margin: 8px 0 12px; line-height: 1.5; }
  .prGo { display: block; text-align: center; background: var(--pd-accent); color: var(--pd-on-accent); font-weight: 700; padding: 11px; border-radius: 8px; text-decoration: none; }
  .prGo:hover { background: var(--pd-accent-strong); }
  @media (max-width: 520px) { .prTbl .prRow { gap: 6px; } .prTbl .prRow .prYes, .prTbl .prRow .prNo { min-width: 0; padding: 7px 8px; } .prTbl .prRow b { width: 52px; font-size: 16px; } .prDHead h2 { font-size: 19px; } }
  .prMeta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--pd-muted); font-size: 12px; margin-bottom: 10px; }
  .prMeta b { color: var(--pd-text); }
  .oddsChip { display: inline-flex; gap: 4px; font-size: 11px; font-weight: 700; color: var(--text); background: var(--panel2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; text-decoration: none; white-space: nowrap; max-width: 190px; min-width: 64px; flex-shrink: 1 !important; cursor: pointer; font-family: inherit; line-height: inherit; }
  .oddsChip:hover { border-color: var(--orange); }
  .oddsChip[hidden] { display: none; }
  @media (max-width: 430px) { body.embed #paneSel { max-width: 64px; } .oddsChip { max-width: 170px; } }
  .oddsChip i { font-style: normal; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .oddsChip b { color: var(--orangeText); flex: none; }
  #wrTicker { position: sticky; top: 0; z-index: 5; overflow: hidden; margin: 0 -10px 10px; background: var(--panel); border-bottom: 1px solid var(--border); font-size: 12.5px; white-space: nowrap; }
  #wrTickTrack { display: inline-flex; padding: 7px 0; animation: wrTick var(--tickDur, 90s) linear infinite; will-change: transform; }
  #wrTicker:hover #wrTickTrack { animation-play-state: paused; }
  @keyframes wrTick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  .tk { display: inline-flex; gap: 6px; align-items: baseline; padding: 0 16px; border-right: 1px solid rgba(42,48,58,.6); }
  .tk b { color: var(--muted); font-weight: 600; }
  .tk .px { font-variant-numeric: tabular-nums; color: var(--text); transition: color .4s; }
  .tk .px.tu { color: var(--bull); } .tk .px.td { color: var(--bear); }
  .tk i { font-style: normal; font-size: 9px; color: var(--bear); }
  .up { color: var(--bull); } .dn { color: var(--bear); } .flat { color: var(--muted); }
  .wrRow { display: flex; gap: 10px; margin-bottom: 10px; min-height: 0; }
  .wrRow > .grow2 { flex: 2; min-width: 0; } .wrRow > .grow1 { flex: 1; min-width: 0; }
  #wrTop { height: max(460px, calc(100vh - 160px)); }
  .wrMain { flex: 1; display: flex; flex-direction: column; min-width: 0; gap: 8px; }
  .wrBar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
  .wrBar b { color: var(--text); font-size: 13px; }
  .wrSeg { display: inline-flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
  /* hidden must win over the display of .wrSeg and .wrRow: the owner-only Intel switch and the My symbols news row stay out of sight when their feature is off. */
  .wrSeg[hidden], .wrRow[hidden] { display: none !important; }
  .wrSeg button { border: 0; background: var(--panel); color: var(--muted); padding: 4px 10px; font-size: 12px; font-weight: 700; border-radius: 0; }
  .wrSeg button.on { background: var(--panel2); color: var(--orangeText); }
  #wrStreams { flex: 1; display: grid; gap: 8px; min-height: 0; }
  #wrStreams.n1 { grid-template: 1fr / 1fr; } #wrStreams.n2 { grid-template: 1fr / 1fr 1fr; } #wrStreams.n4 { grid-template: 1fr 1fr / 1fr 1fr; } #wrStreams.n6 { grid-template: 1fr 1fr / 1fr 1fr 1fr; }
  .wrTile { display: flex; flex-direction: column; min-height: 0; background: #000; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
  .wrTile.snd { border-color: var(--orange); }
  .wrTile .vid { flex: 1; display: flex; position: relative; min-height: 0; }
  .wrTile .sndOn { position: absolute; inset: 0; background: transparent; border: 0; border-radius: 0; padding: 0; cursor: pointer; display: flex; align-items: flex-end; justify-content: flex-start; }
  .wrTile .sndOn span { margin: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 6px; }
  .wrTile.snd .sndOn { display: none; }
  .wrTile .th .au { background: var(--panel2); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font-size: 12px; padding: 1px 6px; line-height: 1.4; flex: none; }
  .wrTile.snd .th .au { color: var(--orangeText); border-color: var(--orange); }
  #wrChDlg .lowbw { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text); margin-top: 10px; }
  .wrTile .th { display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--panel); font-size: 12px; min-width: 0; }
  .wrTile .th select { background: var(--panel2); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font: inherit; font-weight: 700; padding: 2px 4px; max-width: 55%; }
  .wrTile .th .st { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wrTile .th .st.live::before { content: "● "; color: var(--bear); }
  .wrTile .th a { color: var(--muted); text-decoration: none; margin-left: auto; white-space: nowrap; }
  .wrTile .th a:hover { color: var(--orangeText); }
  /* A narrow tile (6 streams, or the chat drawer open) shows the YouTube link as ↗ instead of clipping it to "YouTub". */
  .wrTile { container-type: inline-size; }
  @container (max-width: 260px) { .wrTile .th a { font-size: 0; } .wrTile .th a::after { content: "↗"; font-size: 13px; } .wrTile .th select { min-width: 0; flex: 1 1 auto; } }
  @media (max-width: 480px) { .wrTile .th a { font-size: 0; } .wrTile .th a::after { content: "↗"; font-size: 13px; } .wrTile .th .st { font-size: 0; flex: none; } .wrTile .th .st.live::before { font-size: 11px; } .wrTile .th { flex-wrap: wrap; row-gap: 3px; } .wrTile .th select { max-width: 100%; flex: 1 1 auto; min-width: 0; } }
  .wrTile iframe { flex: 1; width: 100%; border: 0; min-height: 0; }
  .wrTile .msg { flex: 1; display: grid; place-items: center; color: var(--onVideo); font-size: 12px; padding: 20px; text-align: center; }
  .wrSide { width: 430px; flex: none; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
  .wrCard { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; min-height: 0; }
  .wrCard.grow { flex: 1; }
  .wrHead { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
  .wrHead b { color: var(--text); font-size: 13px; margin-right: auto; }
  .wrHead select { background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 2px 4px; font: inherit; font-size: 11px; }
  .wrScroll { overflow: auto; flex: 1; min-height: 0; }
  #wrNext { padding: 10px 12px; flex-direction: row; align-items: center; gap: 12px; }
  #wrNext .cd { font: 700 22px ui-monospace, Menlo, monospace; color: var(--text); }
  #wrNext .ev { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); }
  #wrNext .ev b { display: block; color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #wrNext.soon { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
  #wrNext.now { border-color: var(--bear); background: rgba(239,83,80,.12); }
  .wrDay { position: sticky; top: 0; background: var(--panel2); color: var(--orangeText); font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; padding: 4px 10px; }
  .wrEv { display: grid; grid-template-columns: 64px 34px 10px 1fr; gap: 6px; align-items: center; padding: 5px 10px; font-size: 12px; border-bottom: 1px solid rgba(42,48,58,.5); }
  .wrEv.past { opacity: .5; } .wrEv.next { background: rgba(255,107,0,.1); }
  .wrEv .t { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .wrEv .c { font-weight: 800; font-size: 11px; color: var(--muted); }
  .wrEv .i { width: 8px; height: 8px; border-radius: 50%; }
  .wrEv .i.High { background: var(--bear); } .wrEv .i.Medium { background: var(--orange); } .wrEv .i.Low { background: #d4b106; } .wrEv .i.Holiday { background: #556; }
  .wrEv .n small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
  .wrEv .n small b { color: var(--text); font-weight: 600; }
  .wrNews { display: block; padding: 7px 10px; border-bottom: 1px solid rgba(42,48,58,.5); text-decoration: none; color: var(--text); font-size: 12.5px; line-height: 1.35; }
  .wrNews:hover { background: var(--panel2); }
  .wrNews small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
  .wrNews small i { font-style: normal; color: var(--orangeText); font-weight: 700; }
  .wrEmpty { padding: 16px; color: var(--muted); font-size: 12px; text-align: center; }
  .wrErr { padding: 5px 10px; color: #f0b27a; font-size: 11px; background: #241a12; }
  .wrFail { color: var(--warnText); }
  .wrFail button { margin-left: 6px; }
  /* Prod review lane 4: light theme readable errors (WCAG AA). */
  :root[data-theme=light] .wrFail { color: var(--warnText); }
  :root[data-theme=light] .wrErr { color: var(--warnText); background: var(--tintWarn); }
  /* Phone: every War Room control is at least 44 px tall. */
  @media (max-width: 480px), (pointer: coarse) {
    #warroom button, #warroom select, #warroom input:not([type=checkbox]), #wrTools .wrSeg button, #wrJump button { min-height: 44px !important; }
    #warroom .wrSeg button, #warroom .wrTabs button { min-width: 44px; }
    #warroom .wrBar label, #warroom label { display: inline-flex; align-items: center; min-height: 44px; }
    #warroom input[type=checkbox] { width: 22px; height: 22px; }
    #warroom .wrTile .th a, #snSyms button { display: inline-flex; align-items: center; min-height: 44px; }
    #warroom .wrTile .th .au, #warroom .wrTile .th a { min-width: 44px; justify-content: center; }
    #warroom .wrNews, #wrEvents .wrLoc a { min-height: 44px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; }
    #wrBase .wbRow a, #wbCredits a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; line-height: 44px; min-height: 44px; }
    #wrBase .wbRow { align-items: center; }
    #wrTools { flex-wrap: wrap; row-gap: 4px; }
    #wrView { flex: none; }
  }
  /* Prod review lane 4: phone touch targets of at least 44 px on Portfolio, Tutorials, Notifications, Learn, Agent T and the chat composer. */
  @media (max-width: 480px), (pointer: coarse) {
    #portfolio .mpSeg button, #portfolio .mpBar > button, #portfolio .mpNav > button, #portfolio .mpBar select { min-height: 44px; }
    #portfolio .mpNav > button { min-width: 44px; }
    #tutSwitch button, #tutTrack, #tutUnwatched, #tutorials .tutAll { min-height: 44px; }
    #ntfPanel button { min-height: 44px; }
    #ntfPanel label { display: flex; align-items: center; min-height: 44px; }
    #learnAll, #learnClose, #learnAskIn, #learnAskGo { min-height: 44px; }
    #learnClose { min-width: 44px; }
    #agentT .atChip, :root #atInput, :root #atSend { min-height: 44px; }
    :root #chatInput, :root #chatSend, :root #chatCardBtn { min-height: 44px; }
  }
  /* heat map */
  #wrHeat { flex: 1; display: flex; flex-wrap: wrap; gap: 3px; padding: 8px; align-content: stretch; min-height: 0; }
  .hmS { display: flex; flex-direction: column; gap: 3px; min-width: 120px; }
  .hmS > .hmL { font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; padding: 2px 2px 0; cursor: pointer; }
  .hmS > .hmL:hover { color: var(--orangeText); }
  .hmG { display: flex; flex-wrap: wrap; gap: 3px; flex: 1; align-content: stretch; }
  .hmT { flex: 1 1 64px; min-height: 52px; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); cursor: default; }
  .hmT b { font-size: 12px; }
  .hmT.big b { font-size: 15px; }
  /* sectors / movers / boards */
  .bar { display: grid; grid-template-columns: 1fr 64px 120px; gap: 8px; align-items: center; padding: 4px 10px; font-size: 12px; border-bottom: 1px solid rgba(42,48,58,.5); }
  .bar .tr { height: 8px; background: var(--panel2); border-radius: 4px; position: relative; overflow: hidden; }
  .bar .tr i { position: absolute; top: 0; bottom: 0; }
  .wrT { width: 100%; border-collapse: collapse; font-size: 12px; }
  .wrT td, .wrT th { padding: 4px 10px; border-bottom: 1px solid rgba(42,48,58,.5); text-align: right; white-space: nowrap; }
  .wrT td:first-child, .wrT th:first-child { text-align: left; }
  .wrT th { color: var(--muted); font-weight: 600; font-size: 11px; position: sticky; top: 0; background: var(--panel); }
  .wrT td small { color: var(--muted); }
  .wrT .num { font-variant-numeric: tabular-nums; }
  /* Market tables pack into columns: no empty gaps under short tables. */
  #wrBoard { display: grid; grid-template-columns: repeat(var(--bc, 3), minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
  #wrBoard:empty { display: none; }
  #wrBoard .wrCol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
  #wrBoard { align-items: stretch; }
  #wrBoard .wrCard { display: block; overflow-x: auto; }
  #wrBoard .wrT th, #wrBoard .wrT td, #wrIntel .wrT th, #wrIntel .wrT td { padding: 4px 8px; }
  #wrBoard .wrCol > .wrCard:last-child { flex: 1; display: flex; flex-direction: column; }
  #wrBoard .wrCol > .wrCard:last-child .wrT { flex: 1; height: 100%; }
  .wrCard { min-width: 0; }
  #wrCal { display: flex; flex-direction: column; }
  #wrCal > * { flex: none; }
  #wrCal > .wrMore { flex: 1 0 auto; min-height: 36px; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--muted); font-size: 12px; }
  #wrCal > button.wrMore:hover { color: var(--orangeText); }
  .wrCard[hidden], .wrRow > [hidden] { display: none !important; }
  #wrEvCard { position: relative; min-height: 0; }
  #wrEvCard .wrHead { min-height: 38px; box-sizing: border-box; }
  #wrEvCard .wrScroll { position: absolute; left: 0; right: 0; bottom: 0; top: 38px; }
  #wrNewsRow .wrScroll { max-height: 520px; }
  #wrIntel { display: grid; grid-template-columns: repeat(var(--bc, 3), minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; align-items: stretch; }
  #wrIntel:empty { display: none; }
  #wrView { margin-right: 8px; }
  #warroom.itOn > :not(#wrTicker):not(#wrTools):not(#itTab) { display: none !important; }
  #warroom.itOn #wrPanelsBtn, #warroom.itOn #wrJump { display: none !important; }
  #itTab { display: flex; flex-direction: column; gap: 10px; }
  #itTab[hidden] { display: none; }
  #itTab .wrCard { display: block; overflow-x: auto; min-width: 0; }
  #itTab .wrT th, #itTab .wrT td { padding: 4px 8px; }
  .itBar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .itBar form { display: flex; gap: 6px; }
  .itBar input, .itFilters input, .itFilters select { background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 12px; min-width: 0; }
  #itSym { width: 9em; text-transform: uppercase; }
  .itFilters { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px; }
  .itNote { margin: 0; padding: 6px 10px; font-size: 12px; color: var(--muted); }
  .itRows { display: flex; flex-direction: column; }
  .itRow { display: grid; grid-template-columns: minmax(0, 1.4fr) 5.5em minmax(0, 2fr) 4.5em minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 1.4fr) 3.6em; gap: 8px; align-items: center; padding: 7px 10px; border-top: 1px solid var(--border); font-size: 12.5px; }
  .itRow small { display: block; color: var(--muted); font-size: 11px; }
  .itRow .num { font-variant-numeric: tabular-nums; }
  .itTk, .itChip { border: 1px solid var(--border); background: var(--panel2); color: var(--text); border-radius: 999px; padding: 3px 9px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; min-height: 28px; }
  .itTk:hover, .itChip:hover { border-color: var(--orange); }
  .itChip { font-weight: 600; font-size: 11px; padding: 2px 8px; margin: 2px 4px 2px 0; }
  .itLate { color: var(--bear); font-weight: 700; }
  .itLinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; padding: 8px 10px; }
  .itLinks > div > small { display: block; color: var(--muted); margin-bottom: 4px; }
  .itWhy { margin: 0; padding: 0 10px 8px 26px; font-size: 11.5px; color: var(--muted); }
  .itFil { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 10px; border-top: 1px solid var(--border); font-size: 12px; }
  .itFil a { color: var(--orangeText); }
  .itFund.dr { grid-template-columns: 6.5em minmax(0, 0.8fr) minmax(0, 2fr) minmax(0, 1.4fr) 6em 7em minmax(0, 0.6fr); }
  .itFund { display: grid; grid-template-columns: 2.2em minmax(0, 0.8fr) minmax(0, 2fr) minmax(0, 1.4fr) 6em 7em minmax(0, 1.4fr); gap: 8px; align-items: center; padding: 6px 10px; border-top: 1px solid var(--border); font-size: 12.5px; }
  .itFund small { display: block; color: var(--muted); font-size: 11px; }
  .itBar2 { position: relative; height: 8px; background: var(--panel2); border-radius: 4px; overflow: hidden; }
  .itBar2 i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--orange); }
  .itSt { font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 1px 6px; text-transform: uppercase; }
  .itSt.bought, .itSt.added { background: rgba(34,197,94,.15); color: var(--bull); }
  .itSt.sold, .itSt.trimmed { background: rgba(239,68,68,.15); color: var(--bear); }
  .itSt.unchanged { background: var(--panel2); color: var(--muted); }
  .itPlanF { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 10px; align-items: end; }
  .itPlanF label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
  .itPlanF input { background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 12px; width: 8em; }
  .itFund.er { grid-template-columns: minmax(0, 0.6fr) minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 0.9fr) auto; }
  #itEarnCard .wrHead .itChip { margin-left: auto; }
  .itChip.on { border-color: var(--orange); color: var(--orangeText); }
  .itBadge { font-size: 10.5px; border-radius: 4px; padding: 1px 5px; background: var(--panel2); color: var(--muted); }
  @media (max-width: 900px) {
    .itRow { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
    .itRow > :nth-child(2) { justify-self: end; }
    .itRow > .itX, .itRow > .itAsset { grid-column: 1 / -1; }
    .itTk, .itChip { min-height: 36px; }
    #itTab .wrT th, #itTab .wrT td { padding: 4px 5px; font-size: 11.5px; }
    #itTab .wrT th { white-space: normal; }
    .itFund, .itFund.dr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
    .itFund > :nth-child(3) { flex: 1 1 55%; min-width: 0; }
    .itFund > .itFw, .itFund > .itFx { flex: 1 1 100%; }
    .itFund > :empty { display: none; }
    #itPlanCard .wrT tr > :nth-child(2), #itPlanCard .wrT tr > :nth-child(3) { display: none; }
    #itEarnCard .wrT tr > :nth-child(4), #itEarnCard .wrT tr > :nth-child(6), #itEarnCard .wrT tr > :nth-child(7), #itEarnCard .wrT tr > :nth-child(8) { display: none; }
    #itEarnCard .wrHead { flex-wrap: wrap; }
    .itPlanF input { width: 100%; }
    .itPlanF label { flex: 1 1 40%; }
  }
  #wrIntel .wrCol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
  #wrIntel .wrCard { display: block; overflow-x: auto; }
  #wrIntel .wrCard.hasFill { flex: 1; display: flex; flex-direction: column; }
  #wrIntel .wrFill { flex: 1 1 0; min-height: 200px; overflow: auto; }
  .wrOff { display: none !important; }
  #wrSnap { display: block; padding: 8px 12px; font-size: 12.5px; line-height: 1.45; margin-bottom: 10px; } #wrSnap b { color: var(--orangeText); margin-right: 6px; }
  #wrTools { position: sticky; top: 33px; z-index: 4; display: flex; gap: 8px; align-items: center; margin: -10px -10px 10px; padding: 5px 10px; background: var(--bg); border-bottom: 1px solid var(--border); }
  #wrPanelsMenu { position: absolute; top: 34px; left: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; z-index: 6; }
  #wrPanelsMenu[hidden] { display: none; }
  #wrClock { margin-left: auto; font: 600 12px ui-monospace, Menlo, monospace; color: var(--muted); white-space: nowrap; }
  #wrClock b { color: var(--text); }
  #wrClock .open { color: var(--bull); }
  #wrJump { display: none; gap: 4px; overflow-x: auto; white-space: nowrap; flex: 1; }
  #wrJump button { border: 1px solid var(--border); background: var(--panel); color: var(--muted); border-radius: 999px; padding: 4px 10px; font-size: 12px; min-height: 32px; }
  .wrPred { display: block; position: relative; padding: 6px 10px 8px; border-bottom: 1px solid rgba(42,48,58,.5); text-decoration: none; color: var(--text); font-size: 12px; }
  .wrPred:hover { background: var(--panel2); }
  .wrPred b { position: absolute; right: 10px; top: 6px; font-size: 14px; color: var(--orangeText); }
  .wrPred > span { display: block; padding-right: 44px; line-height: 1.3; }
  .wrPred i { display: block; height: 3px; background: var(--orange); border-radius: 2px; margin-top: 4px; opacity: .7; }
  .wrPred small, .wrFoot { color: var(--muted); font-size: 11px; }
  .wrFoot { padding: 6px 10px; }
  #wrLegal { color: var(--muted); font-size: 11px; line-height: 1.4; padding: 8px 10px 14px; }
  .wrStats { display: flex; gap: 8px; padding: 10px; } .wrStat { flex: 1; border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; } .wrStat small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; } .wrStat b { font: 700 18px ui-monospace, Menlo, monospace; }
  .wrAD { display: flex; height: 8px; margin: 0 10px; background: var(--panel2); border-radius: 4px; overflow: hidden; }
  .wrCurve { width: 100%; display: block; padding: 6px 4px 0; box-sizing: border-box; } .wrCurve text { fill: var(--muted); font-size: 7.5px; } .wrCurve text.v { fill: var(--text); font-size: 7px; }
  #wrMap rect.nat { stroke: #000; stroke-width: .6; cursor: pointer; }
  #wrSnap[hidden] { display: none; }
  #wrBase { margin-bottom: 10px; } #wrBase:empty { display: none; }
  .wbHealth { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--border); }
  .wbSrc { font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
  .wbSrc i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; background: var(--muted); vertical-align: 0; }
  .wbSrc.live i { background: var(--bull); } .wbSrc.stale i { background: var(--orange); } .wbSrc.down i { background: var(--bear); } .wbSrc.off { opacity: .6; }
  .wbGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; padding: 8px 10px; }
  .wbTile { border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; min-width: 0; }
  .wbTile > small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; margin-bottom: 3px; }
  .wbRow { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 1.5; } .wbRow > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .wbRow b { font: 600 12px ui-monospace, Menlo, monospace; white-space: nowrap; } .wbRow a { color: var(--text); text-decoration: none; } .wbRow a:hover { text-decoration: underline; }
  .wbAsOf { color: var(--muted); font-size: 10.5px; margin-top: 3px; }
  .wbMeta { color: var(--muted); font-size: 11px; white-space: nowrap; }
  .wbWhy { padding: 6px 10px 0; font-size: 12px; color: var(--muted); line-height: 1.45; } .wbWhy div { overflow-wrap: anywhere; } .wbWhy b { color: var(--text); font-weight: 600; }
  .wrTabs { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-right: auto; }
  .wrTabs button { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 12px; padding: 4px 9px; border-radius: 6px; }
  .wrTabs button.on { background: var(--panel2); color: var(--orangeText); }
  #wrMapBox { position: relative; width: 100%; aspect-ratio: 1000 / 420; }
  #wrMap { width: 100%; height: 100%; display: block; }
  #wrMap path { stroke: #0b1726; stroke-width: .5; }
  #wrMap path:hover { stroke: var(--text); stroke-width: 1; }
  #wrMap circle { fill: rgba(255,107,0,.55); stroke: var(--orange); stroke-width: 1; cursor: pointer; }
  #wrMap circle:hover, #wrMap circle.sel { fill: rgba(255,107,0,.9); }
  #wrMap text { fill: #fff; font-size: 8px; font-weight: 700; pointer-events: none; paint-order: stroke; stroke: rgba(0,0,0,.6); stroke-width: 2px; }
  #wrMapTip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-size: 12px; z-index: 3; white-space: nowrap; }
  .wrLoc { padding: 7px 10px; border-bottom: 1px solid rgba(42,48,58,.5); font-size: 12px; cursor: pointer; }
  .wrLoc:hover, .wrLoc.sel { background: var(--panel2); }
  .wrLoc b { color: var(--text); } .wrLoc small { color: var(--orangeText); font-weight: 700; margin-left: 6px; }
  .wrLoc a { display: block; color: var(--muted); text-decoration: none; margin-top: 3px; line-height: 1.3; }
  .wrLoc a:hover { color: var(--text); }
  #wrFear { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
  #wrFear .g { width: 120px; height: 64px; }
  #wrFear .v { font: 800 26px ui-monospace, Menlo, monospace; }
  #wrFear small { display: block; color: var(--muted); font-size: 11px; }
  #wrFear small.src { margin-top: 2px; font-size: 10px; }
  #wrChDlg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 350; padding: 12px; box-sizing: border-box; }
  #wrChDlg[hidden] { display: none; }
  .wrX { flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; font-size: 24px; line-height: 1; background: var(--panel2); border: 1px solid var(--border); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
  .wrX:hover, .wrX:focus-visible { border-color: var(--orange); }
  #wrChDlg .box { position: relative; max-height: calc(100dvh - 24px); overflow-y: auto; box-sizing: border-box; overscroll-behavior: contain; } #wrChDlg .wrX { position: sticky; float: right; top: 0; margin: -8px -8px 0 8px; z-index: 1; }
  #wrPanelsMenu .wrPmHd { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; } #wrPanelsMenu .wrX { width: 36px; height: 36px; min-height: 36px; font-size: 20px; } @media (max-width: 480px), (pointer: coarse) { #wrPanelsMenu .wrX { width: 44px; height: 44px; } }
  #wrChDlg .box { width: min(600px, 92vw); background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
  #wrChDlg textarea { width: 100%; height: 240px; background: var(--panel2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; font: 12px ui-monospace, Menlo, monospace; padding: 8px; box-sizing: border-box; }
  #wrChDlg p { color: var(--muted); font-size: 12px; margin: 6px 0 10px; }
  @media (max-width: 700px) { #wrBoard .wrT th, #wrBoard .wrT td, #wrIntel .wrT th, #wrIntel .wrT td { padding: 4px 5px; font-size: 11.5px; } #wrIntel .wrT th { white-space: normal; } }
  @media (max-width: 1100px) { #wrJump { display: flex; } #wrMoversCard, #wrCalCard { min-height: 0 !important; } #wrCalCard .wrScroll { max-height: 420px; } .wrRow { flex-direction: column; } #wrTop { height: auto; } .wrSide { width: auto; } #wrStreams { min-height: 56vw; } .wrCard.grow { min-height: 320px; } #wrEvCard { min-height: 320px; flex: none; } #wrNewsRow .wrScroll { max-height: 420px; } }
  /* ── Voice alerts ── */
  #chatBtn { position: relative; border: 1px solid var(--border); background: var(--panel2); color: var(--muted); border-radius: 8px; padding: 5px 9px; font-size: 14px; line-height: 1; }
  #chatBtn[hidden] { display: none; }
  #chatBtn.on { color: var(--orangeText); border-color: rgba(255,107,0,.5); }
  #chatDot { position: absolute; top: 2px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
  #chatMentions { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--bear); color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; box-sizing: border-box; }
  #chatDot[hidden], #chatMentions[hidden] { display: none; }
  #ntfBtn { position: relative; border: 1px solid var(--border); background: var(--panel2); color: var(--muted); border-radius: 8px; padding: 4px 7px; line-height: 0; min-height: 30px; min-width: 32px; }
  #ntfBtn svg { width: 17px; height: 17px; }
  #ntfBtn[hidden], #ntfBadge[hidden], #ntfPanel[hidden] { display: none; }
  #ntfPanel [hidden] { display: none !important; }
  #ntfBtn[aria-expanded=true] { color: var(--orangeText); border-color: rgba(255,107,0,.5); }
  #ntfBadge { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--orange); color: #14090A; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; box-sizing: border-box; }
  #ntfPanel { position: fixed; top: 52px; right: 12px; z-index: 120; width: min(380px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 80px)); overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.55); padding: 14px; font-size: 13px; box-sizing: border-box; }
  #ntfPanel h3 { margin: 0; font-size: 15px; }
  .ntfHd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
  .ntfItem { padding: 10px 10px 10px 14px; border-radius: 10px; background: var(--panel2); margin-bottom: 8px; position: relative; cursor: pointer; }
  .ntfItem b { display: block; font-size: 13.5px; color: var(--text); }
  .ntfItem small { color: var(--muted); display: block; margin-top: 3px; line-height: 1.4; }
  .ntfItem[data-read=false]::before { content: ""; position: absolute; left: 5px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
  .ntfSet { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px; display: grid; gap: 8px; }
  .ntfSet label { display: flex; align-items: center; gap: 8px; min-height: 32px; }
  .ntfSet input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--orange); }
  .ntfMsg { color: var(--muted); font-size: 12px; margin: 0; }
  #auth .invBanner { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; margin: 0 0 22px; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, rgba(255,107,0,.22), rgba(255,107,0,.06)); box-shadow: inset 0 0 0 1px rgba(255,154,87,.45); }
  #auth .tutPreview { margin: 0 0 22px; padding: 14px; border-radius: 18px; background: rgba(255,107,0,.08); box-shadow: inset 0 0 0 1px rgba(255,154,87,.35); }
  #auth .tutPreview[hidden] { display: none; }
  #auth .tutPreview b { display: block; font-size: 16px; line-height: 1.3; color: #fff; margin: 0 0 10px; }
  #auth .tutPreview video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; }
  #auth .tutPreview span { display: block; margin-top: 10px; font-size: 13.5px; line-height: 1.45; color: #E5E5EA; }
  #auth .invBanner[hidden], #auth .invSteps[hidden], #auth .termsField[hidden], #auth .invBanner em[hidden] { display: none; }
  #auth .invBanner i { width: 44px; height: 44px; border-radius: 12px; background: #FF6B00; display: grid; place-items: center; }
  #auth .invBanner i svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  #auth .invBanner b { display: block; font-size: 16.5px; line-height: 1.3; color: #fff; letter-spacing: -.01em; }
  #auth .invBanner span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: #E5E5EA; }
  #auth .invBanner em { display: inline-block; margin-top: 8px; font-style: normal; font-size: 12px; color: #FFB58A; }
  #auth .termsField { display: flex; align-items: flex-start; gap: 10px; margin: 2px 0 14px; font-size: 14px; line-height: 1.45; color: #C7C7CC; cursor: pointer; }
  #auth .termsField input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: #FF6B00; }
  #auth .termsField a { color: #FF9A57; text-decoration: underline; text-underline-offset: 3px; }
  #auth .invSteps { list-style: none; counter-reset: st; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
  #auth .invSteps li { counter-increment: st; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.09); }
  #auth .invSteps li::before { content: counter(st); width: 32px; height: 32px; border-radius: 50%; background: rgba(255,107,0,.18); color: #FF9A57; font-weight: 700; display: grid; place-items: center; font-size: 15px; }
  #auth .invSteps b { display: block; color: #F5F5F7; font-size: 15px; }
  #auth .invSteps span { display: block; color: #A1A1A6; font-size: 13.5px; line-height: 1.45; margin-top: 3px; }
  #auth .invRisk { font-size: 12px; color: #8E8E93; text-align: center; margin: 14px 0 0; line-height: 1.45; }
  #auth .invRisk[hidden] { display: none; }
  .invMsg { margin: 6px 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--panel2); color: var(--text); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
  .refList { display: grid; gap: 6px; margin: 8px 0 14px; }
  .refRow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--panel2); font-size: 13px; }
  .refRow em { font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--muted); white-space: nowrap; }
  .refRow[data-status=qualified] em, .refRow[data-status=reward_pending] em { background: rgba(255,107,0,.18); color: #FF9A57; }
  .refRow[data-status=paid] em { background: rgba(0,208,132,.16); color: #4ade80; }
  #sideDrawer { display: none; width: 360px; flex: none; min-height: 0; background: var(--panel); border-left: 1px solid var(--border); flex-direction: column; font-size: 13px; }
  body.chatOpen #sideDrawer { display: flex; }
  body.chatFlow aside:where(#sidePanel), body.chatFlow #asideOpen { display: none !important; }
  body.chatPad #terminal { padding-right: 360px; box-sizing: border-box; }
  #sideDrawer.floating { position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; box-shadow: -8px 0 30px rgba(0,0,0,.45); }
  #chatDrawer, #agentT { display: flex; flex-direction: column; min-height: 0; flex: 1; }
  #chatDrawer[hidden], #agentT[hidden] { display: none; }
  .cdHead { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
  .cdHead b { flex: 1; font-size: 14px; white-space: nowrap; }
  #agentBack { white-space: nowrap; flex: none; }
  .cdHead button { border: 0; background: none; color: var(--muted); padding: 4px 8px; font-size: 14px; min-height: 32px; min-width: 32px; }
  #chatRules { padding: 6px 10px; font-size: 11px; line-height: 1.35; color: var(--muted); background: var(--panel2); border-bottom: 1px solid var(--border); }
  #chatChannels { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px; border-bottom: 1px solid var(--border); scrollbar-width: thin; }
  /* Rooms wrap onto more lines instead of running off the edge; past three lines the strip scrolls. */
  #chatChannels { flex-wrap: wrap; overflow-x: hidden; overflow-y: auto; max-height: 112px; }
  @media (max-width: 480px), (pointer: coarse) { #chatChannels .chatChip { min-height: 44px; padding: 0 14px; } #chatList .chatMsg .chatDots { min-height: 44px; min-width: 44px; opacity: 1; } .cdHead button { min-height: 44px; min-width: 44px; } }
  .chatChip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 12px; font-weight: 700; border-radius: 14px; color: var(--muted); }
  .chatChip.on { color: var(--text); border-color: var(--orange); background: rgba(255,107,0,.12); }
  .chatChip i { font-style: normal; min-width: 16px; height: 16px; border-radius: 8px; background: var(--orange); color: var(--onOrange); font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; padding: 0 4px; box-sizing: border-box; }
  #chatToolbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
  #chatToolbar select { background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; font: inherit; padding: 2px 4px; }
  #chatToolbar .spacer { flex: 1; }
  #chatBody { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  #chatPins { max-height: 84px; overflow: auto; border-bottom: 1px solid var(--border); }
  #chatPins .chatMsg { background: rgba(255,107,0,.06); }
  #chatList { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 0; overscroll-behavior: contain; }
  #chatEmpty { padding: 28px 18px; text-align: center; color: var(--muted); }
  .chatMsg { padding: 5px 12px; position: relative; word-break: break-word; }
  .chatMsg:hover { background: rgba(255,255,255,.03); }
  .chatMsg .cmHead { display: flex; align-items: baseline; gap: 6px; font-size: 11px; color: var(--muted); }
  .chatMsg .chatWho { font-weight: 800; font-size: 12px; color: var(--text); }
  .chatBadge { font-size: 9px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--onOrange); background: var(--orange); border-radius: 4px; padding: 1px 5px; }
  .chatMsg .chatDots { margin-left: auto; border: 0; background: none; color: var(--muted); padding: 0 6px; min-height: 22px; font-size: 14px; opacity: .6; }
  .chatMsg:hover .chatDots { opacity: 1; }
  .chatMsg .cmText { white-space: pre-wrap; line-height: 1.4; font-size: 13px; }
  .chatMsg.chatSys .cmText, .chatMsg.chatDel { color: var(--muted); font-style: italic; }
  .chatMsg.chatTeam { border-left: 2px solid var(--orange); }
  .chatMsg.chatMe { background: rgba(255,107,0,.08); }
  .chatMsg.flash { background: rgba(255,107,0,.25); }
  .chatQuote { border-left: 2px solid var(--border); padding-left: 8px; margin: 2px 0; font-size: 11px; color: var(--muted); }
  .chatAt { color: #4aa3ff; font-weight: 700; }
  .chatAt.me { color: var(--orangeText); }
  .chatTag { color: var(--bull); font-weight: 700; border: 0; background: none; padding: 0; font-size: inherit; }
  .chatCard { margin-top: 4px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--panel2); }
  .chatCard b { display: block; }
  .chatCard small { display: block; color: var(--muted); margin: 2px 0 6px; }
  .chatCard button { font-size: 12px; padding: 4px 10px; min-height: 30px; }
  .chatIgn { color: var(--muted); font-style: italic; cursor: pointer; }
  #chatErr { padding: 4px 12px; color: var(--bearText); font-size: 12px; }
  #chatErr:empty { display: none; }
  #chatMuted { padding: 10px 12px; background: rgba(239,83,80,.12); color: var(--bearText); border-top: 1px solid var(--border); font-size: 12px; }
  #chatMuted[hidden] { display: none; }
  #chatReplyBar, #chatCardPrev { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-top: 1px solid var(--border); background: var(--panel2); font-size: 12px; }
  #chatReplyBar[hidden], #chatCardPrev[hidden] { display: none; }
  #chatReplyBar span, #chatCardPrev span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #chatCardPrev input { flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 4px 6px; font: inherit; }
  #chatMention { border-top: 1px solid var(--border); background: var(--panel2); max-height: 180px; overflow: auto; }
  #chatMention[hidden] { display: none; }
  #chatMention button { display: flex; width: 100%; gap: 8px; border: 0; border-radius: 0; background: none; text-align: left; font-weight: 600; padding: 7px 12px; min-height: 36px; }
  #chatMention button small { color: var(--muted); }
  #chatForm { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); }
  #chatForm[hidden] { display: none; }
  #chatInput { flex: 1; resize: none; min-height: 38px; max-height: 110px; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; }
  #chatInput:disabled { opacity: .55; }
  #chatForm button { min-height: 38px; }
  #chatSend { background: var(--orange); border-color: var(--orange); color: var(--onOrange); }
  #chatSend:disabled { opacity: .5; }
  #chatMenu { position: fixed; z-index: 95; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 4px; min-width: 170px; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
  #chatMenu[hidden] { display: none; }
  #chatMenu button { display: block; width: 100%; border: 0; background: none; color: var(--text); text-align: left; font-size: 12px; padding: 8px 10px; border-radius: 6px; min-height: 34px; }
  #chatMenu button:hover { background: var(--panel2); }
  #chatSettings { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; }
  #chatSettings[hidden] { display: none; }
  #chatNewView { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; }
  #chatNewView[hidden] { display: none; }
  #chatNewView .tabs { display: flex; gap: 6px; margin-bottom: 8px; }
  #chatNewView .tabs button.on { color: var(--text); border-color: var(--orange); background: rgba(255,107,0,.12); }
  #chatNewView input { width: 100%; box-sizing: border-box; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 7px 8px; font: inherit; margin-bottom: 6px; }
  #chatNewView button { padding: 4px 10px; font-size: 12px; min-height: 30px; }
  #chatNewView .hit { display: flex; width: 100%; gap: 8px; border: 0; border-radius: 0; background: none; text-align: left; font-weight: 600; padding: 7px 4px; min-height: 36px; }
  #chatNewView .hit small { color: var(--muted); }
  #chatNewView .item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(42,48,58,.5); }
  #chatNewView .item span { flex: 1; min-width: 0; word-break: break-word; }
  #chatNewView .item small { color: var(--muted); display: block; }
  #chatNewView .picked { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
  #chatNewErr { color: var(--bearText); font-size: 12px; min-height: 16px; margin-top: 6px; }
  #chatToolbar button { padding: 2px 8px; font-size: 12px; min-height: 26px; }
  .chatMsg .chatWho.dmOk { cursor: pointer; }
  #chatSettings h4 { margin: 12px 0 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
  #chatSettings .row { display: flex; gap: 6px; margin-bottom: 6px; }
  #chatSettings input, #chatSettings textarea, #chatAsk input, #chatAsk select { flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 8px; font: inherit; text-align: left; width: auto; }
  #chatSettings textarea { width: 100%; min-height: 90px; box-sizing: border-box; }
  #chatSettings .item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(42,48,58,.5); }
  #chatSettings .item span { flex: 1; min-width: 0; word-break: break-word; }
  #chatSettings .item small { color: var(--muted); display: block; }
  #chatSettings button { padding: 4px 10px; font-size: 12px; min-height: 30px; }
  #chatNote { font-size: 12px; color: var(--bull); min-height: 16px; }
  #chatAsk { position: absolute; left: 12px; right: 12px; bottom: 70px; z-index: 5; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.6); }
  #chatAsk[hidden] { display: none; }
  #chatAsk p { margin: 0 0 8px; font-weight: 700; }
  #chatAsk .row { display: flex; gap: 6px; margin-top: 8px; justify-content: flex-end; }
  body.atOpen #sideDrawer { display: flex; }
  #agentT { color: var(--text); line-height: 1.45; position: relative; }
  #agentT .cdHead #atQuota { font-size: 11px; color: var(--muted); white-space: nowrap; }
  #atOff { padding: 14px; color: var(--muted); }
  #atOff[hidden], #atList[hidden], #atQuick[hidden], #atForm[hidden], #agentBack[hidden] { display: none; }
  #atList { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
  .atMsg { max-width: 94%; padding: 8px 10px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--border); font-size: 13px; overflow-wrap: anywhere; }
  .atMsg.me { align-self: flex-end; background: rgba(255,107,0,.12); border-color: rgba(255,107,0,.35); }
  .atMsg.note { align-self: center; font-size: 12px; color: var(--muted); background: none; border-style: dashed; }
  .atMsg p { margin: 0 0 6px; }
  .atMsg p:last-child { margin-bottom: 0; }
  .atBadge { display: block; font-size: 10px; font-weight: 700; letter-spacing: .03em; color: var(--muted); margin-bottom: 4px; }
  .atMsg.typing p { color: var(--muted); }
  .atChips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .atChip { border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 14px; padding: 5px 10px; font-size: 12px; font-weight: 700; min-height: 30px; }
  .atChip.go { border-color: var(--orange); }
  .atChip.danger { background: var(--bear); border-color: var(--bear); color: #fff; }
  .atChip[disabled] { opacity: .5; }
  .atSrc { margin-top: 8px; font-size: 11px; color: var(--muted); }
  .atSrc a { color: var(--muted); text-decoration: underline; margin-right: 8px; }
  #atQuick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 8px; }
  #atForm { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); }
  #atInput { flex: 1; min-width: 0; resize: none; max-height: 90px; min-height: 38px; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; }
  .atFoot { padding: 4px 10px 8px; font-size: 10.5px; color: var(--muted); line-height: 1.3; }
  .atGlow { outline: 3px solid var(--orange) !important; outline-offset: 2px; }
  #learnAsk { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
  #learnAsk input { flex: 1; min-width: 0; }
  @media (max-width: 900px) { #atInput { font-size: 16px; } }
  @media (max-width: 900px) {
    #sideDrawer, #sideDrawer.floating { position: fixed; top: var(--hdrB, 0px); left: 0; right: 0; bottom: 0; width: auto; z-index: 90; border-left: 0; box-shadow: none; }
    #chatInput { font-size: 16px; }
  }
  .toast.chat { border-left-color: var(--orange); }
  .toast.lock { border-left-color: var(--bull); } .toast.lock b { color: var(--bull); }
  #chartCtx button[hidden] { display: none; }
  #voiceBtn { border: 1px solid var(--border); background: var(--panel2); color: var(--muted); border-radius: 8px; padding: 5px 9px; font-size: 14px; line-height: 1; }
  #voiceBtn.on { color: var(--orangeText); border-color: rgba(255,107,0,.5); }
  #voiceBtn.blocked { color: #f0b27a; animation: vpulse 1.2s infinite; }
  #voiceBtn.down { opacity: .6; }
  @keyframes vpulse { 50% { opacity: .45; } }
  #toasts { position: fixed; right: 16px; top: calc(var(--hdrB, 56px) + 8px); z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 150px); overflow: hidden; pointer-events: none; }
  .toast { background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: 8px; padding: 9px 12px; font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.5); pointer-events: none; }
  .toast.undo { pointer-events: auto; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
  .toast.undo button { flex: none; }
  .toast.intel { border-left-color: #60a5fa; }
  .toast.target, .toast.fill { border-left-color: var(--bull); } .toast.stop, .toast.reject { border-left-color: var(--bear); } .toast.order { border-left-color: var(--orange); }
  .toast small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
  .toast .toastUndo { margin-top: 6px; min-height: 32px; padding: 4px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel2); color: var(--text); font-weight: 700; cursor: pointer; pointer-events: auto; }
  .toast { position: relative; }
  .toast.hasX { padding-right: 32px; }
  .toast .toastX { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 16px; line-height: 1; cursor: pointer; pointer-events: auto; }
  .toast .toastX::before { content: '\00d7'; }
  .toast .toastX:hover, .toast .toastX:focus-visible { color: var(--text); background: var(--panel2); }
  .toast .toastX:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
  #toasts .toastMore { display: none; }
  #toasts.many .toastMore { display: block; pointer-events: auto; min-height: 20px; padding: 1px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel2); color: var(--text); font: inherit; font-size: 11px; font-weight: 800; line-height: 16px; cursor: pointer; }
  #toasts.many .toastMore:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
  #toasts.stacked { gap: 0; overflow: visible; padding-bottom: calc(var(--edges, 0) * 6px); }
  #toasts.stacked > .toast { pointer-events: auto; cursor: pointer; }
  #toasts.stacked > .toast:first-child { z-index: 4; }
  #toasts.stacked > .toast:not(:first-child) { position: absolute; left: 0; right: 0; top: 0; height: var(--stackH, 40px); overflow: hidden; }
  #toasts.stacked > .toast:nth-child(2) { z-index: 3; top: 6px; left: 8px; right: 8px; }
  #toasts.stacked > .toast:nth-child(3) { z-index: 2; top: 12px; left: 16px; right: 16px; }
  #toasts.stacked > .toast:nth-child(4) { z-index: 1; top: 18px; left: 24px; right: 24px; }
  #toasts.stacked > .toast:nth-child(n+5) { z-index: 0; top: 18px; left: 24px; right: 24px; opacity: 0; pointer-events: none; }
  #toasts.stacked .toastMore { position: absolute; z-index: 5; right: 12px; bottom: calc(var(--edges, 0) * 6px - 10px); }
  #toasts.expanded { max-height: min(calc(100vh - 150px), 62vh); overflow-y: auto; pointer-events: auto; overscroll-behavior: contain; }
  #toasts.expanded > .toast { pointer-events: auto; }
  #toasts.expanded .toastMore { align-self: flex-end; flex: none; }
  @media (pointer: coarse) { .toast.hasX { padding-right: 42px; } .toast .toastX { top: 0; right: 0; width: 40px; height: 40px; font-size: 20px; } #toasts.many .toastMore { min-height: 28px; padding: 4px 12px; } #toasts.stacked .toastMore { bottom: calc(var(--edges, 0) * 6px - 14px); } }
  #voiceDlg { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 12px; width: min(460px, 92vw); }
  #voiceDlg::backdrop { background: rgba(0,0,0,.6); }
  #voiceDlg h3 { margin: 0 0 8px; }
  #voiceDlg .row select, #voiceDlg .row input[type=range] { width: 220px; }
  #voiceDlg .kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin: 6px 0; font-size: 12px; color: var(--muted); }
  #price { position: relative; }
  .ofBar { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; max-width: calc(100% - 100px); padding: 3px 6px; border-radius: 6px; background: color-mix(in srgb, var(--panel2) 88%, transparent); border: 1px solid var(--border); font-size: 12px; color: var(--text2); }
  .ofBar label { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
  .ofBar input[type=number] { width: 52px; padding: 2px 4px; }
  .ofBar select { padding: 2px 4px; }
  .ofBar .ofMsg { color: var(--muted); font-size: 11px; }
  .ofBar .ofMsg.bad { color: #ffb74d; cursor: help; }
  .ofBar .ofGroup { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .ofBar .ofGroup[hidden] { display: none; }
  .ofBar .ofGroup b { font-weight: 600; color: var(--muted); }
  .ofBar input[type=datetime-local] { padding: 2px 4px; }
  .fpGear { font-size: 13px !important; line-height: 1; padding: 2px 7px !important; }
  .fpGear.on { border-color: var(--orange, #ff9800); color: var(--orange, #ff9800); }
  .fpGear.warn { box-shadow: inset 0 -2px 0 #ffb74d; }
  .fpStatLab { position: absolute; z-index: 5; box-sizing: border-box; overflow: hidden; background: color-mix(in srgb, var(--bg) 96%, transparent); border-left: 1px solid var(--border2); border-top: 1px solid var(--border2); color: var(--muted); font: 10px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; cursor: context-menu; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
  .fpStatLab[hidden] { display: none; }
  .fpStatLab:hover, .fpStatLab:focus-visible { color: var(--text, #e6ebf2); background: var(--panel2); outline: none; }
  .fpStatLab.more { box-shadow: inset 0 -2px 0 #ffb74d; }
  .fpStatName { box-sizing: border-box; padding: 0 4px 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--border); }
  .fpStatMenu { position: fixed; z-index: 85; min-width: 200px; max-width: calc(100vw - 8px); max-height: calc(100vh - 8px); overflow-y: auto; box-sizing: border-box; padding: 6px; background: var(--panel, var(--panel2)); border: 1px solid #2a3d5c; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.55); color: var(--text, #e6ebf2); font-size: 12px; }
  .fpStatHead { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px 4px; }
  .fpStatItem { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
  .fpStatItem:hover { background: var(--panel2, #12213a); }
  .fpStatSess { color: var(--muted); font-size: 11px; line-height: 1.35; padding: 6px 6px 4px; border-top: 1px solid var(--border); margin-top: 4px; max-width: 240px; white-space: normal; }
  .fpStatMenu .fpBtn { width: 100%; margin-top: 2px; }
  .fpHours[hidden] { display: none; }
  .fpHoursIn { display: inline-flex; gap: 6px; align-items: center; }
  .fpHoursIn input { width: 96px; }
  #ctyMenu .ctyFp { padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid var(--border); }
  @media (pointer: coarse) { .fpStatItem { min-height: 36px; padding: 2px 6px; } }
  .fpPanel { position: absolute; top: 4px; right: 88px; z-index: 6; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: calc(100% - 100px); padding: 4px 6px 4px 8px; border-radius: 6px; background: color-mix(in srgb, var(--panel2) 95%, transparent); border: 1px solid var(--border2); box-shadow: 0 4px 16px rgba(0,0,0,.45); font-size: 12px; color: var(--text2); }
  .fpPanel[hidden] { display: none; }
  .fpPanel label { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
  .fpPanel input[type=number] { width: 50px; padding: 2px 4px; }
  .fpPanel select { padding: 2px 4px; }
  .fpPanel .fpMsg { color: var(--muted); font-size: 11px; flex-basis: 100%; }
  .fpPanel .fpMsg:empty { display: none; }
  .fpPanel .fpMsg.bad { color: #ffb74d; }
  .fpBtn { background: var(--panel2, #0f1b2d); border: 1px solid var(--border); color: var(--text, #e6ebf1); border-radius: 6px; font: inherit; font-size: 12px; padding: 3px 9px; cursor: pointer; white-space: nowrap; }
  .fpBtn:hover { border-color: #4aa3ff; }
  .fpBtn.fpPrimary { background: #1d4f91; border-color: #2f6fc1; }
  .fpX { background: none; border: 0; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 4px; cursor: pointer; }
  .fpX:hover { color: #fff; }
  .fpDlgBack { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
  .fpDlg { width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--panel, var(--panel2)); border: 1px solid #2a3d5c; border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.6); color: var(--text, #e6ebf1); font-size: 13px; }
  .fpDlgHead { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .fpDlgHead h3 { margin: 0; font-size: 15px; }
  .fpDlgBody { overflow-y: auto; padding: 8px 14px 4px; }
  .fpDlg fieldset { border: 1px solid var(--border); border-radius: 8px; margin: 0 0 10px; padding: 6px 10px 8px; }
  .fpDlg legend { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 0 4px; }
  .fpRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; }
  .fpRow > span { flex: 1; }
  .fpRow input[type=number], .fpRow select { width: 150px; background: var(--bg); border: 1px solid var(--border); color: inherit; border-radius: 6px; padding: 4px 6px; font: inherit; }
  .fpRow.chk, .fpRow.color { justify-content: flex-start; }
  .fpRow input[type=color] { width: 34px; height: 24px; padding: 0; border: 1px solid var(--border); border-radius: 4px; background: none; }
  .fpGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .fpTpl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 10px; }
  .fpTpl select, .fpTpl input { background: var(--bg); border: 1px solid var(--border); color: inherit; border-radius: 6px; padding: 4px 6px; font: inherit; }
  .fpTpl input { width: 140px; }
  .fpNote { color: var(--muted); font-size: 11px; flex-basis: 100%; margin: 0; }
  .fpDlgFoot { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); }
  .fpSpacer { flex: 1; }
  @media (max-width: 600px) { .fpPanel { right: 4px; left: 4px; max-width: none; } .fpPanel input[type=number] { width: 42px; } .fpRow input[type=number], .fpRow select { width: 120px; } .fpGrid { grid-template-columns: 1fr; } .fpDlgFoot .fpBtn { padding: 5px 8px; } }
  @media (max-width: 600px) { .ofBar { left: 4px; transform: none; max-width: calc(100% - 92px); gap: 4px; font-size: 11px; } .ofBar input[type=number] { width: 40px; } .ofBar .ofMsg { display: none; } }
  #tmTip { position: fixed; z-index: 60; pointer-events: none; max-width: min(300px, calc(100vw - 8px)); background: var(--panel2); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-size: 12px; line-height: 1.35; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
  #tmTip .tmRow + .tmRow { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); }
  #tmTip .tmMute { color: var(--muted); }
  #ctyMenu .ctyPast { display: flex; align-items: center; gap: 4px; margin: 6px 0 2px; font-size: 12px; cursor: pointer; }
  #ctyMenu .ctyPast small { color: var(--muted); }
  #ctLayer, #otLayer { position: absolute; left: 0; top: 0; right: 80px; bottom: 0; z-index: 6; pointer-events: none; overflow: hidden; }
  #ctLayer[hidden], #ctBar[hidden] { display: none; }
  #otNote { position: absolute; left: 8px; bottom: 30px; z-index: 7; max-width: calc(100% - 100px); padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: color-mix(in srgb, var(--bg) 92%, transparent); font-size: 12px; }
  #otNote.err { color: var(--bear); }
  #otNote[hidden] { display: none; }
  .ordBadge { display: inline-block; min-width: 16px; padding: 0 5px; border-radius: 8px; background: var(--orange); color: var(--onOrange); font-size: 11px; font-weight: 800; line-height: 16px; text-align: center; }
  .ordBadge[hidden] { display: none; }
  .ordHead { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 6px; }
  .ordOpt { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
  .ordBar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
  tr.ordrow { cursor: pointer; }
  .ordNew { width: 90px; text-align: right; }
  .tkWorking { margin-left: 8px; border: 1px solid var(--orange); background: transparent; color: var(--orangeText); border-radius: 10px; padding: 0 8px; font-size: 11px; font-weight: 700; min-height: 28px; cursor: pointer; }
  .tkWorking[hidden] { display: none; }
  @media (max-width: 800px) { .tkWorking { min-height: 40px; } }
  .ctChip { position: absolute; right: 8px; transform: translateY(-50%); display: flex; gap: 3px; pointer-events: auto; }
  .ctChip[hidden] { display: none; }
  .ctChip button { border: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--text); border-radius: 4px; padding: 1px 7px; font-size: 11px; font-weight: 700; line-height: 16px; cursor: pointer; }
  .ctChip button:hover { background: var(--panel2); }
  .ctChip button.ctRev { color: var(--orangeText); }
  .ctChip button.ctFlat, .ctChip button.otClose { color: var(--bear); }
  #ctBar { position: absolute; left: 8px; top: 8px; z-index: 7; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; max-width: calc(100% - 100px); padding: 4px; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); font-size: 11px; }
  #ctBar button { border: 1px solid var(--border); background: var(--panel2); color: var(--muted); border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 800; cursor: pointer; min-height: 28px; }
  #ctBar button:disabled { opacity: .45; cursor: default; }
  #ctBar button.ctBuy { background: var(--bull); border-color: var(--bull); color: var(--onBull); }
  #ctBar button.ctSell { background: var(--sell); border-color: var(--sell); color: #fff; }
  #ctBar button.ctPre.on { background: var(--orange); border-color: var(--orange); color: var(--onOrange); }
  #ctBar input[type=text] { width: 56px; min-height: 28px; padding: 2px 8px; font-size: 12px; text-align: right; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; }
  #ctExitNote { color: var(--muted); max-width: 260px; }
  #ctQtyUnit { color: var(--muted); font-weight: 700; white-space: nowrap; }
  #ctBar select { max-width: 150px; min-height: 28px; padding: 2px 8px; font-size: 12px; border-radius: 8px; background: var(--panel2); color: var(--text); border: 1px solid var(--border); }
  #ctBar label { color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
  #ctChip { border-radius: 10px; padding: 1px 8px; font-weight: 700; }
  #ctChip.demo { color: var(--bull); border: 1px solid rgba(0, 208, 132, .5); }
  #ctChip.live { background: var(--liveMark); color: #fff; border: 1px solid var(--liveMark); }
  #ctMsg { flex-basis: 100%; color: var(--muted); }
  #ctMsg.err { color: var(--bear); }
  #paneCT[aria-pressed=true] { color: var(--orangeText); background: var(--panel2); }
  .goLatest { position: absolute; right: 86px; bottom: 30px; z-index: 5; border: 1px solid var(--orange); background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--orangeText); border-radius: 14px; padding: 4px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
  .goLatest[hidden] { display: none; }
  /* Center sits in the plot, just left of the price axis (the chart's rightPriceScale.minimumWidth, 80px), so it never
     covers an axis price. Jump to latest moves left of it while both show. */
  .ctrBtn { position: absolute; right: calc(var(--pxAxisW, 80px) + 4px); bottom: max(32px, calc(var(--fp-stat-clear, 0px) + 4px)); z-index: 6; border: 1px solid var(--border2); background: color-mix(in srgb, var(--panel2) 92%, transparent); color: var(--text2); border-radius: 4px; padding: 2px 5px; font-size: 10px; font-weight: 700; line-height: 1.3; cursor: pointer; }
  .ctrBtn:hover { border-color: var(--orange); color: var(--orangeText); }
  .ctrBtn[hidden] { display: none; }
  #price:has(#ctrBtn:not([hidden])) .goLatest { right: calc(var(--pxAxisW, 80px) + 60px); }
  #chartMsg { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; text-align: center; padding: 20px; pointer-events: none; }
  #chartMsg[hidden] { display: none; }
  #chartMsg.err { color: var(--bearText); }
  #chartMsg button { pointer-events: auto; }
  #chartMsg .spin { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--orange); border-radius: 50%; animation: cmspin 0.9s linear infinite; }
  #chartMsg.err .spin, #chartMsg.calm .spin { display: none; }
  #chartNote { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 5; max-width: calc(100% - 32px); border: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--muted); border-radius: 12px; padding: 3px 12px; font-size: 12px; text-align: center; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #chartNote[hidden] { display: none; }
  #stratChip { position: absolute; left: 8px; bottom: 34px; z-index: 5; max-width: calc(100% - 90px); border: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--muted); border-radius: 12px; padding: 2px 10px; font-size: 11px; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #stratChip[hidden] { display: none; }
  #stratChip.run { color: #7ee2b8; border-color: rgba(0,208,132,.5); }
  #stratChip.warn { color: #f0b27a; border-color: rgba(240,178,122,.5); }
  #stratChip.trade { color: var(--text); border-color: var(--accent, #4c8dff); }
  #chartNote.err { color: var(--bearText); border-color: #7f1d1d; }
  @keyframes cmspin { to { transform: rotate(360deg); } }
  .stCard [hidden], .stCard .row[hidden] { display: none !important; }
  #stRunning { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); color: var(--muted); padding: 6px 10px; font-size: 12px; font-weight: 700; text-align: left; }
  #stRunning:hover { color: var(--text); border-color: var(--orange); }
  #stRunning[hidden] { display: none; }
  #stRunning b { color: var(--text); }
  #stRunning.on b { color: var(--bull); }
  #stRunning .go { color: var(--orangeText); white-space: nowrap; }
  #hdrNav .navCount[hidden] { display: none; }
  #hdrNav .navCount { margin-left: 7px; min-width: 16px; padding: 0 5px; border-radius: 8px; background: var(--panel); color: var(--muted); font-size: 10px; line-height: 16px; display: inline-block; text-align: center; }
  #hdrNav .navCount.on { background: rgba(0,208,132,.2); color: var(--bull); }
  #hdrNav button.on .navCount, #hdrNav button.on .navCount.on { background: color-mix(in srgb, var(--bg) 22%, transparent); color: var(--onOrange); }
  #strategies { flex: 1; min-height: 0; display: flex; background: var(--bg); }
  #strategies[hidden] { display: none; }
  body.strat main, body.strat #mLayoutRow { display: none !important; }
  body.embed #strategies { display: none !important; }
  #stMain, #opMain { flex: 1 1 auto; min-width: 0; overflow: auto; padding: 12px 16px 24px; }
  #stDetail, #opDetail { flex: 0 0 440px; width: 440px; overflow: auto; padding: 10px 16px 0; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; }
  #stDetailBody, #opDetailBody { display: flex; flex-direction: column; flex: 1; min-width: 0; }
  /* Strategies tab: the right-hand strategy panel folds like the Trading tab's order ticket (Fold » / « Panel), Dion 11-18.
     Folded, a slim edge tab keeps START/STOP and FLATTEN for the strategy shown, so folding never hides how to stop an algo. */
  .stFoldBar { display: flex; justify-content: flex-end; flex: none; margin: -4px -6px 0; }
  .stFoldBar .fold { border: 0; border-radius: 0; background: transparent; color: var(--muted); padding: 6px 8px; font-size: 12px; white-space: nowrap; }
  .stFoldBar .fold:hover { color: var(--text); }
  #stRail { display: none; flex: 0 0 auto; flex-direction: column; align-items: stretch; gap: 6px; padding-bottom: 8px; background: var(--panel); border-left: 1px solid var(--border); }
  #strategies.stFolded #stDetail { display: none; }
  #strategies.stFolded #stRail { display: flex; }
  #stOpen { border: 0; border-radius: 0; background: var(--panel); color: var(--muted); padding: 10px 4px; writing-mode: vertical-rl; font-size: 11px; letter-spacing: .5px; }
  #stOpen:hover { color: var(--text); }
  #stOpen .stOpenM, #stRailName { display: none; }
  #stRail #stRailGo, #stRail #stRailFlat { writing-mode: vertical-rl; margin: 0 4px; padding: 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: .5px; border-radius: 6px; }
  #stRail #stRailFlat { border: 1px solid var(--bearSolid); background: var(--bearSolid); color: #fff; }
  @media (max-width: 1000px) {
    /* Phone and narrow windows: the panel stacks under the list; folded it is a bottom sheet collapsed to one bar. */
    /* The folded bar is pinned to the viewport, just above the phone tab bar (--pbH, which already includes the
       safe-area inset; 0 when there is no tab bar), so START/STOP, FLATTEN and the unfold control stay on screen however
       long the strategy list is. #stMain is padded by the bar's height so the end of the list can scroll clear of it. */
    #strategies.stFolded #stMain { flex: 1 0 auto; padding-bottom: calc(24px + 64px + env(safe-area-inset-bottom)); }
    #stRail { position: fixed; left: 0; right: 0; bottom: var(--pbH, 0px); z-index: 60; box-sizing: border-box; flex-direction: row; align-items: center; gap: 8px; padding: 8px 10px max(8px, env(safe-area-inset-bottom)); border-left: 0; border-top: 1px solid var(--border); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.45); }
    #stOpen { writing-mode: horizontal-tb; flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 8px 4px; text-align: left; font-size: 13px; color: var(--text); background: transparent; }
    #stOpen .stOpenD { display: none; }
    #stOpen .stOpenM { display: inline; }
    #stRail #stRailGo, #stRail #stRailFlat { writing-mode: horizontal-tb; flex: none; margin: 0; min-height: 44px; padding: 8px 12px; font-size: 12px; }
    .stFoldBar .fold { min-height: 44px; padding: 8px 10px; }
  }
  #stDetailBody > .stCard:first-of-type, #opDetailBody > .stCard:first-of-type { margin-top: 4px; }
  #stTop, #opTop { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
  #stTop h2, #opTop h2 { margin: 0; font-size: 18px; letter-spacing: -.3px; }
  #stSummary, #opSummary { color: var(--muted); font-size: 12px; font-weight: 600; }
  #stAddWrap { position: relative; }
  #stAddBtn { background: var(--orange); border-color: var(--orange); color: var(--onOrange); font-weight: 700; padding: 6px 12px; }
  .stPick { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 300px; max-width: calc(100vw - 24px); display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 34px rgba(0,0,0,.55); }
  .stPick[hidden] { display: none; }
  .stPick .sbtn { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 6px; }
  .stPick .sbtn:hover { background: var(--panel2); }
  .stPick .sbtn[hidden] { display: none; }
  .stPick .sbtn small { color: var(--muted); font-weight: 500; font-size: 11px; white-space: nowrap; }
  .stPick .stPickGrp { display: flex; flex-direction: column; gap: 2px; }
  .stPick .stPickGrp + .stPickGrp { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
  .stPick .stPickHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 10px 2px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
  .stPick .stPickHead .sbtn { padding: 2px 10px; font-size: 11px; text-transform: none; letter-spacing: 0; color: var(--orangeText); }
  .stPick .stRec, .stPick .stNeed { margin-left: 6px; padding: 1px 6px; border-radius: 8px; font-size: 10px; font-weight: 800; }
  .stPick .stRec { background: var(--orange); color: var(--onOrange); }
  .stPick .stNeed { border: 1px solid var(--border); color: var(--muted); }
  #stAddBtn { white-space: nowrap; }
  .stItem .nm .stNoStop { display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 8px; min-height: 22px; border: 1px solid var(--bear); border-radius: 10px; background: none; color: var(--bearText); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
  .stItem .nm .stNoStop:hover, .stItem .nm .stNoStop:focus-visible { background: var(--panel2); }
  @media (pointer: coarse) { .stItem .nm .stNoStop { min-height: 32px; } }
  #simPxBar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 6px 14px; background: var(--panel2); color: var(--orangeText); font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--orange); }
  #simPxBar .sbtn { padding: 4px 10px; font-size: 12px; font-weight: 600; }
  @media (pointer: coarse) { #simPxBar .sbtn { min-height: 40px; } }
  #stErr { margin-top: 0; }
  #stDone { margin: 6px 0; padding: 6px 10px; border-radius: 8px; background: rgba(255,107,0,.1); border: 1px solid rgba(255,107,0,.35); color: var(--orangeText); font-size: 12px; font-weight: 700; }
  #stDone[hidden] { display: none; }
  #stList { display: flex; flex-direction: column; gap: 4px; }
  #stList .stWhy { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .stItem { display: grid; grid-template-columns: minmax(120px, 1.4fr) minmax(76px, 1fr) minmax(94px, 1fr) minmax(100px, 1.1fr) 64px 79px 79px 168px; align-items: center; column-gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 8px; background: var(--panel2); cursor: pointer; font-size: 12px; }
  .stItem:hover { background: var(--rowHover); }
  .stItem:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
  .stItem.cur { border-color: var(--orange); background: rgba(255,107,0,.06); }
  .stItem.live { border-left-color: var(--bear); }
  .stItem.demo { border-left-color: #5aa9ff; }
  .stHdr { background: none; border-color: transparent; cursor: default; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; padding-top: 0; padding-bottom: 2px; margin-bottom: 2px; }
  .stHdr:hover { background: none; }
  .stItem .nm { min-width: 0; display: flex; flex-direction: column; font-weight: 700; }
  .stItem .nm span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stItem .nm small { color: var(--muted); font-weight: 500; font-size: 11px; }
  .stItem .nm em { font-style: normal; color: var(--muted); font-weight: 600; font-size: 10px; margin-left: 4px; }
  .stItem .nm .stNmL { display: flex; align-items: center; min-width: 0; }
  .stItem .nm .stNmT { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .stItem .nm .stRen { flex: none; margin-left: 4px; padding: 0 5px; min-height: 22px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; border-radius: 6px; opacity: .55; }
  .stItem:hover .nm .stRen, .stItem .nm .stRen:focus-visible { opacity: 1; background: var(--panel2); }
  @media (pointer: coarse) { .stItem .nm .stRen { min-height: 32px; min-width: 32px; opacity: .8; } }
  .stItem .nm .stRenIn { min-width: 0; width: 100%; max-width: 260px; font: inherit; font-weight: 700; padding: 2px 6px; }
  .snm { display: inline-flex; flex-direction: column; line-height: 1.2; min-width: 0; }
  .snm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .snm small { color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
  .pill .pNm { font-weight: 700; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
  .pill .pSub { color: var(--muted); font-size: 10px; }
  #stAlgoSub { display: block; color: var(--muted); font-size: 11px; margin: -2px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #stAlgoSub[hidden], #stNameHint[hidden] { display: none; }
  .stNameBox { display: flex; gap: 6px; align-items: center; min-width: 0; flex: 1 1 auto; justify-content: flex-end; }
  .stNameBox input { width: 200px; max-width: 100%; min-width: 0; }
  .stNameBox .sbtn[hidden] { display: none; }
  #stNameHint { display: block; margin: -2px 0 6px; color: var(--muted); }
  .stPick .stPickName { display: flex; align-items: center; gap: 8px; flex: none; padding: 2px 2px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
  .stPick .stPickName input { flex: 1 1 auto; min-width: 0; max-width: 260px; }
  #logWho { position: sticky; top: 0; padding: 4px 6px; font-size: 11px; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--border); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #logWho[hidden] { display: none; }
  #algoLine .alNm { font-weight: 700; }
  .stItem .sym { font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stItem .stState { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
  .stItem .stIdle { flex-basis: 100%; color: var(--muted); font-size: 11px; line-height: 1.3; }
  .stItem .stPnl, .stHdr span:nth-child(6), .stHdr span:nth-child(7) { text-align: right; }
  .stItem .stFigL { display: none; }
  #stTotals { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 8px; }
  #stTotals[hidden] { display: none; }
  .stTot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; max-width: 100%; padding: 6px 10px; border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 8px; background: var(--panel2); font-size: 12px; }
  .stTot.live { border-left-color: var(--bear); }
  .stTot.demo { border-left-color: #5aa9ff; }
  .stTot .stTotH { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
  .stTot .stTotF { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
  .stTot .stFigL { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
  .stItem .stAct { display: flex; gap: 4px; justify-content: flex-end; }
  .lpPair { display: inline-flex; align-items: center; gap: 4px; }
  #pform .row.lpHide, #pform .lpOff { display: none !important; }
  .stItem .lpExits { display: block; color: var(--muted); font-size: 10px; font-weight: 600; white-space: normal; }
  .lpPair input { width: 64px; }
  .stItem .lpWhy { display: block; color: var(--muted); font-size: 10px; font-weight: 500; white-space: normal; }
  .stItem .sbtn { padding: 3px 8px; font-size: 11px; }
  .stItem .sbtn.flat { color: var(--bearText); }
  .stItem .acct, .stCard .acct { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 4px; background: #2a3340; color: #9fb3c8; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; justify-self: start; max-width: 100%; }
  .stItem .acct.demo, .stCard .acct.demo { background: #123528; color: #6fd3a0; }
  .stItem .acct.live, .stCard .acct.live { background: #b3261e; color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
  .stChip.busy { background: rgba(255,107,0,.15); color: var(--orangeText); border-color: rgba(255,107,0,.4); }
  .stChip.err { background: rgba(239,83,80,.15); color: var(--bearText); border-color: rgba(239,83,80,.4); }
  .stEmpty { padding: 28px 12px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 8px; }
  #opTop { flex-wrap: wrap; }
  #opTop .spacer { flex: 1; }
  #opSource, #opAge { margin: 0; text-align: right; }
  #opAge { margin-left: 4px; white-space: nowrap; }
  #opSource.warn, #opAge.warn { color: #f0b27a; }
  @media (max-width: 900px) { #opSource { flex: 1 1 100%; text-align: left; } #opAge { flex: 1 1 100%; margin-left: 0; text-align: left; } #opTop .spacer { display: none; } }
  .opForm { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 6px; }
  .opForm label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
  .opForm input, .opForm select { background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; }
  .opForm input { width: 110px; text-transform: uppercase; }
  .opForm select { min-width: 220px; max-width: 100%; }
  .optUndWrap { position: relative; display: block; }
  .optUndMenu { position: absolute; z-index: 40; top: calc(100% + 2px); left: 0; width: min(360px, calc(100vw - 32px)); max-height: 360px; overflow-y: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.25); text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; color: var(--text); }
  .optUndMenu .ouG { position: sticky; top: 0; display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; background: var(--panel2); color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
  .optUndMenu .ouG span { font-weight: 400; text-transform: none; letter-spacing: 0; }
  .optUndMenu .ouI { display: flex; gap: 8px; align-items: baseline; padding: 6px 8px; cursor: pointer; }
  .optUndMenu .ouI b { min-width: 64px; }
  .optUndMenu .ouI small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .optUndMenu .ouI.on, .optUndMenu .ouI:hover { background: var(--panel2); }
  .optUndMenu .ouN { padding: 6px 8px; color: var(--muted); font-size: 12px; }
  /* Strategies "Stock or ETF": the same menu, fixed to the viewport so the scrolling card never clips it (Dion 11-18). */
  .oaSymWrap { position: relative; display: inline-block; }
  .optUndMenu.undFixed { position: fixed; z-index: 75; width: 320px; max-width: calc(100vw - 16px); text-align: left; }
  .optUndMenu .ouI { min-height: 22px; }
  @media (pointer: coarse) { .optUndMenu .ouI { min-height: 40px; align-items: center; } }
  #optTable td, #optTable th { white-space: nowrap; }
  #optScroll { overflow: auto; max-height: max(320px, calc(100dvh - 240px)); }
  #optTable { table-layout: fixed; }
  #optTable.adv { min-width: 640px; }
  #optTable col.cI { width: 7.5%; }
  #optTable col.cP { width: 16%; }
  #optTable col.cK { width: 10%; }
  #optTable col.sK { width: 15%; }
  #optTable col.sD { width: 12%; }
  #optTable col.sC { width: 16%; }
  #optTable col.sP { width: 14%; }
  #optTable col.sX { width: 13%; }
  #optTable col.sA { width: 30%; }
  #optTable.simple th { white-space: normal; vertical-align: bottom; line-height: 1.2; }
  #optTable.simple td.strike, #optTable.simple th.strike { text-align: left; padding-left: 8px; }
  #optTable td.strike, #optTable.adv thead tr + tr th:nth-child(5) { text-align: center; }
  #optTable thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
  #optTable.adv thead tr + tr th { top: 22px; }
  #optTable td.strike { background: rgba(255,255,255,.04); font-weight: 500; }
  #optTable tr.atm td.strike { font-weight: 800; }
  #optTable.simple tr.itm td, #optTable.adv tr.itmCall td:nth-child(-n+4), #optTable.adv tr.itmPut td:nth-child(n+6) { background: color-mix(in srgb, var(--orange) 9%, transparent); }
  #optTable th.pxHead { color: var(--text); font-weight: 700; }
  .optSeg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; align-self: flex-end; }
  .optSeg button { padding: 6px 14px; border: 0; background: var(--panel2); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
  .optSeg button + button { border-left: 1px solid var(--border); }
  #optDir button.on[data-dir=buy] { background: var(--bull); color: var(--onBull); }
  #optDir button.on[data-dir=sell] { background: var(--bear); color: #fff; }
  #optCP button.on { background: var(--orange); color: var(--onOrange); }
  #optCP[hidden] { display: none; }
  #optAdv[aria-pressed=true] { border-color: var(--orange); color: var(--orangeText); }
  .optPxLbl { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
  .optName { font-size: 15px; font-weight: 800; margin-top: 8px; }
  .optName:empty { display: none; }
  #optTable tr.spotRow td { position: sticky; top: var(--optHead, 44px); bottom: 0; z-index: 1; padding: 0; height: 30px; background: var(--panel) linear-gradient(var(--orange), var(--orange)) center / 100% 1px no-repeat; }
  #optTable .spotWrap { display: flex; justify-content: center; }
  #optTable .spotPill { position: sticky; left: 8px; right: 8px; flex: none; white-space: nowrap; display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--orange); color: var(--onOrange); font-size: 12px; font-weight: 700; }
  #optTable .spotPill small { font-weight: 600; opacity: .9; }
  #optTable .spotPill .pos, #optTable .spotPill .neg { color: #fff; }
  #optJump { padding: 4px 12px; border-radius: 999px; }
  #optNeed p, #optPlan p { margin: 0 0 10px; }
  #optPlan, #optTradeNeed, #optFutNote { margin: 8px 0; padding: 10px 12px; border: 1px solid rgba(255,107,0,.4); border-radius: 8px; background: rgba(255,107,0,.08); }
  #optPlan p, #optTradeNeed p, #optFutNote p { margin: 0 0 8px; color: var(--text); }
  #optTicketEmpty { margin: 4px 0; }
  .optFlow { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
  .optStep { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px; }
  .optStep label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
  .optStep input, .optStep select { background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; width: 120px; max-width: 100%; }
  .optStep select#optFExp { width: 150px; }
  .optStep #optFUnd { width: 72px; }
  .optStep #optFStrike { width: 84px; }
  .optStep #optFType { width: 78px; }
  .optStep #optFStrike { -moz-appearance: textfield; appearance: textfield; }
  .optStep #optFStrike::-webkit-inner-spin-button, .optStep #optFStrike::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
  @media (max-width: 800px) { .optStep { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } .optStep input, .optStep select, .optStep select#optFExp, .optStep #optFUnd, .optStep #optFStrike, .optStep #optFType { width: 100%; min-width: 0; box-sizing: border-box; text-overflow: ellipsis; } }
  .optStepH { display: flex; align-items: center; margin: 8px 0 4px; font-weight: 700; font-size: 12.5px; }
  .optNext { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px solid var(--orange); border-radius: 8px; padding: 6px 8px; font-size: 12.5px; }
  .optNext[hidden] { display: none; }
  .alpacaGuide { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin: 8px 0; font-size: 12.5px; }
  .alpacaGuide ol { margin: 6px 0; padding-left: 18px; color: var(--muted); line-height: 1.5; }
  .alpacaGuide a { color: var(--orangeText); }
  #optWhy { margin-top: 4px; }
  #optGuide[hidden] { display: none; }
  #optNeed h3 { margin: 0 0 6px; color: var(--text); font-size: 16px; }
  #optNeed p { max-width: 520px; margin: 0 auto 12px; line-height: 1.45; }
  #optNeed .optNeedGo { min-height: 44px; padding: 0 18px; background: var(--orange); border-color: var(--orange); color: var(--onOrange); font-weight: 700; }
  #optPos .posExit { margin: 2px 0 0; }
  #optPos { overflow-x: auto; }
  #optPos td.r, #pracBox td.r { white-space: nowrap; }
  #optReview .optLegs { width: 100%; margin: 4px 0; border-collapse: collapse; font-size: 12px; }
  #optReview .optLegs td { padding: 2px 4px; border-top: 1px solid var(--border); }
  #optReview .optLegs tr.legBuy td:nth-child(2) { color: var(--bull); }
  #optReview .optLegs tr.legSell td:nth-child(2) { color: var(--bear); }
  #optReview .optPickRow td { color: var(--orangeText); font-weight: 700; }
  #optReview .optNet { margin: 2px 0; }
  .optLegX { width: 28px; height: 28px; padding: 0; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; }
  .optLegX:hover { color: var(--bear); border-color: var(--bear); }
  #optTable td.optPxCell { padding-right: 2px; }
  #optTable .optAdd { margin-left: 5px; width: 28px; height: 28px; padding: 0; vertical-align: middle; border-radius: 6px; border: 1px solid var(--border); background: var(--panel2); color: var(--orangeText); font-weight: 800; font-size: 14px; line-height: 1; cursor: pointer; }
  #optTable .optAdd:hover { border-color: var(--orange); }
  #optTable[data-plus-hidden~="px"] td.px .optAdd:not(.on), #optTable[data-plus-hidden~="cpx"] td.cpx .optAdd:not(.on), #optTable[data-plus-hidden~="ppx"] td.ppx .optAdd:not(.on) { visibility: hidden; pointer-events: none; }
  #optTable .optAdd.on { background: var(--orange); border-color: var(--orange); color: var(--onOrange); }
  #optTable tr.legRow td { box-shadow: inset 0 1px 0 var(--orange), inset 0 -1px 0 var(--orange); }
  #optTable tr.legRow td:first-child { box-shadow: inset 3px 0 0 var(--orange), inset 0 1px 0 var(--orange), inset 0 -1px 0 var(--orange); }
  .optPickHint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; padding: 8px 10px; border: 1px solid var(--orange); border-radius: 10px; background: color-mix(in srgb, var(--orange) 8%, transparent); }
  .optPickHint[hidden] { display: none; }
  .optPickHint .slot { padding: 3px 8px; border-radius: 999px; border: 1px dashed var(--orange); color: var(--orangeText); font-size: 12px; font-weight: 700; }
  .optPickHint .slot.on { border-style: solid; background: var(--orange); color: var(--onOrange); }
  .optPickHint button.slot { cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
  .optPickHint .slot .legSide { display: inline-block; margin: 0 2px; padding: 0 6px; border-radius: 999px; background: rgba(4,8,15,.85); } /* a dark chip so the light green / pink side reads on the orange leg slot */
  .optPickHint .slot .legSide.buy { color: #b7f5d2; }
  .optPickHint .slot .legSide.sell { color: #ffc9c9; }
  #ordLegs[hidden], #optBarGo[hidden], #ordForm .ordRow[hidden] { display: none; }
  .ordLegs { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
  .ordLegs span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel2); font-size: 12.5px; }
  .ordLegs span.buy b { color: var(--bull); }
  .ordLegs span.sell b { color: var(--bear); }
  #optBarGo:disabled { opacity: .5; cursor: not-allowed; }
  .optPickHint .help { flex-basis: 100%; margin: 0; }
  #optPayoff { margin: 6px 0; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
  #optPayoff[hidden] { display: none; }
  .optPayHead { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
  .optPaySvg { display: block; width: 100%; height: auto; }
  .optPaySvg .up { fill: color-mix(in srgb, var(--bull) 28%, transparent); }
  .optPaySvg .dn { fill: color-mix(in srgb, var(--bear) 28%, transparent); }
  .optPaySvg .pl { fill: none; stroke: var(--text); stroke-width: 1.6; }
  .optPaySvg .zero { stroke: var(--muted); stroke-width: 1; opacity: .6; }
  .optPaySvg .spot { stroke: var(--orange); stroke-width: 1.2; stroke-dasharray: 3 3; }
  .optPaySvg .be { fill: var(--panel); stroke: var(--text); stroke-width: 1.4; }
  .optPaySvg text { fill: var(--muted); font-size: 10px; }
  .optPaySvg .spotT { fill: var(--orange); font-weight: 700; }
  .optStats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin-top: 6px; font-size: 12px; }
  .optStats span { color: var(--muted); }
  #optSheetBar { display: none; }
  #opTop #optGear { min-width: 36px; padding: 4px 8px; font-size: 15px; }
  #paMsg:empty { display: none; }
  #opTop #optClear { color: var(--orangeText); font-weight: 700; font-size: 14px; text-decoration: none; padding: 6px 4px; }
  #optClear[hidden], #optTools[hidden], #optBuild[hidden], #optBar[hidden], #optOrd[hidden], #ordAcct[hidden], #ordRev[hidden], #ordDone[hidden], #ordForm[hidden], #ordPxRow[hidden] { display: none; }
  #optTools { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel2); }
  #optTools .sbtn { min-height: 36px; }
  #optChips, #optBuild { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 2px 0 8px; padding-bottom: 2px; }
  #optChips::-webkit-scrollbar, #optBuild::-webkit-scrollbar { display: none; }
  #optChips button, #optBuild button { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel2); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
  #optChips button[aria-pressed=true], #optBuild button[aria-pressed=true] { background: var(--orange); border-color: var(--orange); color: var(--onOrange); }
  #optChips button[data-chip=builder] { border-style: dashed; }
  /* Phone: 44 px touch targets the lane 3 rule (#539, near the end of the first stylesheet) does not cover:
     + Add strategy, the options algo's structure buttons, the Bid / Mid / Ask buttons' width and the full ticket's exit fields. */
  @media (max-width: 560px) {
    #stAddBtn, #oaStruct button, #oaDir { min-height: 44px; }
    #optQuick button { min-width: 44px; }
    #optExit input[type=number], #optExit input[type=time] { min-height: 44px; }
  }
  #optBar { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; gap: 12px; margin: 8px 0 0; padding: 12px 16px; background: var(--panel); border: 1px solid var(--orange); border-radius: 12px; box-shadow: 0 -8px 20px rgba(0,0,0,.35); }
  #optBarTxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  #optBarName { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #optBarCost { color: var(--muted); font-size: 12.5px; }
  #optBarGo, .ordGo { min-height: 48px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--bull); color: var(--onBull); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
  .ordGo { width: 100%; margin-top: 10px; }
  .ordGo:disabled { opacity: .45; cursor: not-allowed; }
  #options.ordOpen #opDetailBody > :not(#optOrd) { display: none; }
  #optOrd { padding: 4px 0 16px; }
  #optOrd .ordTop { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
  #optOrd .ordTop .linkBtn { color: var(--orangeText); font-size: 14px; font-weight: 700; text-decoration: none; }
  #ordAcct { margin-left: auto; max-width: 62%; min-height: 36px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); color: var(--text); font: inherit; font-size: 12.5px; }
  #optOrd h3 { margin: 4px 0 2px; font-size: 20px; line-height: 1.25; }
  .ordSub { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
  .ordQtyBox { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 13px; font-weight: 700; }
  #ordQty { width: 50%; border: 0; background: none; color: var(--text); font: inherit; font-size: 34px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
  .ordPad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 8px 0 10px; }
  .ordPad button { min-height: 44px; border: 0; border-radius: 10px; background: var(--panel2); color: var(--text); font: inherit; font-size: 20px; font-weight: 700; cursor: pointer; }
  .ordPad button:active { background: color-mix(in srgb, var(--orange) 25%, var(--panel2)); }
  .ordRow { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
  .ordRow > span { color: var(--muted); font-weight: 600; }
  .ordRow > b { margin-left: auto; text-align: right; }
  .ordRow select, .ordRow input { min-height: 36px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); color: var(--text); font: inherit; font-size: 14px; }
  .ordRow input { width: 120px; text-align: right; font-weight: 700; }
  .ordQuote { display: flex; justify-content: flex-end; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--border); }
  .ordQuote button { min-height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel2); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
  .ordQuote button.on { border-color: var(--orange); color: var(--orangeText); }
  .ordStats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; text-align: center; }
  .ordStats div { padding: 8px 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel2); font-size: 13px; }
  .ordStats span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; margin-bottom: 2px; }
  #ordChart { border-bottom: 1px solid var(--border); padding: 4px 0 8px; }
  #ordChart summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; font-weight: 700; font-size: 13.5px; }
  .ordRow .linkBtn, .ordMore .linkBtn { color: var(--orangeText); text-decoration: none; font-weight: 700; font-size: 13px; }
  .ordMore { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 4px; }
  #ordWhy:empty, #ordRevMsg:empty { display: none; }
  #ordWhy { margin-top: 6px; color: var(--bear); }
  #ordRevRows { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0; font-size: 13px; }
  #ordRevRows dt { color: var(--muted); font-weight: 600; }
  #ordRevRows dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
  #ordRevRows dd.tcWide { grid-column: 1 / -1; text-align: left; font-weight: 800; font-size: 14px; }
  #ordRev.live h3 { color: var(--bear); }
  #ordRev .sbtn, #ordDone .linkBtn { width: 100%; min-height: 44px; margin-top: 8px; }
  #ordDone { text-align: center; padding-top: 16px; }
  .ordTick { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--bull); color: var(--onBull); font-size: 32px; font-weight: 800; }
  #ordDone.err .ordTick { background: var(--bear); }
  #ordDone p { color: var(--muted); overflow-wrap: anywhere; }
  @media (max-width: 768px) {
    #options.legSheet { padding-bottom: calc(76px + var(--pbH, 0px)); }
    body:has(#options.legSheet:not([hidden])) #dock { margin-bottom: 76px; }
    #options.legSheet #optTicketCard { position: fixed; left: 0; right: 0; bottom: var(--pbH, 0px); z-index: 106; margin: 0; max-height: min(78dvh, calc(100dvh - var(--hdrB, 56px) - var(--pbH, 0px) - 8px)); overflow: auto; border-radius: 14px 14px 0 0; border-bottom: 0; box-shadow: 0 -8px 24px rgba(0,0,0,.45); padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
    #options.legSheet #optSheetBar { display: flex; align-items: center; gap: 8px; position: sticky; top: -8px; z-index: 1; margin: -8px -10px 6px; padding: 10px; background: var(--panel2); border-bottom: 1px solid var(--border); }
    #optSheetSum { flex: 1; min-width: 0; font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #optSheetGo { min-height: 44px; }
    #options.legSheet #optTicketCard.sheetMin > :not(#optSheetBar) { display: none; }
    #options.legSheet #optTicketCard.sheetMin #optSheetBar { margin-bottom: -8px; border-bottom: 0; }
    #optBar { position: fixed; left: 0; right: 0; bottom: var(--pbH, 0px); z-index: 106; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; border-top: 0; box-shadow: 0 -8px 24px rgba(0,0,0,.45); }
    #options.barOn #opMain { padding-bottom: 96px; }
    body:has(#options.barOn:not([hidden])) #dock { margin-bottom: 104px; }
    #options.ordOpen #optBar { display: none; }
    #opTop { position: sticky; top: -10px; z-index: 5; margin: -10px -10px 6px; padding: 10px 10px 6px; background: var(--bg); border-bottom: 1px solid var(--border); }
    #opTop h2 { margin: 0; }
    #optOrd { position: fixed; top: var(--hdrB, 52px); left: 0; right: 0; bottom: 0; z-index: 106; overflow-y: auto; overscroll-behavior: contain; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); background: var(--bg); }
    .ordPad button { min-height: 52px; }
    #optForm .optExpL { flex: 1 1 100%; height: 1px; margin: -4px 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    #optTable.simple, #optTable.simple tbody { display: block; width: 100%; }
    #optTable.simple colgroup, #optTable.simple thead { display: none; }
    #optTable.simple tbody tr:not(.spotRow) { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "k k k px" "d c . g"; align-items: center; column-gap: 12px; row-gap: 4px; padding: 12px 4px 12px 12px; border-bottom: 1px solid var(--border); }
    #optTable.simple tbody tr.itm { background: color-mix(in srgb, var(--orange) 6%, transparent); }
    #optTable.simple tbody tr td { display: block; min-width: 0; padding: 0; border: 0; background: none; box-shadow: none; font-family: inherit; font-size: 12.5px; text-align: left; }
    #optTable.simple tbody tr.itm td, #optTable.simple tbody tr.atm td { background: none; }
    #optTable.simple td.strike { grid-area: k; padding-left: 0; font-size: 17px; font-weight: 700; font-family: inherit; }
    #optTable.simple td.strike .cpN { display: inline; }
    #optTable.simple td.cD { grid-area: d; color: var(--muted); }
    #optTable.simple td.cC { grid-area: c; color: var(--muted); }
    #optTable.simple td.cD::before { content: "Delta "; }
    #optTable.simple td.cC::before { content: "Chance of profit "; }
    #optTable.simple td.cD::before, #optTable.simple td.cC::before { font-family: inherit; }
    #optTable.simple td.cG { grid-area: g; justify-self: end; padding-right: 10px; }
    #optTable.simple td.cG::after { content: " Today"; color: var(--muted); }
    #optTable.simple td.cA { display: none; }
    #optTable.simple td.optPxCell { grid-area: px; justify-self: end; display: flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 2px 0 14px; border: 1.5px solid var(--orange); border-radius: 999px; }
    #optTable.simple td.optPxCell a { min-width: 0; min-height: 40px; line-height: 40px; color: var(--orangeText); font-size: 15px; font-weight: 800; text-decoration: none; }
    #optTable.simple td.optPxCell .optAdd { width: 40px; height: 40px; margin: 0; border: 0; border-radius: 50%; background: none; color: var(--orangeText); }
    #optTable.simple tr.legRow { background: color-mix(in srgb, var(--orange) 12%, transparent); }
    #optTable.simple tr.legRow td { box-shadow: none; }
    #optTable.simple tr.legRow td.optPxCell { background: var(--orange); }
    #optTable.simple tr.legRow td.optPxCell a, #optTable.simple tr.legRow td.optPxCell .optAdd { color: #fff; }
    #optTable.simple tr.spotRow { display: block; }
    #optTable.simple tr.spotRow td { display: block; position: sticky; top: 0; height: auto; padding: 6px 0; background: var(--panel) linear-gradient(var(--orange), var(--orange)) center / 100% 1px no-repeat; }
  }
  #optTable td.strike .cpN { display: none; }
  @media (max-width: 600px) {
    #optTable a { display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; border-bottom: 0; text-decoration: underline dotted; }
    #optTable .optAdd { width: 40px; height: 40px; font-size: 18px; margin-left: 2px; }
    #optTable.simple a { min-width: 40px; text-align: right; }
    #optTable.simple td, #optTable.simple th { padding-left: 1px; padding-right: 3px; font-size: 11.5px; }
    #optTable.simple th { font-size: 9.5px; }
    #optTable col.sK { width: 13%; }
    #optTable col.sD { width: 11%; }
    #optTable col.sC { width: 14%; }
    #optTable col.sP { width: 19%; }
    #optTable col.sX { width: 14%; }
    #optTable col.sA { width: 29%; }
    #optForm .optSymL { flex: 0 0 96px; }
    #optForm .optSymL input { width: 96px; }
    #optForm .optSeg { flex: 1 1 0; }
    #optForm .optSeg button { flex: 1; min-height: 44px; padding: 6px 8px; }
    #optForm .optExpL { flex: 1 1 100%; }
    #optForm .optExpL select { min-width: 0; width: 100%; }
    .optLegX { width: 40px; height: 40px; }
    #optPickClear, #optPickCancel { min-height: 40px; }
    #optTicket .optRow input, #optTicket .optRow select, #optTicket .optWide, .optPxRow input, .optQuick button, .optWarn, .optExit summary, .optStep input, .optStep select, .optLadRow input, #optForm input, #optForm select, #optForm button, #optMode button { min-height: 44px; }
    #optSend, #optAutoGo { min-height: 48px; }
    .optExit input[type=checkbox] { width: 22px; height: 22px; }
  }
  #stShowChart { align-self: flex-start; margin: 2px 0 0; }
  @media (max-width: 1000px) {
    #strategies, #options { flex-direction: column; overflow: auto; }
    #stMain, #opMain { flex: none; overflow: visible; }
    #stDetail, #opDetail { flex: none; width: auto; overflow: visible; border-left: 0; border-top: 1px solid var(--border); }
  }
  @media (max-width: 900px) {
    .stHdr { display: none; }
    .stItem { grid-template-columns: 1.3fr 1fr 1fr; row-gap: 4px; }
    .stItem .nm { grid-column: 1; grid-row: 1; }
    .stItem .acct { grid-column: 2; grid-row: 1; }
    .stItem .stState { grid-column: 3; grid-row: 1; justify-content: flex-end; }
    .stItem .sym { grid-column: 1; grid-row: 2; }
    .stItem .stPos { grid-column: 2; grid-row: 2; }
    .stItem .stPnl { grid-column: 3; text-align: right; display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
    .stItem .stRl { grid-row: 2; }
    .stItem .stOp { grid-row: 3; }
    .stItem .stFigL { display: block; color: var(--muted); font-size: 10px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
    .stItem .stAct { grid-column: 1 / 3; grid-row: 3; justify-content: flex-start; align-self: center; }
    #stMain, #opMain { padding: 10px 10px 16px; }
    #stDetail, #opDetail { padding: 10px 10px 0; }
  }
  .stCard { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel2); }
  .stCard .row { border-bottom-color: rgba(42,48,58,.35); }
  .stCard .row select { width: 200px; }
  /* Strategy settings selects size to their value (up to 60% of the row) so "Mean reversion (Z)" and "Total sim · Paper
     (simulated fills)" read in full; anything longer ends in an ellipsis instead of being cut mid-word. */
  #stDetailBody .row select { width: auto; min-width: 110px; max-width: 60%; }
  .stTitle { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
  .stTitle b { font-size: 15px; }
  .stChip { font-size: 10px; font-weight: 800; letter-spacing: .6px; padding: 2px 8px; border-radius: 10px; background: var(--panel); color: var(--muted); border: 1px solid var(--border); }
  .stChip.on { background: rgba(0,208,132,.15); color: var(--bull); border-color: rgba(0,208,132,.4); }
  .stChip.wait { background: rgba(255,107,0,.15); color: var(--orangeText); border-color: rgba(255,107,0,.4); }
  .stChip.new { background: rgba(255,107,0,.12); color: var(--orangeText); border-color: rgba(255,107,0,.4); }
  #hdrFocus { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); border-radius: 12px; padding: 3px 10px; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #hdrFocus:empty { display: none; }
  #hdrFocus.live { color: #fff; background: var(--bear); border-color: var(--bear); }
  #hdrFocus.demo { color: var(--demoText); border-color: rgba(90,169,255,.5); }
  @media (max-width: 430px) { body.embed #paneStats { display: none; } }
  #flatBtn { margin-left: 6px; }
  .tabs button[hidden], label.row[hidden], #pform [hidden], #pform [data-opt-off] { display: none !important; }
  #ticket { font-size: 12px; padding-bottom: 14px; }
  #tkHint { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 12px; background: var(--panel2); border-bottom: 1px solid var(--orange); font-size: 12px; }
  #tkHint[hidden], body.embed #tkHint { display: none; }
  #tkHint span { flex: 1 1 200px; }
  .tkHead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
  .tkHead b { font-size: 14px; } .tkHead span { color: var(--muted); flex: 1; }
  .srOnly { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #ticket .tkHead b { font-size: 18px; }
  #ticket #tkPx { flex: 0 1 auto; color: var(--text); font-size: 15px; font-weight: 700; }
  #ticket .tkWhich { margin: -2px 0 10px; color: var(--muted); font-size: 11px; }
  #ticket [hidden] { display: none !important; }
  #ticket .tkSec { margin: 0 0 12px; }
  #ticket .tkLbl { display: block; margin: 0 0 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
  #ticket .tkLblRow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 4px; }
  #ticket .tkLblRow .tkLbl { margin: 0; }
  #ticket select, #ticket input[type=number] { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); color: var(--text); font: inherit; font-size: 13px; text-overflow: ellipsis; }
  #ticket input[type=number] { text-align: right; font-variant-numeric: tabular-nums; }
  #ticket input[type=number]::-webkit-inner-spin-button, #ticket input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
  #ticket input[type=number] { -moz-appearance: textfield; appearance: textfield; }
  #ticket .tkHead .ctxHelp { min-width: 28px; height: 28px; margin-left: auto; padding: 0; }
  #ticket .tkHead .tkGear { min-width: 28px; height: 28px; margin-left: auto; padding: 0; font-size: 15px; line-height: 1; }
  #ticket .tkHead .tkGear + .ctxHelp { margin-left: 0; }
  @media (max-width: 800px) { #ticket .tkHead .tkGear { min-width: 40px; height: 40px; } }
  #tkSetDlg .tkSetGrp { margin: 0 0 8px; padding: 0; border: 0; }
  #tkSetDlg legend { margin: 0 0 8px; padding: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
  #tkSetDlg .tkSetOpt { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 6px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); cursor: pointer; }
  #tkSetDlg .tkSetOpt:has(input:checked) { border-color: var(--orange); }
  #tkSetDlg .tkSetOpt input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--orange); }
  #tkSetDlg .tkSetOpt span { display: block; min-width: 0; }
  #tkSetDlg .tkSetOpt b { display: block; font-size: 13px; }
  #tkSetDlg .tkSetOpt small { display: block; margin: 2px 0 0; color: var(--muted); font-size: 12px; }
  #tkSetDlg .tkNote { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
  #tkSetDlg .tkNote.neg { color: var(--bear); }
  #tkSetDlg .tkSndRow { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); font-size: 13px; min-width: 0; }
  #tkSetDlg .tkSndRow label { flex: 0 0 auto; font-weight: 700; }
  #tkSetDlg .tkSndRow input[type=range] { flex: 1 1 auto; min-width: 0; accent-color: var(--orange); }
  #tkSetDlg .tkSndRow output { flex: 0 0 auto; width: 3.2em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
  #tkSetDlg .tkSndRow select { flex: 1 1 auto; min-width: 0; min-height: 30px; }
  #tkSetDlg .tkSndRow button { flex: 0 0 auto; }
  @media (max-width: 800px) { #tkSetDlg .tkSetOpt { min-height: 44px; } #tkSetDlg .tkSetOpt input { width: 24px; height: 24px; } #tkSetDlg .tkSndRow { min-height: 44px; } #tkSetDlg .tkSndRow button, #tkSetDlg .tkSndRow select { min-height: 40px; } }
  #ticket select:focus-visible, #ticket input:focus-visible, #ticket button:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
  #ticket .tkSide { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 0 0 12px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); }
  #ticket .tkSide button { height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; font-size: 13px; font-weight: 700; }
  #ticket .tkSide button[data-side=buy] { color: var(--bull); border-color: rgba(0, 208, 132, .5); }
  #ticket .tkSide button[data-side=sell] { color: var(--bear); border-color: rgba(239, 83, 80, .5); }
  #ticket .tkSide button.on[data-side=buy] { background: var(--bull); border-color: var(--bull); color: var(--onBull); }
  #ticket .tkSide button.on[data-side=sell] { background: var(--sell); border-color: var(--sell); color: #fff; }
  #ticket .tkSeg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--panel2); }
  #ticket .tkSeg button { height: 34px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-weight: 700; }
  #ticket .tkSeg button + button { border-left: 1px solid var(--border); }
  #ticket .tkSeg button.on { background: var(--segOn); color: var(--text); box-shadow: inset 0 -2px 0 var(--orange); }
  #ticket .tkSeg button:disabled { opacity: .4; }
  #ticket .tkQtyRow { display: flex; align-items: center; gap: 8px; }
  #ticket .tkPxRow { display: flex; align-items: center; gap: 6px; }
  #ticket #tkPrice { flex: 1; min-width: 0; width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); color: var(--text); font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
  #ticket #tkPrice.bad { border-color: var(--bear); }
  #ticket .tkPxRow button { flex: 0 0 36px; height: 36px; padding: 0; border-radius: 8px; background: var(--panel2); color: var(--text); font-size: 16px; font-weight: 700; }
  #ticket #tkPxNote.bad { color: var(--bear); }
  #ticket .tkQtyBox { flex: 0 0 150px; position: relative; display: flex; align-items: center; }
  #ticket #tkQty { flex: 1; width: 100%; min-width: 0; padding-right: 72px; }
  #ticket #tkQtyUnit { position: absolute; right: 10px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; font-weight: 700; pointer-events: none; }
  #ticket .tkQtyMode { display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--panel2); }
  #ticket .tkQtyMode button { height: 28px; min-width: 52px; padding: 0 8px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
  #ticket .tkQtyMode button + button { border-left: 1px solid var(--border); }
  #ticket .tkQtyMode button.on { background: var(--segOn); color: var(--text); box-shadow: inset 0 -2px 0 var(--orange); }
  #ticket #tkQtyHint { margin-top: 4px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
  #ticket .tkPresets { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  #ticket .tkPresets button { height: 36px; padding: 0; border-radius: 8px; background: var(--panel2); color: var(--muted); font-size: 12px; font-weight: 700; }
  #ticket .tkTrail { margin: 8px 0 0; }
  #ticket .tkTrail[hidden], #ticket .tkTrailBox[hidden] { display: none; }
  #ticket .tkTrailChk { display: flex; align-items: center; gap: 8px; font-size: 13px; }
  #ticket .tkTrailChk input { width: 28px; height: 28px; margin: 0; accent-color: var(--orange); }
  #ticket .tkTrailBox { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 0; }
  #ticket .tkTrailBox label span { display: block; margin: 0 0 4px; color: var(--muted); font-size: 11px; }
  #ticket .tkTrailBox input { width: 100%; height: 30px; box-sizing: border-box; }
  @media (max-width: 800px) { #ticket .tkTrailChk input { width: 40px; height: 40px; } #ticket .tkTrailBox input { height: 40px; font-size: 16px; } #ticket .tkTrailChk { min-height: 44px; } }
  #ticket .tkPair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  #ticket .tkPair label { display: block; }
  #ticket .tkPair label span { display: block; margin: 0 0 4px; color: var(--muted); font-size: 11px; }
  .ppOff { display: none !important; }
  .ppGate label { flex: 1 1 auto; }
  .ppGateIn { display: inline-flex; align-items: center; gap: 8px; }
  .ppGateIn .ppGateMin { width: 72px; }
  .ppTk { margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--line, #333); border-radius: 10px; }
  .ppTk h4 { margin-top: 0; }
  .ppTkSide { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 8px; }
  .ppTkSide button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; min-height: 44px; border-radius: 8px; border: 1px solid var(--line, #333); background: transparent; color: inherit; cursor: pointer; font: inherit; }
  .ppTkSide button small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
  .ppTkSide button[data-side="buy_a"].on { border-color: var(--green, #00d084); box-shadow: inset 0 0 0 1px var(--green, #00d084); }
  .ppTkSide button[data-side="sell_a"].on { border-color: var(--red, #ef5350); box-shadow: inset 0 0 0 1px var(--red, #ef5350); }
  .ppTk .row input { width: 90px; }
  .ppTkGo { width: 100%; min-height: 44px; margin: 8px 0 0; border-radius: 8px; font-weight: 600; cursor: pointer; }
  .ppTkMsg { margin: 6px 0 0; font-size: 12px; overflow-wrap: anywhere; }
  .ppTkMsg.err { color: var(--red, #ef5350); }
  #ticket #tkUnit { width: auto; min-width: 96px; height: 28px; font-size: 12px; }
  #ticket .tkAtmRow { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
  #ticket .tkAtmRow label { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
  #ticket .tkAtmRow select { flex: 1 1 auto; min-width: 0; height: 30px; }
  #ticket .tkAtmRow .sbtn { flex: 0 0 auto; min-height: 28px; }
  #ticket .tkAtmRow .sbtn[hidden], #ticket .tkAtmEd[hidden] { display: none; }
  #ticket .tkAtmEd { margin: 8px 0 0; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); }
  #ticket .tkAtmF { display: block; margin: 0 0 6px; }
  #ticket .tkAtmAct { margin: 6px 0 0; }
  #ticket #tkPosClose { margin: 6px 0 0; }
  #ticket #tkPosClose[hidden], #ticket #tkAtmHidden[hidden] { display: none; }
  #ticket .tkAtmBe { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; align-items: end; margin: 0 0 6px; }
  #ticket .tkAtmTr { margin: 0 0 6px; }
  #ticket .tkAtmCt { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: end; margin: 0 0 6px; }
  #ticket .tkAtmCt .tkNote { grid-column: 1 / -1; margin: 0; }
  #ticket .tkAtmRv { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 0 0 6px; }
  #ticket .tkAtmRv .tkNote { flex-basis: 100%; margin: 0; }
  #ticket .tkAtmRevBtns { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
  #ticket .tkAtmRevBtns .sbtn[aria-pressed="true"] { border-color: var(--accent, #4f8cff); color: var(--accent, #4f8cff); }
  @media (max-width: 800px) { #ticket .tkAtmRevBtns .sbtn { min-height: 40px; } }
  #ticket .tkAtmSh { margin: 0 0 6px; }
  #ticket .tkAtmSh select { width: 100%; min-height: 28px; }
  #ticket .tkAtmSh .tkNote { margin: 2px 0 0; }
  @media (max-width: 800px) { #ticket .tkAtmSh select { height: 40px; min-height: 40px; font-size: 16px; } }
  #ticket .tkAtmShadow { padding: 6px 8px; border: 1px dashed var(--border); border-left: 3px dashed var(--muted, #8a93a6); border-radius: 6px; margin: -2px 0 6px 10px; font-size: 12px; }
  #ticket .tkAtmShadow .tkAtmCmp { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
  #ticket .tkAtmCh { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: end; margin: 0 0 6px; }
  #ticket .tkAtmCh .tkNote { grid-column: 1 / -1; margin: 0; }
  #ticket .tkChRow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  #ticket .tkChRow .tkChLim { width: 64px; height: 28px; }
  #ticket .tkAtmSlot .sbtn { padding: 2px 8px; font-size: 11px; min-height: 26px; margin-left: 4px; }
  @media (max-width: 800px) { #ticket .tkChRow .tkChLim { height: 40px; font-size: 16px; } #ticket .tkAtmSlot .sbtn { min-height: 40px; } }
  @media (max-width: 800px) { #ticket .tkAtmCt input[type=time] { height: 40px; min-height: 40px; font-size: 16px; } }
  #ticket .tkTrRow { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px; align-items: end; margin: 0 0 6px; }
  #ticket .tkAtmTr .sbtn[hidden], #ticket .tkTrRow [hidden] { display: none; }
  @media (max-width: 800px) { #ticket .tkTrRow { grid-template-columns: 1fr 1fr 1fr 44px; } #ticket .tkTrRow input, #ticket .tkAtmTr .sbtn { height: 40px; min-height: 40px; font-size: 16px; } }
  #ticket .tkAtmChk { display: flex; align-items: center; gap: 6px; min-height: 32px; font-size: 12px; }
  #ticket .tkAtmChk input { width: 18px; height: 18px; }
  @media (max-width: 800px) { #ticket .tkAtmChk { min-height: 40px; } #ticket .tkAtmChk input { width: 24px; height: 24px; } }
  #ticket .tkAtmRun { padding: 6px 8px; border: 1px solid var(--border); border-left: 3px solid var(--accent, #4f8cff); border-radius: 6px; margin: 0 0 6px; font-size: 12px; }
  #ticket .tkAtmRun.bad { border-left-color: var(--neg, #ef5350); }
  #ticket .tkAtmSlot { color: var(--muted); }
  #ticket .tkAtmBare { color: var(--neg, #ef5350); font-weight: 700; }
  #ticket .tkUnprot { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--neg, #ef5350); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
  #ticket .tkAtmF span { display: block; margin: 0 0 3px; color: var(--muted); font-size: 11px; }
  #ticket .tkTgtRow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: end; margin: 0 0 6px; }
  #ticket .tkTgtRow label span { display: block; margin: 0 0 3px; color: var(--muted); font-size: 11px; }
  #ticket .tkTgtRow button { min-height: 30px; }
  #ticket .tkTgtRow .tkAtmChk { grid-column: 1 / -1; }
  #ticket .tkSim { display: inline-block; padding: 0 6px; border: 1px solid currentColor; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
  #ticket .tkAtmBtns { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
  #ticket input[readonly] { opacity: .7; }
  #ticket .tkAtmEd input, #ticket .tkAtmEd select { height: 32px; }
  #ticket .tkAtmEd .sbtn, #ticket .tkAtmRow .sbtn { min-height: 32px; }
  @media (max-width: 800px) { #ticket .tkAtmRow select, #ticket .tkAtmEd input, #ticket .tkAtmEd select, #ticket .tkAtmEd .sbtn, #ticket .tkAtmRow .sbtn { height: 40px; min-height: 40px; font-size: 16px; } #ticket .tkAtmRow label { font-size: 12px; } #ticket .tkTgtRow { grid-template-columns: 1fr 1fr 44px; } }
  #ticket .tkNote { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
  #ticket .tkBadge { margin: 6px 0 0; padding: 6px 10px; border-radius: 6px; background: var(--panel2); color: var(--muted); font-size: 11px; font-weight: 700; }
  #ticket .tkBadge.demo { color: var(--bull); border: 1px solid rgba(0, 208, 132, .5); }
  #ticket .tkBadge.live { color: #fff; background: var(--liveMark); border: 1px solid var(--liveMark); }
  #ticket .tkBadge.paper { color: var(--text); border: 1px solid var(--border); }
  #tkReview { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); color: var(--text); line-height: 1.5; }
  #tkReview.live { border-color: var(--liveMark); }
  #tkReview .tkMute { color: var(--muted); }
  #tkReview .sbtn { margin: 6px 0; }
  #tkSend { position: sticky; bottom: 8px; z-index: 3; width: 100%; height: 46px; border: 0; border-radius: 8px; background: var(--bull); color: var(--onBull); font-size: 14px; font-weight: 800; box-shadow: 0 0 0 8px var(--panel); }
  #tkSend.sell { background: var(--sell); color: #fff; }
  #tkSend.live { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--liveMark), 0 0 0 10px var(--panel); }
  #tkSend:disabled { opacity: .45; }
  #tkMsg, #tkOrderMsg { margin-top: 8px; color: var(--muted); min-height: 16px; }
  #tkOrderMsg.ok { color: var(--bull); }
  #tkMsg.err, #tkOrderMsg.err { color: var(--bearText); }
  #ticket .tkOrdHead { margin: 14px 0 4px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 600; }
  #ticket .tkPos { padding: 2px 0; color: var(--text); }
  #ticket .tkOrd { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--text); }
  #ticket .tkOrd span { flex: 1; } #ticket .tkOrd .sbtn { padding: 4px 10px; font-size: 11px; min-height: 28px; }
  #ticket .tkOther { display: flex; flex-wrap: wrap; gap: 6px; }
  #ticket .tkOther .sbtn { padding: 6px 12px; font-size: 12px; }
  @media (max-width: 800px) { #ticket { padding-bottom: 84px; } #tkSend { bottom: -76px; } #ticket select, #ticket input[type=number], #ticket #tkPrice { height: 40px; font-size: 16px; } #ticket .tkPxRow button { flex-basis: 44px; height: 40px; } #ticket .tkSide button { height: 40px; } #ticket .tkSeg button, #ticket .tkPresets button, #ticket .tkQtyMode button { height: 40px; } #ticket #tkUnit { height: 40px; font-size: 14px; } #ticket .tkHead .ctxHelp { min-width: 40px; height: 40px; } #ticket .tkOther .sbtn, #ticket .tkOrd .sbtn, #tkReview .sbtn { min-height: 40px; } #tkSend { height: 50px; } }
  .tabs button[data-tab=ticket] { white-space: nowrap; padding-left: 4px; padding-right: 4px; font-weight: 700; }
  .tabs .fold { white-space: nowrap; }
  .wlAdd { display: flex; gap: 6px; margin: 2px 0 8px; }
  .wlAdd input { flex: 1; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 8px; font: inherit; }
  .wlRow { display: grid; grid-template-columns: 1fr auto 74px 22px; gap: 8px; align-items: center; padding: 7px 4px; border-bottom: 1px solid rgba(42,48,58,.5); cursor: pointer; font-size: 12.5px; }
  .wlRow:hover { background: var(--panel2); }
  .wlRow b { font-size: 13px; } .wlRow small { display: block; color: var(--muted); font-size: 11px; }
  .wlRow .num { text-align: right; font-variant-numeric: tabular-nums; }
  .wlRow button { border: 0; background: none; color: var(--muted); padding: 2px; }
  .wlRow button:hover { color: var(--bear); }
  #snSeg { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  #snSeg button { white-space: nowrap; }
  .snAdd { display: flex; gap: 6px; padding: 6px 10px 0; }
  .snAdd input { flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 8px; font: inherit; min-height: 32px; }
  .snSyms { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px; }
  .snSyms button { border: 1px solid var(--border); background: var(--panel2); color: var(--text); border-radius: 999px; padding: 3px 9px; font-size: 11.5px; min-height: 28px; }
  .snSyms button.held { border-color: var(--orange); }
  .snSyms button small { color: var(--muted); margin-left: 4px; }
  .snItem { display: block; padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 12.5px; overflow-wrap: anywhere; }
  .snItem:hover { background: var(--panel2); }
  .snItem small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
  .snItem .snDot { color: var(--orangeText); margin-right: 4px; }
  .snItem .snTag { display: inline-block; font-size: 10px; border: 1px solid var(--border); border-radius: 8px; padding: 0 5px; margin-left: 4px; color: var(--muted); }
  .snItem .snTag.imp { color: var(--bear); border-color: var(--bear); }
  .snItem.cal { border-left: 3px solid var(--orange); }
  #snList { max-height: 520px; }
  #snDlg { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: 80vh; }
  #snDlg::backdrop { background: rgba(0,0,0,.5); }
  .snDlgHd { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); }
  .snDlgHd h3 { margin: 0; font-size: 15px; }
  #snDlgBody { overflow: auto; }
  .wlRow button.wlNews { color: var(--muted); }
  .snPredBtn { margin: 8px 0; }
  .alForm { display: grid; gap: 6px; margin-bottom: 8px; }
  .alRow { display: flex; gap: 6px; align-items: center; min-width: 0; }
  .alRow[hidden], .alRow [hidden] { display: none !important; }
  .alRow input, .alRow select { flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 8px; font: inherit; min-height: 32px; }
  .alRow .sbtn { flex: none; }
  .alChk { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; flex: none; }
  .alChk input { flex: none; min-height: 0; }
  .alClock { margin: 0; color: var(--muted); font-size: 11.5px; }
  .alMsg { margin: 0; font-size: 12px; min-height: 1em; } .alMsg.bad { color: var(--bear); }
  .alItem { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
  .alItem small { display: block; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
  .alItem b { overflow-wrap: anywhere; }
  .alItem button { border: 0; background: none; color: var(--muted); padding: 6px; min-width: 32px; min-height: 32px; }
  /* Production review lane 4 (2026-11-13): on a phone every Alerts, Watchlist, chat, Agent T, Learn, Tutorials and
     Portfolio control is at least 44 px. After the base rules so it wins the cascade. */
  @media (max-width: 480px), (pointer: coarse) {
    #chatForm button, #atForm button, #chatMenu button, #learnAsk input, #learnAsk button { min-height: 44px; min-width: 44px; }
    .alRow input, .alRow select, .alRow .sbtn, .wlAdd input, .wlAdd button, #alList .alItem button { min-height: 44px; }
    .alChk { min-height: 44px; padding: 0 6px; } .alChk input { width: 22px; height: 22px; }
    .wlRow { grid-template-columns: 1fr auto 74px 44px; } .wlRow button { min-width: 44px; min-height: 44px; }
    #watchtab .ctxHelp, #alerttab .ctxHelp { width: 44px; height: 44px; min-width: 44px; }
    #tutSwitch button, .tutWritten, #tutTrack, .tutTry, .tutRead, #tutAll { min-height: 44px; } .tutWritten { padding: 0 10px; }
    #portfolio .mpSeg button, #portfolio .mpBar > button, #portfolio .mpNav > button, #portfolio select, #portfolio input:not([type=checkbox]):not([type=file]), #portfolio form button { min-height: 44px; min-width: 44px; }
    #portfolio .discLink { display: inline-flex; align-items: center; min-height: 44px; }
  }
  .alItem button:hover { color: var(--bear); }
  .alChip { display: inline-block; font-size: 10px; padding: 0 6px; border-radius: 9px; border: 1px solid var(--border); color: var(--muted); margin-left: 4px; }
  .alChip.on { color: var(--bull); border-color: var(--bull); } .alChip.held { color: var(--orangeText); border-color: var(--orange); }
  .alChip.wait { color: var(--orangeText); border-color: var(--orange); border-style: dashed; }
  #tfTip { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); z-index: 80; background: var(--panel); border: 1px solid var(--orange); border-radius: 10px; padding: 10px 16px; font-weight: 700; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
  #tfTip[hidden] { display: none; }
  #dockBody.stale { opacity: .55; }
  #ccStale { margin-left: 8px; font-size: 11px; font-weight: 700; color: #d29922; border: 1px solid rgba(210,153,34,.5); border-radius: 10px; padding: 1px 8px; }
  #ccStale[hidden] { display: none; }
  /* Visible keyboard focus everywhere (WCAG 2.4.7). */
  :focus-visible { outline: 2px solid #58a6ff; outline-offset: 2px; }
  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } #wrTickTrack { animation: none !important; } }
  :root { --pd-dem: #4c8dff; --pd-rep: #ff5a5f; --pd-tossup: #a58bff; }
  .prGlyph { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .prGlyph.prArt { stroke: none; overflow: visible; }
  #prCats button { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; padding: 11px 13px; }
  #prCats button .prGlyph { opacity: .8; }
  #prCats button.on .prGlyph { color: var(--pd-accent); opacity: 1; }
  .prPx { display: inline-flex; align-items: baseline; justify-content: center; gap: 6px; min-width: 0; }
  .prPx .prPxL { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .prPx .prPxL:empty { display: none; }
  .prPx .prPxV { font-size: 17px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
  .prPx .prPxM { font-size: 12px; font-weight: 600; opacity: .85; font-variant-numeric: tabular-nums; }
  .prPx .prPxM:empty { display: none; }
  .prYN .prPx { min-height: 48px; padding: 8px 10px; border-radius: 10px; }
  .prCard .prRow { gap: 10px; }
  .prCard .prRow .prName, #prHero .prRow .prName { font-size: 14px; color: var(--pd-text); }
  .prRow .prPx { flex: none; min-width: 92px; min-height: 40px; padding: 6px 12px; border-radius: 999px; font-size: 13px; }
  .prRow .prPx .prPxV { font-size: 16px; }
  #prHero .prRow { padding: 6px 0; }
  #prHero .prRow .prPx { min-width: 112px; min-height: 44px; }
  #prHero .prRow .prPx .prPxV { font-size: 19px; }
  .prHeroPct b { font-size: 44px; }
  #spView .spLeague { background: none; border: 0; border-radius: 0; overflow: visible; }
  #spView .spLeagueHd { background: none; border: 0; padding: 4px 2px 10px; font-size: 18px; font-weight: 800; letter-spacing: 0; justify-content: flex-start; }
  #spView .spLeagueHd .spLgIco { width: 20px; height: 20px; color: var(--pd-accent); }
  #spView .spLeagueHd small { margin-left: auto; font-size: 12px; }
  .spGames { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
  #spView .spGame { display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 12px; padding: 14px; background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: 14px; transition: border-color .12s var(--pd-ease); }
  #spView .spGame:last-child { border-bottom: 1px solid var(--pd-border); }
  #spView .spGame:hover, #spView .spGame:focus-visible { background: var(--pd-surface); border-color: #31496d; }
  #spView .spWhen { display: flex; align-items: center; gap: 8px; font-size: 12px; }
  #spView .spWhen b { display: inline; }
  #spView .spWhen .spNow { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--pd-live) 16%, transparent); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
  .spCount { font-size: 12px; color: var(--pd-muted); white-space: nowrap; }
  #spView .spTeams { gap: 8px; }
  #spView .spTeam { gap: 10px; font-size: 15px; }
  .spLogo { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; letter-spacing: .02em; color: #fff; background: var(--pd-raised); border: 1.5px solid var(--pd-border); }
  .spLogo.sm { width: 22px; height: 22px; font-size: 8px; border-width: 1px; }
  .spRec { flex: none; color: var(--pd-muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
  #spView .spTeam .spScore { font-size: 18px; font-weight: 800; }
  #spView .spLines { display: block; }
  #spView .spLine > small { display: none; }
  #spView .spLine .spPxs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
  #spView .spPx { flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 58px; padding: 6px 8px; border-radius: 10px; background: var(--pd-yes-soft); border: 1px solid transparent; color: var(--pd-text); }
  #spView .spPx:hover { background: var(--pd-yes-hover); border-color: var(--pd-yes); }
  #spView .spPx .prPxL { font-size: 12px; font-weight: 700; color: var(--pd-text-2); max-width: 100%; white-space: nowrap; }
  #spView .spPx .prPxV { font-size: 19px; color: var(--pd-yes); font-family: inherit; }
  #spView .spPx .prPxM { font-size: 12px; color: var(--pd-text-2); opacity: 1; }
  .spBody { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  #spView .spGame.two .spBody { display: grid; grid-template-columns: minmax(0, 1fr) 132px; column-gap: 12px; align-items: start; }
  #spView .spGame.two .spTeams { gap: 8px; }
  #spView .spGame.two .spTeam { min-height: 52px; }
  #spView .spGame.two .spLine .spPxs { grid-auto-flow: row; grid-auto-rows: 52px; gap: 8px; }
  #spView .spGame.two .spPx { min-height: 52px; flex-direction: row; justify-content: center; gap: 8px; }
  #spView .spGame.two .spPx .prPxL { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #spView .spGame.two .spPx .prPxM { order: -1; }
  #spView .spPx.sel { outline: 2px solid var(--pd-accent); outline-offset: -2px; }
  .spFoot { display: flex; justify-content: flex-end; border-top: 1px solid var(--pd-border); padding-top: 10px; margin-top: -2px; }
  .spDay { margin: 14px 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pd-muted); }
  .spLeague > .spDay:first-of-type { margin-top: 2px; }
  .spTabs { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border: 1px solid var(--pd-border); border-radius: 12px; background: var(--pd-surface); }
  .spTabs button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 8px; background: none; color: var(--pd-muted); font: 700 14px/1 inherit; font-family: inherit; cursor: pointer; }
  .spTabs button.on { background: var(--pd-raised); color: var(--pd-text); }
  .spHub { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--pd-border); border-radius: 16px; background: linear-gradient(110deg, color-mix(in srgb, var(--pd-accent) 18%, var(--pd-surface)), var(--pd-surface) 60%); }
  .spHub .spHubIco { width: 44px; height: 44px; padding: 9px; border-radius: 12px; color: var(--pd-accent); background: color-mix(in srgb, var(--pd-accent) 16%, transparent); }
  .spHubTxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .spHubTxt small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pd-muted); }
  .spHubTxt h3 { margin: 0; font-size: 24px; font-weight: 800; text-transform: none; letter-spacing: 0; color: var(--pd-text); }
  .spHubProg { display: flex; align-items: center; gap: 12px; max-width: 420px; }
  .spHubProg b { flex: none; font-size: 13px; }
  .spHubBar { flex: 1; height: 8px; border-radius: 4px; background: var(--pd-raised); overflow: hidden; }
  .spHubBar i { display: block; height: 100%; background: var(--pd-accent); border-radius: 4px; }
  .spHubGo { flex: none; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--pd-accent); color: var(--pd-on-accent); font: 800 14px/1 inherit; font-family: inherit; cursor: pointer; }
  .spHubN { flex: none; font-size: 13px; color: var(--pd-text-2); font-weight: 700; }
  .spGrp { display: none; }
  #spRail[hidden] { display: none; }
  .spSr { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #spRail { display: flex; flex-direction: column; gap: 12px; }
  #spRail .tkBox { margin: 0; }
  .spRailHd { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 13px; color: var(--pd-text-2); }
  .spRailHd span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
  .spRailMore { flex: none; min-height: 36px; padding: 0 10px; border: 1px solid var(--pd-border); border-radius: 8px; background: none; color: var(--pd-text-2); font: 600 12px/1 inherit; font-family: inherit; cursor: pointer; }
  .spRailEmpty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; text-align: center; color: var(--pd-muted); }
  .spRailEmpty b { color: var(--pd-text); font-size: 15px; }
  .spRailEmpty .spRailIco { width: 28px; height: 28px; color: var(--pd-accent); }
  .spRailCombo { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; width: 100%; min-height: 48px; padding: 0 var(--pd-space-4); background: var(--pd-raised); color: var(--pd-text); border: 1px solid var(--pd-accent); border-radius: var(--pd-radius-sm); font: 700 var(--pd-fs-md) inherit; font-family: inherit; cursor: pointer; }
  .spRailCombo .prGlyph { width: 18px; height: 18px; color: var(--pd-accent); }
  @media (max-width: 600px) { .spHub { flex-wrap: wrap; padding: 14px; } .spHubTxt h3 { font-size: 20px; } .spHubGo { width: 100%; } #spView .spGame.two .spBody { grid-template-columns: minmax(0, 1fr) 112px; } }
  @media (min-width: 1100px) {
    #prMarkets.spMode .spGrp { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 11px 12px; border: 0; border-radius: 10px; background: none; color: var(--pd-text-2); font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; text-align: left; }
    #prMarkets.spMode .spGrp:hover { background: var(--pd-raised); }
    #prMarkets.spMode .spGrp .prGlyph { width: 18px; height: 18px; color: var(--pd-muted); }
    #prMarkets.spMode .spGrp .prChev { margin-left: auto; transition: transform .15s var(--pd-ease); }
    #prMarkets.spMode .spGrp.open .prChev { transform: rotate(90deg); }
    #prMarkets.spMode #prLeagues button.spSub { padding-left: 40px; }
    #prMarkets.spMode #prLeagues .spLiveChip .prGlyph { color: var(--pd-live); }
    #prMarkets.spMode { display: grid; grid-template-columns: 210px minmax(0, 1fr); column-gap: 24px; }
    #prMarkets.spMode > * { grid-column: 2; }
    #prMarkets.spMode > #prCats { grid-column: 1 / -1; }
    #prMarkets.spMode > #spRail { grid-column: 3; grid-row: 2 / span 12; align-self: start; position: sticky; top: 8px; }
    #prMarkets.spMode > #prLeagues { grid-column: 1; grid-row: 2 / span 12; flex-direction: column; align-self: start; position: sticky; top: 8px; margin: 0; padding: 0; gap: 2px; overflow: visible; }
    #prMarkets.spMode #prLeagues button { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 1px solid transparent; border-radius: 10px; padding: 11px 12px; font-size: 14px; color: var(--pd-text-2); }
    #prMarkets.spMode #prLeagues button:hover { background: var(--pd-raised); }
    #prMarkets.spMode #prLeagues button.on { background: var(--pd-raised); border-color: var(--pd-border); color: var(--pd-text); }
    #prMarkets.spMode #prLeagues button .prGlyph { width: 18px; height: 18px; color: var(--pd-accent); }
    #prMarkets.spMode #prLeagues button i { margin-left: auto; color: var(--pd-muted); }
  }
  #prLeagues button { display: inline-flex; align-items: center; gap: 6px; }
  @media (min-width: 1300px) { #prMarkets.spMode { grid-template-columns: 200px minmax(0, 1fr) 340px; } }
  .cfStrip { margin: 0 0 var(--pd-space-6); }
  .cfStripHd { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
  .cfStripHd .prGlyph { width: 20px; height: 20px; color: var(--pd-accent); }
  .cfStripHd h3 { margin: 0; font-size: 18px; font-weight: 800; }
  .cfStripHd small { margin-left: auto; color: var(--pd-muted); font-size: 11px; }
  .cfRow { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
  .cfCard { flex: 0 0 min(300px, 82vw); scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: linear-gradient(160deg, color-mix(in srgb, var(--pd-accent) 10%, var(--pd-surface)), var(--pd-surface) 55%); border: 1px solid var(--pd-border); border-radius: 14px; }
  .cfHd { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .cfHd .cfIco { width: 18px; height: 18px; color: var(--pd-accent); }
  .cfHd h4, #prMid h4 { text-transform: none; letter-spacing: 0; color: var(--pd-text); }
  .cfHd h4 { margin: 0; flex: 1; min-width: 0; font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cfN { flex: none; font-size: 11px; font-weight: 700; color: var(--pd-accent); border: 1px solid color-mix(in srgb, var(--pd-accent) 60%, transparent); border-radius: 999px; padding: 2px 8px; }
  .cfLegs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
  .cfLeg { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 13px; }
  .cfLeg .cfLbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .cfLeg b { flex: none; font-variant-numeric: tabular-nums; color: var(--pd-yes); }
  .cfLeg .cfDot { width: 22px; height: 22px; color: var(--pd-muted); }
  .cfGo { margin-top: auto; min-height: 48px; display: flex; align-items: baseline; justify-content: center; gap: 6px; border: 0; border-radius: 10px; background: var(--pd-accent); color: var(--pd-on-accent); font: 700 14px/1 inherit; font-family: inherit; cursor: pointer; }
  .cfGo b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .cfGo:hover { background: var(--pd-accent-strong); }
  .prHub { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: var(--pd-space-4); }
  .prHubTile { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 56px; padding: 10px 12px; background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: 12px; color: var(--pd-text); font-family: inherit; cursor: pointer; text-align: left; }
  .prHubTile:hover { border-color: #31496d; }
  .prHubIco { width: 30px; height: 30px; padding: 6px; border-radius: 8px; color: var(--pd-accent); background: color-mix(in srgb, var(--pd-accent) 14%, transparent); }
  .prHubTxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .prHubTxt b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .prHubTxt small { font-size: 11px; color: var(--pd-muted); }
  .prChev { color: var(--pd-muted); font-size: 18px; }
  #prMid[hidden] { display: none; }
  #prMid { display: flex; flex-direction: column; gap: 16px; margin: 0 0 var(--pd-space-6); }
  .mhHero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px; border: 1px solid var(--pd-border); border-radius: 16px; background: linear-gradient(110deg, color-mix(in srgb, var(--pd-dem) 16%, var(--pd-surface)), var(--pd-surface) 45%, color-mix(in srgb, var(--pd-rep) 16%, var(--pd-surface))); }
  .mhTtl { display: flex; align-items: center; gap: 10px; }
  .mhTtl .mhIco { width: 28px; height: 28px; }
  .mhTtl h3 { margin: 0; font-size: 24px; font-weight: 800; }
  .mhTtl small { color: var(--pd-muted); font-size: 13px; }
  .mhBigs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; flex: 1; max-width: 560px; }
  .mhBig { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 10px 14px; border: 1px solid var(--pd-border); border-radius: 12px; background: color-mix(in srgb, var(--pd-bg) 60%, transparent); color: var(--pd-text); font-family: inherit; cursor: pointer; text-align: left; }
  .mhBig small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pd-muted); }
  .mhBig b { font-size: 34px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
  .mhBig[data-lead=D] b, .mhBig[data-lead=D] .mhParty { color: var(--pd-dem); }
  .mhBig[data-lead=R] b, .mhBig[data-lead=R] .mhParty { color: var(--pd-rep); }
  .mhParty { font-size: 11px; font-weight: 800; letter-spacing: .08em; }
  .mhBody { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .mhLeft, .mhRight { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--pd-border); border-radius: 16px; background: var(--pd-surface); min-width: 0; }
  .mhLeft h4, .mhRight h4 { margin: 0; font-size: 15px; font-weight: 800; }
  .mhSeatTop { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
  .mhSeatD, .mhSeatR { display: flex; align-items: baseline; gap: 6px; }
  .mhSeatD b { color: var(--pd-dem); font-size: 30px; font-weight: 800; }
  .mhSeatR b { color: var(--pd-rep); font-size: 30px; font-weight: 800; }
  .mhSeatD span, .mhSeatR span { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--pd-muted); }
  .mhWin { color: var(--pd-text-2); font-size: 12px; font-weight: 700; }
  .mhBar { position: relative; display: flex; height: 20px; border-radius: 10px; overflow: visible; background: var(--pd-raised); }
  .mhBar i { display: block; height: 100%; flex-basis: 0; min-width: 2px; }
  .mhBar i:first-child { border-radius: 10px 0 0 10px; }
  .mhBar i:nth-last-child(2) { border-radius: 0 10px 10px 0; }
  .mhSeatTop { margin-bottom: 6px; }
  .mhBar .mhMid { position: absolute; left: 50%; top: -3px; width: 2px; height: 26px; background: var(--pd-text); border-radius: 1px; }
  .mh-dn { background: #1f4fbf; } .mh-ld { background: var(--pd-dem); } .mh-nd { background: #9cc1ff; } .mh-tu { background: var(--pd-tossup); } .mh-nr { background: #ffb0b2; } .mh-lr { background: var(--pd-rep); } .mh-rn { background: #b8282d; }
  .mhKey { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--pd-text-2); }
  .mhKey span { display: inline-flex; align-items: center; gap: 6px; }
  .mhKey i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
  .mhMap { width: 100%; max-width: 560px; align-self: center; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); grid-template-rows: repeat(8, auto); gap: 4px; }
  .mhTile { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; border-radius: 7px; padding: 0; min-width: 0; font-family: inherit; color: #fff; font-size: 12px; }
  .mhTile b { font-weight: 800; }
  .mhTile small { font-size: 9px; font-weight: 700; opacity: .9; }
  button.mhTile { cursor: pointer; }
  button.mhTile:hover { outline: 2px solid var(--pd-text); outline-offset: 1px; }
  .mhTile.mh-nd, .mhTile.mh-nr { color: #10131a; }
  .mh-held-d { background: color-mix(in srgb, var(--pd-dem) 38%, var(--pd-raised)); }
  .mh-held-r { background: color-mix(in srgb, var(--pd-rep) 38%, var(--pd-raised)); }
  .mhTile.mh-none { background: var(--pd-raised); color: var(--pd-muted); }
  .mhRaces { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
  .mhRace { display: grid; grid-template-columns: 34px minmax(0, 1fr) 96px 62px; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 8px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--pd-text); font-family: inherit; font-size: 14px; text-align: left; cursor: pointer; }
  .mhRace:hover { background: var(--pd-raised); border-color: var(--pd-border); }
  .mhRaceSt { font-size: 11px; font-weight: 800; color: var(--pd-muted); text-align: center; border: 1px solid var(--pd-border); border-radius: 6px; padding: 3px 0; }
  .mhRaceName { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .mhRaceBar { height: 8px; border-radius: 4px; background: var(--pd-rep); overflow: hidden; }
  .mhRaceBar i { display: block; height: 100%; background: var(--pd-dem); }
  .mhRacePct { text-align: right; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .mh-tD { color: var(--pd-dem); } .mh-tR { color: var(--pd-rep); } .mh-tO { color: var(--pd-text-2); }
  .mh-ot { background: #8a93a6; } .mhRaceBar.ot { background: #8a93a6; }
  @media (max-width: 900px) { .mhBody { grid-template-columns: minmax(0, 1fr); } .mhBigs { max-width: none; } }
  @media (max-width: 600px) { .mhHero { padding: 14px; flex-direction: column; align-items: stretch; } .mhBigs { flex: none; } .mhTtl h3 { font-size: 20px; } .mhBig { padding: 8px 10px; } .mhBig b { font-size: 24px; } .mhTile small { display: none; } .mhTile { font-size: 10px; border-radius: 5px; } .mhMap { gap: 3px; } .mhRace { grid-template-columns: 32px minmax(0, 1fr) 62px; } .mhRaceBar { display: none; } .prHub { grid-template-columns: 1fr 1fr; } .mhLeft, .mhRight { padding: 12px; } }
  @media (max-width: 760px) { #prCats button { font-size: 13px; padding: 10px 11px; } #spView .spPx { min-height: 56px; } .prRow .prPx { min-width: 84px; min-height: 44px; } }
  @media (max-width: 560px) { #prBack, #prNav button, #prRefresh, #tkBuySell button, .tkChips .tbBtn, #prTkType, #tkOutcome, #prTkUnit, #tkAmount, .prRange button, .tkBookTabs .tbBtn, #tkAuto, .prHeroNav .tbBtn, #prSort button, #prSubs button, #prCats button, #prLeagues button, .prRow .prYes, .prRow .prNo { min-height: 44px; } #tkBuySell button, .tkChips .tbBtn, .prRange button { min-width: 44px; } #prBack { display: inline-flex; align-items: center; padding: 0 4px; } }

  #hdrCur, #phoneBar, .mPhone, #prSearchBtn { display: none; }
  .bLogo { width: 32px; height: 32px; border-radius: 8px; place-items: center; flex: none; }
  header .bLogo { display: grid; width: 26px; height: 26px; border-radius: 7px; }
  @media (max-width: 768px) and (min-height: 501px) and (pointer: coarse) {
    body:not(.embed) header { flex-wrap: nowrap; gap: 8px; padding: max(4px, env(safe-area-inset-top)) 10px 4px; min-height: 52px; align-items: center; }
    body:not(.embed) header .spacer, body:not(.embed) #hdrNav, body:not(.embed) header .stat, body:not(.embed) #autoBtn, body:not(.embed) #chatBtn, body:not(.embed) #voiceBtn, body:not(.embed) #helpBtn, body:not(.embed) #trialPill, body:not(.embed) #hdrFocus, body:not(.embed) #hdrPnl, body:not(.embed) #gsPill { display: none; }
    body:not(.embed) header .bLogo { display: grid; width: 32px; height: 32px; border-radius: 8px; }
    body:not(.embed) header .brand { flex: 1 1 auto; min-width: 0; font-size: clamp(11px, 3.6vw, 15px); }
    body:not(.embed) header #ntfBtn { display: none; }
    body:not(.embed) #ccFlatAll { flex: none; min-height: 44px; padding: 0 12px; }
    @media (max-width: 359px) { body:not(.embed) header { gap: 6px; padding-inline: 8px; } body:not(.embed) header .bLogo { width: 28px; height: 28px; } body:not(.embed) header .brand { gap: 6px; font-size: 3.1vw; } body:not(.embed) #ccFlatAll { padding: 0 8px; } }
    body:not(.embed) #acctMenu { flex: none; }
    body:not(.embed) #acctBtn { min-width: 44px; min-height: 44px; }
    body:not(.embed) #acctList { position: fixed; left: 0; right: 0; top: var(--hdrB, 52px); bottom: calc(56px + env(safe-area-inset-bottom)); max-height: none; min-width: 0; border-radius: 0; border-width: 1px 0; }
    body:not(.embed) #acctList button { min-height: 44px; }
    body:not(.embed) #acctList .themeSeg button { min-width: 64px; }
    body:not(.embed) #acctList .mPhone { display: block; }
    body:not(.embed) #acctList .mPhone[hidden] { display: none; }
    body:not(.embed) #acctList #mTabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
    body:not(.embed) #acctList #mTabs button { font-weight: 700; }
    body:not(.embed) #acctList #mTabs button.on { color: var(--orangeText); }
    body:not(.embed) #acctList #mTabs button[hidden] { display: none; }
    body:not(.embed) #acctList #mPortfolio, body:not(.embed) #acctList #mLearn, body:not(.embed) #acctList #mConnect { display: none; }
    body:not(.embed) #terminal { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
    body:not(.embed) #sideDrawer, body:not(.embed) #sideDrawer.floating { bottom: calc(56px + env(safe-area-inset-bottom)); }
    body:not(.embed) { --pbH: calc(56px + env(safe-area-inset-bottom)); }
    body:not(.embed) #stRail { padding-bottom: 8px; }
    body:not(.embed) #optBar { padding-bottom: 12px; }
    body:not(.embed) #phoneBar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 105; height: calc(56px + env(safe-area-inset-bottom)); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); background: var(--panel); border-top: 1px solid var(--border); }
    body:not(.embed) #phoneBar button { flex: 1 1 0; min-width: 0; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: none; border: 0; border-radius: 0; color: var(--muted); font-size: 11px; font-weight: 600; padding: 0; }
    body:not(.embed) #phoneBar button[hidden] { display: none; }
    body:not(.embed) #phoneBar button.on { color: var(--orangeText); }
    body:not(.embed) #phoneBar svg { width: 22px; height: 22px; }
    body:not(.embed) .prWrap { padding: 4px 12px var(--pd-space-8); }
    body:not(.embed) #prTop { flex-wrap: wrap; gap: 6px; margin-bottom: 0; }
    body:not(.embed) #prTop .prInvPill { order: 6; flex: 1 0 100%; justify-content: center; min-height: 44px; }
    body:not(.embed) #prTop h2, body:not(.embed) #prLive b, body:not(.embed) #prLive small, body:not(.embed) #prTop #prSearch, body:not(.embed) #prNav .ctxHelp { display: none; }
    body:not(.embed) #prTop .prFind { display: contents; }
    body:not(.embed) #prTop #prNav { order: 1; flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
    body:not(.embed) #prTop #prNav::-webkit-scrollbar { display: none; }
    body:not(.embed) #prTop #prNav.prNavMore { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
    body:not(.embed) #prTop #prNav button { flex: none; }
    body:not(.embed) #prTop #prSearchBtn { display: inline-flex; align-items: center; justify-content: center; order: 2; flex: none; width: 44px; min-height: 44px; padding: 0; }
    body:not(.embed) #prTop #prSearchBtn svg { width: 20px; height: 20px; }
    body:not(.embed) #prTop #prRefresh { order: 3; flex: none; width: 44px; min-height: 44px; padding: 0; }
    body:not(.embed) #prTop #prLive { order: 4; flex: none; min-width: 16px; justify-content: center; }
    body:not(.embed) #prTop.finding { flex-wrap: wrap; }
    body:not(.embed) #prTop.finding #prSearch { display: block; order: 5; flex: 1 0 100%; min-height: 44px; }
    body:not(.embed) #prCats { margin: 0 0 8px; }
  }
  #tkGrip, #phoneTrade { display: none; }
  #paneInl { display: contents; }
  #paneMoreBtn[hidden] { display: none !important; }
  #paneMore { display: none; position: absolute; top: 100%; right: 4px; left: auto; z-index: 30; flex-direction: column; gap: 2px; min-width: min(190px, calc(100vw - 8px)); max-width: calc(100vw - 8px); padding: 6px; box-sizing: border-box; background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 34px rgba(0,0,0,.55); max-height: calc(100vh - 48px); overflow-y: auto; white-space: normal; }
  #paneBar.moreOpen { z-index: 60; }
  #paneBar.moreOpen #paneMore { display: flex; }
  #paneMore > * { display: flex; align-items: center; width: 100%; min-height: 30px; box-sizing: border-box; }
  #paneMore > button { justify-content: flex-start; color: var(--text); }
  #paneMore > select, body.embed #paneMore > #paneSel { max-width: none; }
  #paneMore > .pb { font-size: 0; color: var(--text); }
  #paneMore > .pb::after { content: attr(aria-label); font-size: 12px; font-weight: 600; }
  #paneMore > [hidden] { display: none !important; }
  #paneMore > #tfSel { width: 100%; max-width: none; }
  body.embed #paneMoreBtn { flex: none; }
  body.embed:not(.phone) #paneBar.tight1 { gap: 2px; padding-left: 4px; padding-right: 4px; }
  body.embed:not(.phone) #paneBar.tight1 #ctyBtn { font-size: 0; }
  body.embed:not(.phone) #paneBar.tight1 #ctyBtn::after { content: attr(data-short); font-size: 11px; }
  body.embed:not(.phone) #paneBar.tight2 #ctyBtn { display: inline-flex; align-items: center; justify-content: center; width: 26px; padding: 2px 0; }
  body.embed:not(.phone) #paneBar.tight2 #ctyBtn::after { content: none; }
  body.embed:not(.phone) #paneBar.tight2 #ctyBtn::before { content: ''; width: 16px; height: 16px; background: currentColor; -webkit-mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3v3M7 18v3M17 5v3M17 16v3'/%3E%3Crect x='5' y='6' width='4' height='12' rx='1'/%3E%3Crect x='15' y='8' width='4' height='8' rx='1'/%3E%3C/svg%3E"); mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3v3M7 18v3M17 5v3M17 16v3'/%3E%3Crect x='5' y='6' width='4' height='12' rx='1'/%3E%3Crect x='15' y='8' width='4' height='8' rx='1'/%3E%3C/svg%3E"); }
  body.embed:not(.phone) #paneBar.tight3 #tfSel { width: 54px; padding: 2px 1px; }
  body.embed:not(.phone) #paneBar.tight3 #paneSym, body.embed:not(.phone) #paneBar.tight3 #paneMoreBtn { padding-left: 4px; padding-right: 4px; }
  body.embed:not(.phone) #paneBar.tight4 { padding-left: 2px; padding-right: 2px; }
  body.embed:not(.phone) #paneBar.tight4 #tfSel { width: 46px; }
  #paneMore > #fpGear::after { content: attr(aria-label); margin-left: 6px; font-size: 12px; }
  #paneSel, #paneAcct { order: 1; }
  #paneInd { order: 2; }
  #paneMoreBtn { order: 6; }
  body.phone #paneMoreBtn { order: 2; }
  #paneTrade, #paneCT, #paneChat, #paneStats, #oddsChip { order: 3; }
  #paneBar .spacer { order: 4; }
  #paneBar .pb { order: 5; }
  body.embed.phone #paneBar { gap: 6px; padding: 4px 8px; min-height: 52px; overflow: visible; }
  body.embed.phone #paneSym { min-height: 44px; padding: 0 12px; font-size: 14px; }
  body.embed.phone #tfSel { width: 76px; height: 44px; min-height: 44px; }
  body.embed.phone #paneBar .spacer { display: none; }
  body.embed.phone #ctyBtn, body.embed.phone #paneInd, body.embed.phone #paneMoreBtn { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 0; }
  body.embed.phone #ctyBtn::before, body.embed.phone #paneInd::before { content: ''; width: 22px; height: 22px; background: currentColor; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
  body.embed.phone #ctyBtn::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3v3M7 18v3M17 5v3M17 16v3'/%3E%3Crect x='5' y='6' width='4' height='12' rx='1'/%3E%3Crect x='15' y='8' width='4' height='8' rx='1'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3v3M7 18v3M17 5v3M17 16v3'/%3E%3Crect x='5' y='6' width='4' height='12' rx='1'/%3E%3Crect x='15' y='8' width='4' height='8' rx='1'/%3E%3C/svg%3E"); }
  body.embed.phone #paneInd::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 20h18M4 15l5-5 4 3 7-8'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 20h18M4 15l5-5 4 3 7-8'/%3E%3C/svg%3E"); }
  body.embed.phone #paneInd::after { content: attr(data-n); position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 3px; box-sizing: border-box; border-radius: 8px; background: var(--orange); color: var(--onOrange); font-size: 11px; font-weight: 800; line-height: 16px; text-align: center; }
  body.embed.phone #paneInd[data-n=""]::after, body.embed.phone #paneInd:not([data-n])::after { display: none; }
  body.embed.phone #paneMoreBtn { font-size: 24px; line-height: 1; }
  body.embed.phone #paneMore { left: 8px; right: 8px; gap: 4px; padding: 8px; border-radius: 12px; max-height: calc(100vh - 64px); }
  body.embed.phone #paneMore > * { display: flex; align-items: center; width: 100%; min-height: 44px; box-sizing: border-box; font-size: 14px; }
  body.embed.phone #paneMore > button { justify-content: flex-start; padding: 0 12px; color: var(--text); }
  body.embed.phone #paneMore > select { max-width: none; height: 44px; padding: 0 8px; }
  body.embed.phone #paneMore > .pb { font-size: 0; color: var(--text); }
  body.embed.phone #paneMore > .pb::after { content: attr(aria-label); font-size: 14px; font-weight: 600; }
  @keyframes tkRise { from { transform: translateY(100%); } to { transform: none; } }
  @media (max-width: 768px) and (min-height: 501px) and (pointer: coarse) {
    body.trade:not(.embed) #tkHint, body.trade:not(.embed) #asideOpen { display: none; }
    body.trade:not(.embed) { --pbH: calc(56px + env(safe-area-inset-bottom)); --ptH: 52px; --dkH: 52px; }
    body.trade:not(.embed) #terminal { padding-bottom: calc(var(--pbH) + var(--ptH) + var(--dkH)); }
    body.trade:not(.embed) #grid { height: calc(100vh - var(--hdrB, 52px) - var(--pbH) - var(--ptH) - var(--dkH)); height: calc(100dvh - var(--hdrB, 52px) - var(--pbH) - var(--ptH) - var(--dkH)); min-height: 300px; }
    body.trade:not(.embed) #phoneTrade { display: flex; position: fixed; left: 0; right: 0; bottom: var(--pbH); z-index: 40; height: var(--ptH); gap: 8px; padding: 6px 10px; box-sizing: border-box; background: var(--panel); border-top: 1px solid var(--border); }
    body.trade:not(.embed) #phoneTrade button { flex: 1 1 0; min-height: 44px; border: 0; border-radius: 8px; color: #fff; font-size: 16px; font-weight: 800; }
    body.trade:not(.embed) #phoneTrade #ptBuy { background: var(--bull); color: var(--onBull); }
    body.trade:not(.embed) #phoneTrade #ptSell { background: var(--bearSolid); }
    body.trade:not(.embed) #phoneTrade .ptAcct { margin-left: 6px; padding: 2px 7px; border-radius: 6px; font-size: 13px; font-weight: 800; background: rgba(0, 0, 0, .28); color: inherit; }
    body.trade:not(.embed) #phoneTrade .ptAcct.live { background: #b91c1c; color: #fff; box-shadow: 0 0 0 1px #fff; }
    body.trade:not(.embed) #dock { position: fixed; left: 0; right: 0; bottom: calc(var(--pbH) + var(--ptH)); z-index: 40; }
    /* The ▲ fold button sits outside the scrolling tab strip (absolute to the fixed #dock) and the strip stops short of it,
       so it never covers a tab. Tabs size to their label, so Account Manager, Strategies and Positions fit whole at 390px. */
    body.trade:not(.embed) #dockBar { position: static; margin-right: 52px; gap: 6px; padding: 4px 8px; min-height: var(--dkH); box-sizing: border-box; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
    body.trade:not(.embed) #dockBar .dt { flex: 0 0 auto; min-width: 0; padding: 8px 12px; min-height: 44px; scroll-snap-align: start; text-align: center; border: 1px solid var(--border); background: var(--panel2); border-radius: 8px; }
    body.trade:not(.embed) #dockBar .dt.on { color: var(--orangeText); border-color: var(--orange); }
    body.trade:not(.embed) #dockBar #dockToggle { position: absolute; right: 8px; z-index: 2; flex: none; min-width: 44px; min-height: 44px; margin: 0; }
    body:not(.embed):not(.trade) #dock { position: relative; }
    body:not(.embed):not(.trade) #dockBar { margin-right: 52px; min-height: 44px; }
    body:not(.embed):not(.trade) #dockBar #dockToggle { position: absolute; right: 4px; top: 0; z-index: 2; flex: none; min-width: 44px; min-height: 44px; margin: 0; }
    body.trade:not(.embed) #dockSum { display: none; }
    body.obFirst.trade:not(.embed) #dock.collapsed #dockBar { margin-right: 0; }
    body.obFirst.trade:not(.embed) #dock.collapsed #dockBar .dt[data-dt] { display: none; }
    body.obFirst.trade:not(.embed) #dock.collapsed #dockBar #dockToggle { position: static; flex: 1 1 auto; }
    body.obFirst.trade:not(.embed) #dock.collapsed #dockToggle::after { content: ' Control Center'; font-size: 13px; font-weight: 600; }
    body.trade:not(.embed) #dockBody { height: auto; max-height: min(56vh, calc(100vh - var(--hdrB, 52px) - var(--pbH) - var(--ptH) - var(--dkH) - 24px)); max-height: min(56dvh, calc(100dvh - var(--hdrB, 52px) - var(--pbH) - var(--ptH) - var(--dkH) - 24px)); padding-bottom: 12px; }
    body.trade:not(.embed) aside:where(#sidePanel) { position: fixed; left: 0; right: 0; bottom: var(--pbH); z-index: 49; width: auto; height: 72vh; height: 72dvh; max-height: calc(100vh - var(--hdrB, 52px) - var(--pbH)); max-height: calc(100dvh - var(--hdrB, 52px) - var(--pbH)); box-sizing: border-box; padding-bottom: 0; border-top: 1px solid var(--border); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 34px rgba(0,0,0,.55); display: none; }
    body.tkSheet.trade:not(.embed) aside:where(#sidePanel) { display: flex; animation: tkRise .22s ease; }
    body.trade:not(.embed) #tkGrip { display: flex; align-items: center; justify-content: center; flex: none; width: 100%; height: 28px; padding: 0; border: 0; border-radius: 16px 16px 0 0; background: none; touch-action: none; cursor: ns-resize; }
    body.trade:not(.embed) #tkGrip i { width: 44px; height: 5px; border-radius: 3px; background: var(--muted); opacity: .6; }
    body.trade:not(.embed) aside:where(#sidePanel) #algoLine, body.trade:not(.embed) aside:where(#sidePanel) #zLine { display: none; }
    body.trade:not(.embed) aside:where(#sidePanel) .tabs { flex: none; }
    body.trade:not(.embed) aside:where(#sidePanel) .tabs button { min-height: 44px; }
    body.trade:not(.embed) aside:where(#sidePanel) .tabs .fold { font-size: 0; }
    body.trade:not(.embed) aside:where(#sidePanel) .tabs .fold::after { content: '✕'; font-size: 16px; }
    body.trade:not(.embed) aside:where(#sidePanel) .tab { overflow: auto; min-height: 0; padding-bottom: 16px; }
  }
  #spView .usGame { gap: 10px; cursor: pointer; }
  .usHd { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .usTitle { margin: 0; font-size: 15px; font-weight: 800; text-transform: none; letter-spacing: 0; color: var(--pd-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .usStat { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--pd-muted); min-width: 0; }
  .usStat .usClock { font-weight: 700; color: var(--pd-text-2); }
  .usStat .usClock.live { color: var(--pd-live); }
  .usStat .usLg::before { content: '·'; margin-right: 6px; }
  .usDot { width: 7px; height: 7px; border-radius: 50%; background: var(--pd-live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pd-live) 22%, transparent); flex: none; }
  .usTeams { display: flex; flex-direction: column; gap: 6px; }
  .usTeam { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 118px; align-items: center; gap: 10px; min-height: 52px; }
  .usTeam .gsIco { width: 30px; height: 30px; }
  .usName { font-size: 15px; font-weight: 700; color: var(--pd-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .usScore { font-size: 20px; font-weight: 800; color: var(--pd-text); font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
  .usTeam:not(:has(.usScore)) { grid-template-columns: 30px minmax(0, 1fr) 118px; }
  #spView .usGame .usPx { flex-direction: row; justify-content: space-between; gap: 6px; min-height: 48px; padding: 0 12px; }
  #spView .usGame .usPx .prPxL { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #spView .usGame .usPx .prPxM { order: -1; font-size: 12px; }
  #spView .usGame .usPx .prPxV { font-size: 17px; }
  .usFoot { justify-content: space-between; align-items: center; gap: 8px; }
  .usCombo { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--pd-accent); background: none; color: var(--pd-text); font: 700 12px/1 inherit; font-family: inherit; cursor: pointer; }
  .usCombo .prGlyph { width: 15px; height: 15px; color: var(--pd-accent); }
  .usCombo:hover { background: var(--pd-raised); }
  .gsIco { width: 28px; height: 28px; flex: none; display: block; }
  .gsIco.sm { width: 22px; height: 22px; }
  .spSrc { margin: 0 0 12px; }
  #gsWrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--pd-space-6); align-items: start; }
  .gsMain { display: flex; flex-direction: column; gap: var(--pd-space-3); min-width: 0; }
  .gsSide { position: sticky; top: calc(var(--gsTop, 0px) + 12px); display: flex; flex-direction: column; gap: var(--pd-space-3); min-width: 0; scroll-margin-top: calc(var(--gsTop, 0px) + 84px); }
  #predictions:has(#gsWrap) { overflow: visible; }
  .gsBoard { position: sticky; top: var(--gsTop, 0px); z-index: 6; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px 14px; background: color-mix(in srgb, var(--pd-surface) 94%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--pd-border); border-radius: 14px; }
  .gsBTeam { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .gsBTeam.r { flex-direction: row-reverse; }
  .gsBTeam .gsIco { width: 34px; height: 34px; }
  .gsBName { font-weight: 800; font-size: 15px; color: var(--pd-text); }
  .gsBScore { font-size: 26px; font-weight: 800; color: var(--pd-text); font-variant-numeric: tabular-nums; margin: 0 4px; }
  .gsBTeam:not(.r) .gsBScore { margin-left: auto; }
  .gsBTeam.r .gsBScore { margin-right: auto; }
  .gsBMid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
  .gsBClock { font-size: 13px; color: var(--pd-live); white-space: nowrap; }
  .gsBMid small { font-size: 11px; color: var(--pd-muted); letter-spacing: .04em; }
  .gsHead { margin: 0; }
  .gsHead h2 { font-size: 22px; }
  .gsWin h3 { margin: 0 0 6px; font-size: 13px; color: var(--pd-muted); font-weight: 700; }
  .gsLegend { display: flex; gap: 14px; font-size: 12px; font-weight: 700; color: var(--pd-text-2); }
  .gsLeg { display: inline-flex; align-items: center; gap: 6px; }
  .gsLeg i { width: 10px; height: 3px; border-radius: 2px; background: var(--team); outline: 1px solid color-mix(in srgb, var(--pd-text) 25%, transparent); }
  .gsChart { margin-top: 6px; }
  .gsChartSvg { display: block; width: 100%; height: auto; }
  .gsGrid { stroke: var(--pd-border); stroke-width: 1; stroke-dasharray: 2 4; }
  .gsLineP { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; paint-order: stroke; filter: drop-shadow(0 0 1px color-mix(in srgb, var(--pd-text) 35%, transparent)); }
  .gsEnd { font-size: 13px; font-weight: 800; fill: var(--pd-text); font-family: inherit; }
  .gsOuts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
  .gsOut { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; padding: 0 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--team) 60%, var(--pd-border)); background: color-mix(in srgb, var(--team) 26%, var(--pd-surface)); color: var(--pd-text); font-family: inherit; cursor: pointer; }
  .gsOut:hover { background: color-mix(in srgb, var(--team) 40%, var(--pd-surface)); }
  .gsOutT { font-size: 16px; font-weight: 800; }
  .gsOutV { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .gsOut.sel, .gsPx.sel { outline: 2px solid var(--pd-accent); outline-offset: -2px; }
  .gsOut.cbIn, .gsPx.cbIn { box-shadow: inset 0 0 0 2px var(--pd-accent); }
  #prDetail #gsWrap #cbEntry { margin: 0; order: 0; }
  .gsTabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--pd-border); border-radius: 12px; background: var(--pd-surface); overflow-x: auto; }
  .gsTabs button { flex: 1 0 auto; min-height: 42px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--pd-muted); font: 800 12px/1 inherit; font-family: inherit; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
  .gsTabs button.on { background: var(--pd-raised); color: var(--pd-text); }
  .gsSecs { display: flex; flex-direction: column; gap: var(--pd-space-3); }
  .gsSec { padding: 0; }
  .gsSecHd { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; font-size: 16px; font-weight: 800; color: var(--pd-text); cursor: pointer; list-style: none; }
  .gsSecHd::-webkit-details-marker { display: none; }
  .gsSecHd .prChev { transition: transform .15s var(--pd-ease); transform: rotate(90deg); color: var(--pd-muted); }
  .gsSec:not([open]) .gsSecHd .prChev { transform: rotate(0deg); }
  .gsSecBody, .gsSec > .prRules, .gsSec > .gsSteps, .gsSec > .prTbl { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; }
  .gsSec > .prTbl { border: 0; background: none; }
  .gsPers { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .gsPers button { flex: none; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--pd-border); background: var(--pd-raised); color: var(--pd-text-2); font: 700 12px/1 inherit; font-family: inherit; cursor: pointer; white-space: nowrap; }
  .gsPers button.on { background: var(--pd-text); color: var(--pd-bg); border-color: var(--pd-text); }
  .gsLine { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--pd-raised); font-size: 14px; color: var(--pd-text-2); }
  .gsLine b { color: var(--pd-text); }
  .gsSel { min-height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--pd-border); background: var(--pd-surface); color: var(--pd-text); font: 800 14px/1 inherit; font-family: inherit; cursor: pointer; }
  .gsSwap { margin-left: auto; min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--pd-border); background: none; color: var(--pd-muted); font: 700 12px/1 inherit; font-family: inherit; cursor: pointer; }
  .gsRow { display: grid; grid-template-columns: minmax(0, 1fr) 140px; align-items: center; gap: 10px; min-height: 52px; }
  .gsRowL { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--pd-text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gsPx { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 48px; padding: 0 12px; border-radius: 10px; border: 1px solid transparent; background: var(--pd-yes-soft); color: var(--pd-text); font-family: inherit; cursor: pointer; }
  .gsPx:hover { background: var(--pd-yes-hover); border-color: var(--pd-yes); }
  .gsPx .prPxL { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .gsPx .prPxM { order: -1; font-size: 12px; color: var(--pd-text-2); }
  .gsPx .prPxV { font-size: 17px; font-weight: 800; color: var(--pd-yes); }
  .gsTeamBlk { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
  .gsTeamBlk + .gsTeamBlk { border-top: 1px solid var(--pd-border); padding-top: 12px; }
  .gsTeamHd { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--pd-text); }
  .gsProp { display: grid; grid-template-columns: minmax(0, 1fr) 236px; align-items: center; gap: 10px; min-height: 52px; }
  .gsProp + .gsProp { border-top: 1px solid var(--pd-border); padding-top: 8px; }
  .gsPropName { font-size: 14px; font-weight: 700; color: var(--pd-text); }
  .gsPropPx { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .gsPropPx .gsPx:last-child { background: var(--pd-no-soft); }
  .gsPropPx .gsPx:last-child .prPxV { color: var(--pd-no); }
  .gsNone { margin: 0; color: var(--pd-muted); font-size: 13px; }
  .gsSteps { margin: 0; padding-left: 34px !important; list-style: decimal; }
  .gsSteps li { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--pd-text-2); }
  .gsSteps li b { color: var(--pd-text); }
  .gsRow { position: relative; padding-bottom: 6px; }
  .gsBar { position: absolute; left: 0; bottom: 0; height: 3px; border-radius: 2px; background: var(--team, var(--muted)); opacity: .85; pointer-events: none; }
  .gsRowT { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gsPx { background: none; border: 0; padding: 0; min-height: 44px; justify-content: flex-end; gap: 10px; }
  .gsPx:hover { background: none; border: 0; }
  .gsPx .prPxV { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; min-height: 40px; padding: 0 10px; border-radius: 10px; background: var(--pd-yes-soft); color: var(--pd-yes); font-size: 16px; }
  .gsPx:hover .prPxV { background: var(--pd-yes-hover); }
  .gsPx.sel .prPxV, .gsPx.cbIn .prPxV { background: var(--team, var(--pd-accent)); color: #fff; }
  .gsPx.sel, .gsPx.cbIn { outline: 0; box-shadow: none; }
  .gsPropPx .gsPx:last-child { background: none; }
  .gsPropPx .gsPx:last-child .prPxV { background: var(--pd-no-soft); color: var(--pd-no); }
  .gsPers button.done { opacity: .6; cursor: default; display: inline-flex; align-items: center; gap: 4px; }
  .gsCheck { color: var(--pd-live); font-weight: 800; }
  .gsImp { margin: 0; font-size: 12px; color: var(--pd-muted); }
  .gsEq { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--pd-raised); color: var(--pd-text-2); font-weight: 800; flex: none; }
  .gsIco.xs { width: 18px; height: 18px; }
  .gsTeamChips button { display: inline-flex; align-items: center; gap: 6px; }
  .gsLine .gsSel { border-radius: 999px; padding: 0 12px; }
  .cbSum { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pd-text); }
  .cbSum:empty { display: none; }
  .gcSheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 124; max-height: 92vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); background: var(--pd-bg); border-top: 1px solid var(--pd-border); border-radius: 16px 16px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.55); }
  .gcSheet[hidden], .gcShade[hidden] { display: none; }
  .gcShade { position: fixed; inset: 0; z-index: 123; background: rgba(0,0,0,.55); }
  .gcHd { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 52px; background: var(--pd-bg); }
  .gcBack, .gcX { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--pd-raised); color: var(--pd-text); font-size: 24px; line-height: 1; cursor: pointer; }
  .gcLg { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 800; font-size: 14px; letter-spacing: .06em; color: var(--pd-text); }
  .gcTitle { margin: 0; font-size: 16px; color: var(--pd-text-2); }
  .gcSheet .gsTabs button { min-height: 48px; font-size: 13px; }
  .gcSheet .gsTabs { position: sticky; top: 52px; z-index: 2; flex: none; }
  .gcFoot { position: sticky; bottom: calc(-12px - env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0 12px; background: var(--pd-bg); border-top: 1px solid var(--pd-border); }
  .gcSum { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--pd-text); }
  .gcGo { min-height: 48px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--pd-accent); color: var(--pd-on-accent); font: 800 14px/1 inherit; font-family: inherit; cursor: pointer; }
  @media (max-width: 900px) {
    #gsWrap { display: flex; flex-direction: column; align-items: stretch; gap: var(--pd-space-3); }
    .gsMain { display: contents; }
    .gsMain > .gsWin, .gsMain > .gsTabs, .gsMain > .gsSecs, .gsMain > .gsInfo, .gsMain > .gsAll, .gsMain > .srOnly { order: 2; }
    .gsBoard { border-radius: 0 0 14px 14px; padding: 10px 12px; }
    .gsBScore { font-size: 22px; }
    .gsSide { position: static; order: 1; }
    .gsRow { grid-template-columns: minmax(0, 1fr) 128px; }
    .gsProp { grid-template-columns: minmax(0, 1fr); }
    .usTeam { grid-template-columns: 30px minmax(0, 1fr) auto 108px; }
    .usTeam:not(:has(.usScore)) { grid-template-columns: 30px minmax(0, 1fr) 108px; }
  }
  #predictions #prCats { gap: 2px; margin: 2px 0 14px; align-items: stretch; }
  #predictions #prCats > button { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 64px; min-height: 64px; padding: 8px 10px 9px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--pd-muted); font: 700 12px/1 inherit; font-family: inherit; letter-spacing: .01em; }
  #predictions #prCats > button .prGlyph { width: 24px; height: 24px; opacity: 1; color: var(--pd-text-2); }
  #predictions #prCats > button:hover { color: var(--pd-text); }
  #predictions #prCats > button.on { color: var(--pd-text); border-bottom-color: var(--pd-accent); }
  #predictions #prCats > button.on .prGlyph { color: var(--pd-accent); }
  #predictions #prCats > button > i { display: none; }
  #predictions #prCats > .prFilterBtn { position: sticky; right: 0; margin-left: auto; min-width: 56px; padding-left: 16px; background: linear-gradient(90deg, transparent, var(--pd-bg) 28%); }
  #predictions #prCats > .prFilterBtn.on .prGlyph { color: var(--pd-accent); }
  #prMarkets.spTop > #prLeagues { display: none; }
  @media (min-width: 1100px) {
    #prMarkets.spMode.spTop { grid-template-columns: minmax(0, 1fr); }
    #prMarkets.spMode.spTop > * { grid-column: 1; }
  }
  @media (min-width: 1300px) {
    #prMarkets.spMode.spTop { grid-template-columns: minmax(0, 1fr) 340px; }
    #prMarkets.spMode.spTop > #spRail { grid-column: 2; grid-row: 2 / span 12; }
  }
  #spView.spOne .spLeagueHd { display: none; }
  #spView .spSub { display: flex; align-self: stretch; gap: 22px; padding: 0; margin: 0; border: 0; border-bottom: 1px solid var(--pd-border); border-radius: 0; background: none; overflow-x: auto; scrollbar-width: none; }
  #spView .spSub button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--pd-muted); font: 700 15px/1 inherit; font-family: inherit; }
  #spView .spSub button.on { background: none; color: var(--pd-text); border-bottom-color: var(--pd-text); }
  #spView .spSub button i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--pd-muted); }
  #spView .spHub { padding: 18px 20px; border-radius: 16px; gap: 16px; }
  #spView .spHub .spHubIco { width: 52px; height: 52px; padding: 11px; border-radius: 14px; }
  #spView .spHubTxt small { letter-spacing: .06em; }
  #spView .spHubBar { height: 6px; border-radius: 3px; }
  #spView .spDay { margin: 6px 2px 10px; font-size: 13px; letter-spacing: .02em; text-transform: none; color: var(--pd-text); font-weight: 800; }
  #spView .spGames { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
  #spView .usGame, #spView .spGame { padding: 16px; gap: 12px; border-radius: 16px; }
  #spView .usHd, #spView .spHd { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  #spView .usTitle, #spView .spTitle { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.25; color: var(--pd-text); text-transform: none; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #spView .usStat, #spView .spHd .spWhen { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--pd-muted); }
  #spView .usStat .usLg::before, #spView .spHd .spLg::before { content: '·'; margin-right: 6px; }
  #spView .spHd .spWhen b { color: var(--pd-muted); font-weight: 600; }
  #spView .usStat .usClock.live { color: var(--pd-live); }
  #spView .usTeams { gap: 8px; }
  #spView .usTeam, #spView .usTeam:not(:has(.usScore)) { grid-template-columns: 32px minmax(0, 1fr) auto auto; gap: 12px; min-height: 48px; }
  #spView .usTeam .gsIco, #spView .spTeam .gsIco { width: 32px; height: 32px; }
  #spView .usName, #spView .spGame.two .spName { justify-self: start; max-width: 100%; padding-bottom: 3px; border-bottom: 3px solid var(--team, var(--pd-border)); font-size: 15px; font-weight: 700; }
  #spView .usScore { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
  #spView .usGame .usPx, #spView .spGame.two .spPx { flex-direction: row; justify-content: flex-end; align-items: center; gap: 12px; min-height: 48px; padding: 0; border: 0; border-radius: 999px; background: none; }
  #spView .usGame .usPx:hover, #spView .spGame.two .spPx:hover { background: none; border: 0; }
  #spView .usGame .usPx .prPxM, #spView .spGame.two .spPx .prPxM { order: -1; font-size: 13px; font-weight: 700; color: var(--pd-text-2); font-variant-numeric: tabular-nums; }
  #spView .usGame .usPx .prPxV, #spView .spGame.two .spPx .prPxV { display: inline-flex; align-items: center; justify-content: center; min-width: 88px; height: 48px; padding: 0 14px; border-radius: 999px; background: var(--team, var(--pd-yes)); color: var(--team-fg, var(--pd-on-accent)); font: 800 18px/1 inherit; font-family: inherit; font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 14%, transparent); transition: filter .12s; }
  #spView .usGame .usPx:hover .prPxV, #spView .spGame.two .spPx:hover .prPxV { filter: brightness(1.12); }
  #spView .usGame .usPx.sel, #spView .spGame.two .spPx.sel { outline: 0; }
  #spView .usGame .usPx.sel .prPxV, #spView .spGame.two .spPx.sel .prPxV { outline: 2px solid var(--pd-accent); outline-offset: 2px; }
  #spView .spGame.two .spBody { grid-template-columns: minmax(0, 1fr) auto; }
  #spView .spGame.two .spLine > small { display: none; }
  #spView .spGame.two .spTeam { min-height: 48px; }
  #spView .spGame.two .spLine .spPxs { grid-auto-rows: 48px; }
  #spView .spFoot, #spView .usFoot { border-top: 1px solid var(--pd-border); padding-top: 10px; margin-top: 0; }
  #spView .spCount { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--pd-text-2); }
  #spView .spCount .spCountIco { width: 16px; height: 16px; color: var(--pd-muted); }
  .gsTopBar { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; }
  #prDetail .gsTopBar .gsBack { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 6px; margin: 0; }
  .gsBackA { font-size: 26px; line-height: 1; }
  .gsPageTabs { display: flex; gap: 22px; margin-left: 8px; }
  .gsPageTabs button { min-height: 44px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--pd-muted); font: 800 15px/1 inherit; font-family: inherit; cursor: pointer; }
  .gsPageTabs button.on { color: var(--pd-text); border-bottom-color: var(--pd-accent); }
  .gsStrip { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
  .gsStrip::-webkit-scrollbar { display: none; }
  .gsStripHd, .gsStripGame { flex: 0 0 auto; width: 156px; border: 1px solid var(--pd-border); border-radius: 12px; background: var(--pd-surface); color: var(--pd-text); }
  .gsStripHd { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 10px 12px; }
  .gsStripHd .prGlyph { width: 20px; height: 20px; color: var(--pd-accent); }
  .gsStripHd b { font-size: 16px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  .gsStripHd small { font-size: 12px; color: var(--pd-muted); }
  .gsStripGame { display: flex; flex-direction: column; gap: 2px; min-height: 76px; padding: 8px 10px; text-align: left; font: inherit; cursor: pointer; }
  .gsStripGame:hover { background: var(--pd-raised); }
  .gsStripGame[aria-current=true] { border-color: var(--pd-accent); box-shadow: inset 0 0 0 1px var(--pd-accent); cursor: default; }
  .gsStripWhen { font-size: 12px; color: var(--pd-muted); white-space: nowrap; }
  .gsStripRow { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 22px; }
  .gsStripRow b { margin-left: auto; font-variant-numeric: tabular-nums; }
  .gsStripMark { width: 18px; height: 18px; flex: none; }
  .gsStripName { font-weight: 700; }
  .gsCrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--pd-muted); }
  .gsCrumb button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--pd-muted); font: 700 13px/1 inherit; font-family: inherit; cursor: pointer; }
  .gsCrumb button.on { color: var(--pd-text); }
  .gsCrumb .prGlyph { width: 16px; height: 16px; color: var(--pd-accent); }
  #prDetail .gsHead h2 { font-size: 28px; line-height: 1.15; }
  .gsHero { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 4px 0 6px; }
  .gsHTeam { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
  .gsHTeam .gsHMark { width: 56px; height: 56px; }
  .gsHName { max-width: 100%; font-size: 15px; font-weight: 800; color: var(--pd-text); padding-bottom: 3px; border-bottom: 3px solid var(--team); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gsHRec { font-size: 12px; color: var(--pd-muted); font-variant-numeric: tabular-nums; }
  .gsHScore { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .gsHMid { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
  .gsHMid b { font-size: 14px; color: var(--pd-text); white-space: nowrap; }
  .gsHMid .gsHLive { color: var(--pd-live); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
  .gsHLg { font-size: 12px; color: var(--pd-muted); letter-spacing: .04em; }
  #prDetail > .gsCrumb { margin: 0 0 8px; }
  #prDetail > .gsHero { margin: 0 0 14px; padding: 14px; border: 1px solid var(--pd-border); border-radius: 16px; background: var(--pd-surface); }
  .gsWin .gsRange { display: flex; gap: 4px; margin-top: 8px; }
  .gsWin .gsRange button { min-height: 36px; min-width: 48px; border-radius: 999px; }
  .gsEnd { font-size: 12px; }
  .gsEndT { font-weight: 700; }
  .gsChatPeek { display: flex; flex-direction: column; gap: 6px; }
  .gsChatHd { display: flex; align-items: center; gap: 8px; }
  .gsChatHd .prGlyph { width: 18px; height: 18px; color: var(--pd-accent); }
  .gsChatHd b { font-size: 14px; color: var(--pd-text); }
  .gsChatPeek p, .gsChatPane p { margin: 0; font-size: 13px; color: var(--pd-text-2); }
  .gsChatGo { margin-left: auto; min-height: 36px; padding: 0 10px; border: 0; background: none; color: var(--pd-accent); font: 700 13px/1 inherit; font-family: inherit; cursor: pointer; }
  .gsChatPane { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; }
  .gsChatPane[hidden] { display: none; }
  .gsChatOpen, .gsChatBack { align-self: flex-start; min-height: 44px; padding: 0 18px; border-radius: 999px; font: 800 14px/1 inherit; font-family: inherit; cursor: pointer; }
  .gsChatOpen { border: 0; background: var(--pd-accent); color: var(--pd-on-accent); }
  .gsChatBack { border: 1px solid var(--pd-border); background: none; color: var(--pd-text); }
  #gsWrap[data-page=chat] > .gsMain, #gsWrap[data-page=chat] > .gsSide { display: none; }
  #prDetail .gsOuts { gap: 12px; }
  #prDetail .gsOut { flex-direction: column; justify-content: center; align-items: center; gap: 2px; min-height: 72px; border-radius: 16px; border: 0; background: var(--team); color: var(--team-fg, #fff); }
  #prDetail .gsOut:hover { background: var(--team); filter: brightness(1.1); }
  #prDetail .gsOut .gsOutT { font-size: 14px; font-weight: 800; color: inherit; opacity: .92; }
  #prDetail .gsOut .gsOutV { font-size: 24px; font-weight: 800; color: inherit; }
  #prDetail .gsOut .gsOutM { font-size: 12px; font-weight: 700; color: inherit; opacity: .8; }
  #prDetail .gsOut.sel { outline: 3px solid var(--pd-accent); outline-offset: 2px; }
  #prDetail #cbEntry { border-radius: 999px; min-height: 48px; }
  @media (max-width: 900px) {
    .gsMain > .gsChatPeek { order: 2; }
    .gsTopBar { margin: 0; }
    .gsBackT { display: none; }
    .gsPageTabs { flex: 1; justify-content: center; margin: 0 44px 0 0; }
    #prDetail .gsHead h2 { font-size: 24px; }
    .gsHTeam .gsHMark { width: 48px; height: 48px; }
  }
  @media (max-width: 600px) {
    #predictions #prCats { margin: 0 0 4px; }
    #predictions #prCats > button { min-width: 56px; min-height: 50px; gap: 3px; padding: 5px 6px 6px; font-size: 11px; }
    #predictions #prCats > button .prGlyph { width: 20px; height: 20px; }
    #spView .usGame .usPx .prPxV, #spView .spGame.two .spPx .prPxV { min-width: 76px; height: 44px; font-size: 17px; }
    #spView .usTeam, #spView .usTeam:not(:has(.usScore)) { gap: 10px; }
  }
  #predictions #prCats { gap: 4px; margin: 4px 0 16px; align-items: stretch; border-bottom: 1px solid var(--pd-border); }
  #predictions #prCats > button { flex-direction: row; min-width: 0; min-height: 44px; gap: 0; padding: 0 12px; font-weight: 600; font-size: 15px; line-height: 1; font-family: inherit; letter-spacing: 0; color: var(--pd-muted); border-bottom: 2px solid transparent; }
  #predictions #prCats > button.on { color: var(--pd-text); font-weight: 700; border-bottom-color: var(--pd-accent); }
  #predictions #prCats > button .prTabL { white-space: nowrap; }
  #predictions #prCats > .prFilterBtn .prGlyph { width: 20px; height: 20px; color: var(--pd-text-2); }
  .gsIco.gsLogo { border-radius: 0; background: none; }
  .gsIco.gsLogo image { image-rendering: auto; }
  svg.spLogo.spImg { width: 20px; height: 20px; flex: none; border: 0; background: none; }
  #gsWrap { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
  .gsMain { gap: 16px; }
  #prDetail .gsBoard { height: 56px; margin-bottom: -56px; padding: 0 14px; opacity: 0; pointer-events: none; transform: translateY(-6px); transition: opacity .15s var(--pd-ease), transform .15s var(--pd-ease); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
  #prDetail .gsBoard.on { opacity: 1; pointer-events: auto; transform: none; }
  #prDetail .gsBoard .gsIco { width: 28px; height: 28px; }
  #prDetail .gsBName { font-size: 14px; }
  #prDetail .gsBScore { font-size: 20px; }
  #prDetail .gsBScore:empty { display: none; }
  .gsBPx { font-size: 14px; font-weight: 800; color: var(--pd-text); font-variant-numeric: tabular-nums; }
  .gsBTeam:not(.r) .gsBPx { margin-left: auto; }
  .gsBTeam.r .gsBPx { margin-right: auto; }
  #prDetail .gsBClock { color: var(--pd-text); }
  #prDetail .gsHead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .gsHeadT { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  #prDetail .gsHead h2.gsTitle { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; }
  .gsMeta { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--pd-muted); }
  .gsMeta .prGlyph { width: 16px; height: 16px; color: var(--pd-accent); }
  #prDetail .gsHero { padding: 8px 0 4px; gap: 16px; }
  #prDetail .gsHTeam .gsHMark { width: 88px; height: 88px; }
  #prDetail .gsHName { font-size: 18px; border-bottom: 0; padding: 0; }
  #prDetail .gsHRec { font-size: 13px; }
  #prDetail .gsHMid b.gsHWhen { font-size: 20px; }
  .gsHDate { font-size: 13px; color: var(--pd-text-2); }
  .gsHClock { font-size: 18px; font-weight: 800; color: var(--pd-text); }
  .gsCount { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--pd-accent) 14%, transparent); color: var(--pd-accent); font-size: 12px; font-weight: 800; white-space: nowrap; }
  .gsCount.live { background: color-mix(in srgb, var(--pd-live) 14%, transparent); color: var(--pd-live); }
  #prDetail .gsWin { padding: 16px 16px 12px; }
  .gsWinHd { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .gsLegend { gap: 16px; font-size: 13px; }
  .gsLeg b { margin-left: 2px; color: var(--pd-text); font-variant-numeric: tabular-nums; }
  .gsLeg i { width: 10px; height: 10px; border-radius: 50%; outline: 0; }
  .gsWinFt { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
  .gsWinT { font-size: 12px; font-weight: 700; color: var(--pd-muted); }
  #prDetail .gsWin .gsRange { margin: 0; gap: 2px; }
  #prDetail .gsWin .gsRange button { min-height: 32px; min-width: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--pd-muted); font-weight: 800; font-size: 12px; line-height: 1; font-family: inherit; }
  #prDetail .gsWin .gsRange button.on { background: var(--pd-raised); color: var(--pd-text); }
  .gsAxis, .gsTick { font-size: 11px; fill: var(--pd-muted); font-family: inherit; font-variant-numeric: tabular-nums; }
  .gsGrid { stroke-dasharray: 0; stroke: color-mix(in srgb, var(--pd-border) 70%, transparent); }
  .gsLineP { stroke-width: 2.6; filter: none; }
  .gsEnd { font-size: 13px; font-weight: 800; }
  .gsEndV { font-variant-numeric: tabular-nums; }
  #prDetail .gsOuts { display: flex; flex-direction: column; gap: 0; padding: 4px 16px; border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); background: var(--pd-surface); }
  .gsOutsHd { padding: 12px 0 4px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pd-muted); }
  .gsMl { display: grid; grid-template-columns: 44px minmax(0, 1fr) 156px; align-items: center; gap: 12px; min-height: 72px; }
  .gsMl + .gsMl { border-top: 1px solid var(--pd-border); }
  .gsMl .gsMlMark { width: 44px; height: 44px; }
  .gsMlTxt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .gsMlName { font-size: 16px; font-weight: 800; color: var(--pd-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gsMlSub { font-size: 12px; color: var(--pd-muted); font-variant-numeric: tabular-nums; }
  #prDetail .gsMl .gsOut { flex-direction: row; justify-content: center; gap: 8px; min-height: 52px; padding: 0 14px; border-radius: 12px; }
  #prDetail .gsMl .gsOut .gsOutT { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #prDetail .gsMl .gsOut .gsOutV { font-size: 22px; }
  #prDetail .gsMl .gsOut .gsOutM { font-size: 13px; }
  #prDetail .gsTabs { gap: 24px; padding: 0; border: 0; border-bottom: 1px solid var(--pd-border); border-radius: 0; background: none; }
  #prDetail .gsTabs button { flex: none; min-height: 44px; padding: 0 2px; border-radius: 0; border-bottom: 2px solid transparent; font-size: 13px; }
  #prDetail .gsTabs button.on { background: none; color: var(--pd-text); border-bottom-color: var(--pd-accent); }
  .gsLCard { display: flex; flex-direction: column; gap: 12px; }
  .gsLSel { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 6px; }
  .gsLArr { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--pd-border); background: var(--pd-raised); color: var(--pd-text); font-weight: 800; font-size: 18px; line-height: 1; font-family: inherit; cursor: pointer; }
  .gsLArr:disabled { opacity: .35; cursor: default; }
  .gsLTrack { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; padding: 2px; }
  .gsLTrack::-webkit-scrollbar { display: none; }
  .gsLTrack button { flex: 1 0 64px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--pd-border); background: none; color: var(--pd-text-2); font-weight: 800; font-size: 14px; line-height: 1; font-family: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
  .gsLTrack button:hover { border-color: var(--pd-muted); color: var(--pd-text); }
  .gsLTrack button.on { background: var(--pd-text); border-color: var(--pd-text); color: var(--pd-bg); }
  .gsLStat { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
  .gsLWhat { font-size: 14px; font-weight: 700; color: var(--pd-text-2); }
  .gsLNum { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
  .gsLPct { font-size: 28px; font-weight: 800; color: var(--pd-text); font-variant-numeric: tabular-nums; }
  .gsLNum small { font-size: 13px; color: var(--pd-muted); }
  .gsLDelta { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .gsLDelta[data-dir=up] { color: var(--pd-yes); }
  .gsLDelta[data-dir=down] { color: var(--pd-no); }
  .gsLPxs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  #prDetail .gsLPxs .gsPx, .gcSheet .gsLPxs .gsPx { display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 8px; min-height: 52px; padding: 0 12px; border-radius: 12px; background: var(--pd-yes-soft); }
  #prDetail .gsLPxs .gsPx.gsLNo, .gcSheet .gsLPxs .gsPx.gsLNo { background: var(--pd-no-soft); }
  .gsLPxs .gsPx .prPxL { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: 15px; font-weight: 800; color: var(--pd-yes); }
  .gsLPxs .gsPx.gsLNo .prPxL { color: var(--pd-no); }
  .gsLPxs .gsPx .prPxV { min-width: 0; min-height: 0; padding: 0; background: none !important; font-size: 17px; color: var(--pd-yes); }
  .gsLPxs .gsPx.gsLNo .prPxV { color: var(--pd-no); }
  .gsLPxs .gsPx .prPxM { order: 3; font-size: 12px; color: var(--pd-text-2); }
  .gsLPxs .gsPx:hover { filter: brightness(1.15); }
  .gsLPxs .gsPx.sel, .gsLPxs .gsPx.cbIn { box-shadow: inset 0 0 0 2px var(--pd-accent); }
  .gsTeamGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
  .gsTeamGrid .gsTeamBlk, .gsTeamGrid .gsTeamBlk + .gsTeamBlk { padding: 14px; border: 1px solid var(--pd-border); border-radius: 12px; border-top: 1px solid var(--pd-border); }
  .gsTeamHd b { font-size: 15px; }
  .gsSide .tkBox { gap: 12px; padding: 16px; border-radius: 16px; }
  .tkHeadRow { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .tkHeadRow .tkHead { margin: 0; flex: 1; min-width: 0; }
  .tkHead .tkMark { width: 44px; height: 44px; flex: none; }
  .tkHead .tkTitle { font-size: 13px; color: var(--pd-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tkHead .tkSub { font-size: 17px; font-weight: 800; color: var(--pd-text); }
  .tkHeadRow #tkMode { display: flex; flex: none; gap: 2px; padding: 2px; border-radius: 999px; }
  .tkHeadRow #tkMode button { flex-direction: row; min-height: 28px; padding: 0 10px; border-radius: 999px; }
  .tkHeadRow #tkMode button b { font-size: 12px; }
  .tkHeadRow #tkMode button small { display: none; }
  @media (max-width: 640px), (pointer: coarse) { .tkHeadRow #tkMode button { min-height: 44px; } }
  .tkModeNote { font-size: 12px; }
  #tkBox .tkTop { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--pd-border); }
  #tkBox #tkBuySell button { min-height: 40px; font-size: 15px; font-weight: 800; }
  #tkBox #prTkType { border: 0; background: none; font-weight: 700; color: var(--pd-text-2); }
  #tkBox .tkYN button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border-radius: 12px; }
  .tkYNL { font-size: 15px; font-weight: 700; }
  .tkYNV { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
  #tkBox .tkAmtRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
  #tkBox .tkAmtLbl { font-size: 18px; font-weight: 800; color: var(--pd-text); }
  #tkBox #tkAmount { width: 60%; border: 0; background: none; text-align: right; font-weight: 800; font-size: 40px; line-height: 1.1; font-family: inherit; color: var(--pd-text); font-variant-numeric: tabular-nums; }
  #tkBox .tkChips { display: flex; justify-content: flex-end; gap: 6px; }
  #tkBox .tkChips .tbBtn { min-height: 32px; padding: 0 12px; border-radius: 8px; font-weight: 700; }
  /* Phone: the 44 px rule for these (max-width 560) loses to the #tkBox rules above on specificity, so restate it here. */
  @media (max-width: 560px) { #tkBox #tkBuySell button, #tkBox .tkChips .tbBtn { min-height: 44px; } }
  #tkBox #tkGo { min-height: 52px; border-radius: 12px; font-size: 16px; }
  .tkLinkLine { margin: 0; font-size: 12px; color: var(--pd-muted); }
  .tkLink { display: inline; padding: 0; border: 0; background: none; color: var(--pd-accent); font-weight: 800; font-size: 13px; line-height: 1.4; font-family: inherit; cursor: pointer; }
  .tkLink:hover { text-decoration: underline; }
  .tkLink::after { content: ' ›'; }
  #tkBox .prTkAcct { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  #tkBox .prTkAcct .prNoteBox { display: none; }
  #tkBox .prTkAcct .prGo { width: auto; min-height: 28px; padding: 0; border: 0; background: none; color: var(--pd-accent); font-size: 13px; font-weight: 800; text-align: left; }
  #tkBox .prTkAcct .prGo:hover { text-decoration: underline; }
  #tkBox .prTkAcct .prGo::after { content: ' ›'; }
  #tkBox > .prNoteBox { font-size: 12px; }
  .gsSide .gsChatPeek { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 14px 16px; border-radius: 16px; }
  .gsSide .gsChatPeek .gsChatHd { flex: 1 0 100%; }
  .gsChatN { font-size: 15px; }
  .gsChatSub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
  .gsSide .gsChatGo { min-height: 32px; padding: 0 14px; border-radius: 999px; background: var(--pd-raised); color: var(--pd-text); }
  @media (max-width: 900px) {
    #prDetail .gsHead h2.gsTitle { font-size: 26px; }
    #prDetail .gsHTeam .gsHMark { width: 64px; height: 64px; }
    #prDetail .gsHName { font-size: 15px; }
    #prDetail .gsBoard { border-radius: 0 0 12px 12px; }
    .gsMl { grid-template-columns: 36px minmax(0, 1fr) 132px; min-height: 64px; }
    .gsMl .gsMlMark { width: 36px; height: 36px; }
    .gsSide .gsChatPeek { order: 3; }
  }
  @media (max-width: 600px) {
    #predictions #prCats > button { min-width: 0; min-height: 44px; padding: 0 10px; font-size: 14px; }
    #predictions #prCats { margin: 0 0 6px; }
    #prDetail .gsHead h2.gsTitle { font-size: 22px; line-height: 1; }
    .gsMeta { font-size: 12px; }
    #prDetail .gsHTeam .gsHMark { width: 56px; height: 56px; }
    #prDetail .gsHMid b.gsHWhen { font-size: 16px; }
    .gsLPct { font-size: 24px; }
    #tkBox #tkAmount { font-size: 34px; }
  }
  @media (pointer: coarse) { #tkBox #tkAmount { font-size: 34px !important; } }
  .gsSide .tkBox { position: static; }
  #tkBox > .pmMsg:empty { display: none; }
  #tkBox .tkYN button.team.on { background: var(--team); border-color: var(--team); color: var(--team-fg, #fff); }
  #tkBox .tkYN button.team:not(.on):hover { color: var(--pd-text); border-color: var(--team); }
  #prDetail .gsHead { flex-wrap: nowrap; }
  #prDetail .gsHead > :not(.gsHeadT) { flex: none; }
  @media (max-width: 600px) {
    #prDetail .gsHead > :not(.gsHeadT) { min-height: 36px; padding: 0 12px; font-size: 13px; }
    #prDetail .gsHName { white-space: normal; text-align: center; line-height: 1.2; font-size: 14px; }
    .gsMain { gap: 10px; }
    #prDetail .gsHTeam .gsHMark { width: 48px; height: 48px; }
    #prDetail .gsHero { padding: 0; gap: 8px; }
    .gsMl { min-height: 56px; }
    .gsOutsHd { display: none; }
    #prDetail .gsOuts { padding: 2px 14px; }
    #prDetail .gsMl .gsOut { min-height: 48px; }
  }
  #prHome { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; margin-bottom: 20px; }
  .prHeroCard { padding: 20px 24px; border-radius: 16px; }
  .prHeroCard .prKick { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--pd-muted); }
  .prKick .prKickIco { width: 16px; height: 16px; color: var(--pd-accent); }
  .prHeroLive { color: var(--pd-live); font-weight: 800; }
  .prHeroTtl h3 { font-size: 26px; font-weight: 800; }
  .prHeroBody { align-items: start; gap: 24px; margin-top: 16px; }
  .prHeroRight { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .prHeroTeam { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 64px; border-bottom: 1px solid var(--pd-border); }
  .prHeroTeam .prHeroMark { width: 48px; height: 48px; }
  .prHeroTeamTxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .prHeroTeamTxt b { font-size: 16px; font-weight: 800; color: var(--pd-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .prHeroTeamTxt small { font-size: 12px; color: var(--pd-muted); }
  .prHeroScore { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .prHeroTeam .prHeroPx { display: flex; flex-direction: row; align-items: center; gap: 8px; min-width: 128px; min-height: 48px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--team); color: var(--team-fg, #fff); cursor: pointer; font-family: inherit; }
  .prHeroTeam .prHeroPx:hover { filter: brightness(1.1); }
  .prHeroTeam .prHeroPx .prPxL { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .prHeroTeam .prHeroPx .prPxV { margin: 0 auto 0 0; font-size: 20px; font-weight: 800; color: inherit; background: none; }
  .prHeroTeam .prHeroPx .prPxM { font-size: 13px; font-weight: 700; color: inherit; opacity: .85; }
  .prHeroGame .prHeroChart svg { max-height: 220px; }
  .prHeroChat { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: var(--pd-raised); }
  .prHeroChat[hidden] { display: none; }
  .prHeroChatHd { display: flex; align-items: center; gap: 8px; font-size: 13px; }
  .prHeroChatHd .prGlyph { width: 16px; height: 16px; color: var(--pd-accent); }
  .prHeroChatGo { margin-left: auto; padding: 0; border: 0; background: none; color: var(--pd-accent); font-weight: 800; font-size: 12px; line-height: 1; font-family: inherit; cursor: pointer; }
  .prHeroMsg { margin: 0; font-size: 13px; color: var(--pd-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .prHeroMsg b { color: var(--pd-text); }
  .prHeroNav { justify-content: flex-end; }
  #prPop { margin: 0 0 24px; }
  #prPop[hidden] { display: none; }
  .prPopHd { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
  .prPopHd h3 { margin: 0; font-size: 20px; font-weight: 800; }
  .prPopNav { display: flex; gap: 6px; }
  .prPopNav .tbBtn { min-width: 36px; min-height: 36px; border-radius: 50%; font-size: 18px; }
  .prPopRow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
  .prPopRow::-webkit-scrollbar { display: none; }
  .prPopRow > .prCard { scroll-snap-align: start; min-width: 0; }
  @media (min-width: 1200px) { .prPopRow { grid-auto-columns: calc((100% - 36px) / 4); } }
  .prHub { display: flex; flex-direction: column; gap: 10px; }
  .prHubCard { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1px solid var(--pd-border); border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--pd-accent) 12%, var(--pd-surface)), var(--pd-surface) 60%); color: var(--pd-text); font-family: inherit; text-align: left; cursor: pointer; }
  .prHubCard:hover { border-color: color-mix(in srgb, var(--pd-accent) 60%, var(--pd-border)); }
  .prHubCard .prHubIco { width: 48px; height: 48px; padding: 11px; border-radius: 14px; background: color-mix(in srgb, var(--pd-accent) 18%, transparent); color: var(--pd-accent); }
  .prHubCard .prHubIco.prArt, #spView .spHub .spHubIco.prArt { padding: 2px; background: none; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .4)); }
  .prHubTile .prHubIco.prArt { padding: 0; background: none; width: 32px; height: 32px; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .35)); }
  .spHub .spHubIco.prArt { padding: 1px; background: none; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .4)); }
  .prHubCard .prHubTxt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .prHubCard .prHubTxt small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pd-muted); }
  .prHubCard .prHubTxt b { font-size: 17px; font-weight: 800; }
  .prHubSub { font-size: 12px; color: var(--pd-text-2); }
  .prHubBar { display: block; height: 4px; border-radius: 2px; background: var(--pd-border); overflow: hidden; }
  .prHubBar i { display: block; height: 100%; background: var(--pd-accent); }
  @media (max-width: 900px) {
    #prHome { grid-template-columns: minmax(0, 1fr); }
    .prHeroCard { padding: 16px; }
    .prHeroTtl h3 { font-size: 20px; }
    .prHeroTeam { grid-template-columns: 40px minmax(0, 1fr) auto auto; min-height: 58px; }
    .prHeroTeam .prHeroMark { width: 40px; height: 40px; }
    .prHeroTeam .prHeroPx { min-width: 112px; }
    .prPopRow { grid-auto-columns: 82%; }
  }
  @media (max-width: 560px) { .prHeroGame .prHeroChart { display: block; } }
  @media (min-width: 1700px) { .prWrap { max-width: 1760px; } #prDetail { max-width: 1360px; margin-left: auto; margin-right: auto; } }
  #prMain { min-width: 0; display: flex; flex-direction: column; gap: 24px; }
  #prMain > #prPop { margin: 0; }
  @media (min-width: 901px) {
    #prMarkets.prHomeOn:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: repeat(16, auto) 1fr; column-gap: 20px; align-content: start; }
    #prMarkets.prHomeOn > * { grid-column: 1; }
    #prMarkets.prHomeOn > #prHome { display: contents; }
    #prMarkets.prHomeOn #prMain { grid-column: 1; margin-bottom: 24px; }
    #prMarkets.prHomeOn #prSide { grid-column: 2; grid-row: 1 / -1; align-self: start; }
    #prMarkets.prHomeOn #prPop .prPopRow { grid-auto-columns: calc((100% - 12px) / 2); }
    #prSide .cfRow { flex-direction: column; overflow: visible; padding: 0; }
    #prSide .cfCard { flex: none; width: 100%; }
    #prSide .cfRow > :nth-child(n+4) { display: none; }
    #prSide .cfStripHd small { display: none; }
  }
  @media (min-width: 901px) and (max-width: 1099px) { #prMarkets.prHomeOn .prHeroBody { grid-template-columns: minmax(0, 1fr); } #prMarkets.prHomeOn .prHeroChart { min-height: 0; } }
  @media (min-width: 1100px) {
    #prMarkets.prHomeOn:not([hidden]) { grid-template-columns: minmax(0, 1fr) 340px; column-gap: 24px; }
    #prMarkets.prHomeOn #prPop .prPopRow { grid-auto-columns: calc((100% - 24px) / 3); }
  }
  @media (min-width: 1700px) { #prMarkets.prHomeOn { grid-template-columns: minmax(0, 1fr) 400px; } #prMarkets.prHomeOn #prPop .prPopRow { grid-auto-columns: calc((100% - 36px) / 4); } }
  #spRail .cfStrip, #prSide .cfStrip { margin: 0; }
  #spRail .cfRow { flex-direction: column; overflow: visible; padding: 0; }
  #spRail .cfCard { flex: none; width: 100%; }
  #spRail .cfRow > :nth-child(n+4) { display: none; }
  #spRail .cfStripHd small { display: none; }
  #spRail { max-height: calc(100vh - 24px); overflow-y: auto; }
  @media (min-width: 1300px) {
    #prMarkets:not(.spMode) #spView:has(> #cfStrip) { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: repeat(15, auto) 1fr; column-gap: 24px; row-gap: 18px; align-content: start; }
    #prMarkets:not(.spMode) #spView:has(> #cfStrip) > * { grid-column: 1; }
    #prMarkets:not(.spMode) #spView:has(> #cfStrip) > #cfStrip { grid-column: 2; grid-row: 1 / -1; align-self: start; }
    #prMarkets:not(.spMode) #spView > #cfStrip .cfRow { flex-direction: column; overflow: visible; padding: 0; }
    #prMarkets:not(.spMode) #spView > #cfStrip .cfCard { flex: none; width: 100%; }
    #prMarkets:not(.spMode) #spView > #cfStrip .cfRow > :nth-child(n+4) { display: none; }
    #prMarkets:not(.spMode) #spView > #cfStrip .cfStripHd small { display: none; }
  }
  #prDetail .gsHead h2.gsTitle { font-size: 40px; font-weight: 800; line-height: 1.04; letter-spacing: .01em; text-transform: uppercase; }
  #prDetail .gsMeta { color: var(--pd-muted); font-size: 14px; }
  #gsWrap { max-width: 1244px; margin-inline: auto; grid-template-columns: minmax(0, 1fr) 350px; }
  #prDetail .gsWin { border: 0; background: none; box-shadow: none; padding-inline: 0; }
  #prDetail .gsOuts, #prDetail .gsMain > .prPanel.gsOutsBox { border: 0; background: none; padding-inline: 0; }
  #gsSide #tkOutcomeRow { display: none; }
  #gsSide .tkChips { justify-content: flex-end; }
  #gsSide .tkChips .tbBtn { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--pd-border); background: none; color: var(--pd-text); }
  #gsSide #cbEntry { order: -1; margin: 0; border-radius: 12px; min-height: 48px; background: transparent; border: 1px solid var(--pd-accent); color: var(--pd-text); font-weight: 800; }
  #gsSide #cbEntry:hover { background: var(--pd-raised); }
  .gsChatMsgs { display: flex; flex-direction: column; gap: 10px; flex: 1 0 100%; }
  .gsChatMsg { display: flex; flex-direction: column; gap: 1px; font-size: 14px; min-width: 0; }
  .gsChatMsg b { font-weight: 800; color: var(--pd-text); }
  .gsChatMsg span { color: var(--pd-text-2); overflow-wrap: anywhere; }
  .gsChatSay { flex: 1 0 100%; min-height: 40px; padding: 0 14px; border: 1px solid var(--pd-border); border-radius: 999px; background: var(--pd-raised); color: var(--pd-muted); font: 600 14px/1 inherit; font-family: inherit; text-align: left; cursor: pointer; }
  .gsChatSay:hover { color: var(--pd-text); }
  .gsChatSay[hidden] { display: none; }
  @media (min-width: 901px) { #gsPageTabs { display: none; } }
  @media (max-width: 900px) { .gsMain > .gsStrip { order: 2; } }
  @media (max-width: 600px) { #prDetail .gsHead h2.gsTitle { font-size: 22px; line-height: 1; } .gsStripHd, .gsStripGame { width: 140px; } }
  /* PRIVY guided setup (phone first) */
  #privyScreen.screen.overlay { z-index: 305; }
  #privyScreen .prvWrap { max-width: 720px; margin: 0 auto; padding: 0 16px 48px; box-sizing: border-box; }
  @media (max-width: 800px) { #privyScreen .prvWrap { padding-bottom: calc(110px + env(safe-area-inset-bottom)); } }
  #privyScreen .prvTop { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 10px 0; }
  #privyScreen .prvTop .ghost { width: auto; padding: 10px 14px; border-radius: 10px; font-size: 14px; min-height: 44px; }
  #privyScreen .prvBadge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--orange); border: 1px solid var(--orange); border-radius: 999px; padding: 3px 10px; }
  #privyScreen h1 { font-size: 26px; line-height: 1.2; margin: 10px 0 6px; }
  #privyScreen .prvLead { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0 0 14px; }
  #privyScreen .prvProg { display: flex; gap: 6px; margin: 0 0 16px; }
  #privyScreen .prvProg i { flex: 1; height: 6px; border-radius: 3px; background: var(--border); }
  #privyScreen .prvProg i.done { background: var(--bull); }
  #privyScreen .prvProg i.waiting { background: var(--orange); }
  #privyScreen .prvStep { background: var(--panel2); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin: 0 0 14px; }
  #privyScreen .prvStep[data-s="done"] { border-color: var(--bull); }
  #privyScreen .prvStep.now { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
  #privyScreen .prvHead { display: flex; align-items: center; gap: 12px; }
  #privyScreen .prvNo { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; background: var(--panel); border: 2px solid var(--border); color: var(--text); }
  #privyScreen .prvStep[data-s="done"] .prvNo { background: var(--bull); border-color: var(--bull); color: var(--onOrange); }
  #privyScreen .prvStep[data-s="waiting"] .prvNo { border-color: var(--orange); color: var(--orange); }
  #privyScreen .prvHead h2 { flex: 1; min-width: 0; font-size: 18px; margin: 0; line-height: 1.25; }
  #privyScreen .prvChip { flex: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
  #privyScreen .prvChip[data-s="waiting"] { color: var(--orange); border-color: var(--orange); }
  #privyScreen .prvChip[data-s="done"] { color: var(--bull); border-color: var(--bull); }
  #privyScreen .prvArt { margin: 14px 0 6px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); padding: 10px; }
  #privyScreen .prvArt svg { display: block; width: 100%; height: auto; max-height: 220px; }
  #privyScreen .prvBody { font-size: 15px; line-height: 1.55; }
  #privyScreen .prvBody p { margin: 10px 0; }
  #privyScreen .prvBody ol, #privyScreen .prvBody ul { margin: 8px 0; padding-left: 22px; }
  #privyScreen .prvBody li { margin: 6px 0; }
  #privyScreen .prvBody details { margin: 10px 0; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
  #privyScreen .prvBody summary { cursor: pointer; font-weight: 700; min-height: 28px; }
  #privyScreen .prvBody a { color: var(--orange); }
  #privyScreen .prvOk { color: var(--bull); font-weight: 700; }
  #privyScreen .prvWarn { color: var(--orange); }
  #privyScreen .prvErr { color: var(--bear); font-weight: 600; margin: 8px 0 0; }
  #privyScreen .prvErr:empty { display: none; }
  #privyScreen .prvGo { margin-top: 12px; min-height: 52px; font-size: 16px; }
  #privyScreen .prvAlt { all: unset; box-sizing: border-box; cursor: pointer; display: block; text-align: center; margin: 8px auto 0; padding: 12px; min-height: 44px; color: var(--muted); text-decoration: underline; font-size: 14px; }
  #privyScreen select { width: 100%; min-height: 48px; font-size: 16px; padding: 10px; border-radius: 10px; background: var(--panel); color: var(--text); border: 1px solid var(--border); }
  #privyScreen .prvLive { font-size: 11px; font-weight: 800; color: var(--bear); border: 1px solid var(--bear); border-radius: 6px; padding: 1px 6px; }
  #privyScreen .prvAbel { margin: 4px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px dashed var(--border); font-size: 15px; line-height: 1.5; }
  #privyScreen .prvAbel a { color: var(--orange); font-weight: 700; white-space: nowrap; }
  #prvPill { position: fixed; right: 16px; bottom: 76px; z-index: 290; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 0; background: var(--orange); color: var(--onOrange); font-weight: 800; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.35); cursor: pointer; }
  #prvPill[hidden] { display: none; }
  @media (max-width: 800px) { #prvPill { left: 16px; right: 16px; justify-content: center; bottom: calc(96px + env(safe-area-inset-bottom)); } }
  .prvAuth { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--orange); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; font-size: 14px; line-height: 1.45; }
  .prvAuth[hidden] { display: none; }
  .prvAuth b { display: block; font-size: 15px; margin-bottom: 2px; }
  /* Production review lane 3 (2026-11-14): Strategies, Options and Predictions read at AA in both themes. */
  #optTable .spotPill .pos, #optTable .spotPill .neg { color: var(--onOrange); }
  .optSideBar button.on[data-side=sell], #optDir button.on[data-dir=sell] { background: var(--bearSolid); border-color: var(--bearSolid); color: #fff; }
  @media (max-width: 768px) { #optTable.simple tr.legRow td.optPxCell a, #optTable.simple tr.legRow td.optPxCell .optAdd { color: var(--onOrange); } }
  :root[data-theme=light] .stChip.on { color: #065f46; }
  :root[data-theme=light] .prInvPill:not(.on) { color: var(--text); }
  :root[data-theme=light] .prNo { color: #a51d1d; }
  :root:not([data-theme=light]) .prNo { color: #ff8a80; }
  /* Production review lane 3: on a phone every Strategies, Options and Predictions control fits a thumb (44 px). */
  @media (max-width: 480px), (pointer: coarse) {
    .ctxHelp { width: 44px; height: 44px; min-width: 44px; }
    #stDetailBody summary, #stDetailBody select, #stDetailBody input:not([type=checkbox]):not([type=radio]), #stDetailBody .sbtn, #stDetailBody .linkBtn, #acctSel, #stList .sbtn, #stList summary,
    :is(#paCard, #oaCard) :is(summary, select, input:not([type=checkbox]):not([type=radio]), .sbtn) { min-height: 44px; }
    #stDetailBody input[type=checkbox]:not(.toggle) { width: 24px; height: 24px; margin: 10px; }
    body :is(#stDetailBody, #stList, #paCard, #oaCard) input.toggle { min-height: 44px; }
    #options .linkBtn, #options button, #options select, #optGear, #optClear, body #options #optTools .sbtn { min-height: 44px; }
    body #opTop #optGear { min-width: 44px; }
    #optTable .optAdd, #optTable.simple td.optPxCell .optAdd, body #optTable .optAdd { width: 44px; height: 44px; }
    #optTable td a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; }
    .prShare, #ppReset, body .prChartFt .prRange button, #prPopPrev, #prPopNext { min-height: 44px; min-width: 44px; }
  }
