/* YSBot member pages (/account/*) — dark glass, same tokens as home.css.
   Loaded only when a template defines {% block member_ui %} (layout/basic.phtml), so /manager, /guide,
   /terms, /privacy, /dashboard keep their Tailwind / SB Admin chrome. Every rule is scoped under body.mb. */
body.mb{--bg:#05060a;--card:rgba(255,255,255,.045);--line:rgba(255,255,255,.09);--t:#eef1f7;--m:#8a93a6;--a:#7c5cff;--b:#18e0c8;--up:#ff4d6a;--dn:#3d8bff;
  margin:0;min-height:100vh;background:var(--bg);color:var(--t);font-family:"Pretendard Variable",Pretendard,system-ui,sans-serif;-webkit-font-smoothing:antialiased;overflow-x:hidden;line-height:1.5}
body.mb *,body.mb *:before,body.mb *:after{box-sizing:border-box}
body.mb a{color:inherit;text-decoration:none}
body.mb .wrap{display:flex;flex-direction:column;min-height:100vh}
body.mb .w{max-width:1200px;margin:0 auto;padding-left:24px;padding-right:24px;width:100%}
body.mb .bgfx{position:fixed;inset:0;z-index:-1;background:radial-gradient(800px 500px at 15% -5%,rgba(124,92,255,.32),transparent 60%),radial-gradient(700px 500px at 90% 10%,rgba(24,224,200,.15),transparent 60%),var(--bg)}
body.mb .bgfx:after{content:"";position:absolute;inset:0;background-image:linear-gradient(var(--line) 1px,transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px);background-size:64px 64px;mask:radial-gradient(ellipse at 50% 0,#000 20%,transparent 70%);-webkit-mask:radial-gradient(ellipse at 50% 0,#000 20%,transparent 70%);opacity:.45}

/* header (same geometry as homepage nav: sticky 64px glass bar) */
body.mb .mnav{position:sticky;top:0;z-index:50;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);background:rgba(5,6,10,.6);border-bottom:1px solid var(--line)}
body.mb .mnav .bar{display:flex;align-items:center;height:64px;gap:28px}
body.mb .logo{flex-shrink:0;font-weight:800;font-size:20px;letter-spacing:-.02em;display:flex;gap:8px;align-items:center}
body.mb .logo img{height:28px;width:auto;display:block;border-radius:7px}
body.mb .tabs{display:flex;gap:6px;list-style:none;margin:0;padding:0;flex:1;font-size:14px;color:var(--m)}
body.mb .tabs a{display:block;padding:7px 12px;border-radius:99px;white-space:nowrap;transition:.2s}
body.mb .tabs a:hover{color:#fff}
body.mb .tabs a.on{color:#fff;background:rgba(124,92,255,.18);box-shadow:inset 0 0 0 1px rgba(124,92,255,.45)}
body.mb .navr{display:flex;align-items:center;gap:12px;margin-left:auto;min-width:0}
body.mb .navr .em{font-size:12.5px;color:var(--m);max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.mb .navr .lg{font-size:13px;color:var(--m);white-space:nowrap}
body.mb .navr .lg:hover{color:#fff}
body.mb .navr .lg.pri{color:var(--t);padding:6px 12px;border:1px solid var(--line);border-radius:99px;background:var(--card)}
body.mb .navr .lg.pri:hover{border-color:rgba(124,92,255,.5)}
/* mobile: account tabs drop to a second, horizontally scrollable row — always visible, no toggle/JS */
body.mb .tabs-m{display:none}
@media(max-width:900px){
  body.mb .w{padding-left:16px;padding-right:16px}
  body.mb .mnav .bar{gap:12px;height:56px}
  body.mb .mnav .bar .tabs{display:none}
  body.mb .navr .em{display:none}
  body.mb .navr{gap:8px}
  body.mb .navr .lg.pri{padding:5px 10px}
  body.mb .tabs-m{display:block;border-top:1px solid var(--line)}
  body.mb .tabs-m .tabs{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:8px 0;font-size:13px}
  body.mb .tabs-m .tabs::-webkit-scrollbar{display:none}
}

/* page */
body.mb main.page{flex:1;padding-top:44px;padding-bottom:70px}
body.mb .ph{display:flex;align-items:end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:22px}
body.mb .eyebrow{color:var(--b);font-size:13px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
body.mb .ph h1{font-size:clamp(26px,3.4vw,38px);letter-spacing:-.035em;font-weight:800;margin:6px 0 0;line-height:1.15}
body.mb .ph p{color:var(--m);margin:8px 0 0;font-size:14.5px}
@media(max-width:900px){body.mb main.page{padding-top:28px;padding-bottom:50px}}

body.mb .glass{background:linear-gradient(180deg,rgba(255,255,255,.065),rgba(255,255,255,.02));border:1px solid var(--line);border-radius:22px;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);position:relative;overflow:hidden}
body.mb .glass:before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;background:linear-gradient(140deg,rgba(255,255,255,.22),transparent 40%);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}

/* KPI tiles */
body.mb .kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin-bottom:14px}
body.mb .kpi{padding:20px 22px}
body.mb .kpi small{color:var(--m);font-size:13px}
body.mb .kpi .v{font-size:clamp(22px,2.6vw,30px);font-weight:800;letter-spacing:-.03em;margin-top:6px;font-variant-numeric:tabular-nums;word-break:break-all}
body.mb .kpi .v em{font-style:normal;font-size:.55em;color:var(--m);font-weight:600;margin-left:4px}

/* filter form */
body.mb .filters{padding:18px 20px;margin-bottom:14px}
body.mb .filters form{display:flex;flex-wrap:wrap;gap:14px;align-items:end}
body.mb .filters label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--m);min-width:0}
body.mb .filters label.grow{flex:1 1 260px}
body.mb .field,body.mb .filters select,body.mb .filters input{width:100%;min-width:0;background:rgba(255,255,255,.06);border:1px solid var(--line);color:#fff;border-radius:10px;padding:10px 12px;font:inherit;font-size:15px;color-scheme:dark;height:44px}
body.mb .filters select option{background:#111;color:#fff}
body.mb .field:focus,body.mb .filters select:focus,body.mb .filters input:focus{outline:none;border-color:rgba(124,92,255,.7);box-shadow:0 0 0 3px rgba(124,92,255,.2)}
@media(max-width:600px){body.mb .filters label{flex:1 1 100%}body.mb .filters .btn{width:100%;justify-content:center}}

body.mb .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:44px;padding:0 22px;border-radius:12px;font-weight:700;font-size:15px;transition:.25s;color:#fff;border:0;font-family:inherit;cursor:pointer}
body.mb .btn.p{background:linear-gradient(135deg,var(--a),#5b8cff);box-shadow:0 10px 40px -10px rgba(124,92,255,.8)}
body.mb .btn.p:hover{transform:translateY(-1px)}
body.mb .btn.g{border:1px solid var(--line);background:var(--card)}
body.mb .btn.g:hover{border-color:rgba(124,92,255,.5)}
body.mb .btn.blk{width:100%}

/* tables */
body.mb .tbl{overflow-x:auto}
body.mb table{width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}
body.mb th,body.mb td{padding:13px 14px;text-align:left;border-bottom:1px solid var(--line);white-space:nowrap}
body.mb th{color:var(--m);font-weight:500;font-size:12px;background:rgba(255,255,255,.02)}
body.mb tbody tr:last-child td{border-bottom:0}
body.mb tbody tr:hover td{background:rgba(255,255,255,.025)}
body.mb .r{text-align:right}
body.mb .c{text-align:center}
body.mb .mu{color:var(--m)}
body.mb .wrapc{white-space:normal;min-width:160px}
body.mb .up{color:var(--up)}
body.mb .dn{color:var(--dn)}
body.mb .tag{font-size:11px;padding:3px 8px;border-radius:6px;font-weight:700}
body.mb .tag.buy{background:rgba(255,77,106,.14);color:var(--up)}
body.mb .tag.sell{background:rgba(61,139,255,.14);color:var(--dn)}
@media(max-width:640px){body.mb .hm{display:none}body.mb th,body.mb td{padding:11px 10px;font-size:13px}}

/* empty state */
body.mb .empty{padding:44px 20px;text-align:center;color:var(--m);line-height:1.7;white-space:normal}
body.mb .empty b{color:#fff;display:block;font-size:17px;margin-bottom:4px}
body.mb .empty .btn{margin-top:16px;height:40px;font-size:14px}
body.mb tbody tr.none:hover td{background:none}

/* pagination */
body.mb .pager{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;margin-top:22px}
body.mb .pager a,body.mb .pager span{min-width:38px;height:38px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;font-size:13px;color:var(--m);border:1px solid var(--line);background:var(--card)}
body.mb .pager a:hover{color:#fff;border-color:rgba(124,92,255,.5)}
body.mb .pager .on{color:#fff;font-weight:700;background:linear-gradient(135deg,var(--a),#5b8cff);border-color:transparent}
body.mb .pager span.gap{border:0;background:none;min-width:auto;padding:0 2px}

/* notes / alerts */
body.mb .note{margin-top:14px;padding:14px 18px;border-radius:14px;border:1px solid var(--line);background:rgba(255,255,255,.03);color:#a8b0c2;font-size:13px;line-height:1.7}
body.mb .note a{color:#c9bcff;text-decoration:underline}
body.mb .msg{margin-bottom:16px;padding:12px 14px;border-radius:12px;font-size:14px}
body.mb .msg.err{background:rgba(255,77,106,.1);border:1px solid rgba(255,77,106,.4);color:#ffb3c0}
body.mb .msg.ok{background:rgba(24,224,200,.08);border:1px solid rgba(24,224,200,.35);color:var(--b)}

/* narrow card (password) */
body.mb .narrow{max-width:440px;margin:0 auto}
body.mb .card{padding:28px}
body.mb .card .fl{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--m);margin-bottom:16px}
body.mb .card .back{display:block;text-align:center;margin-top:16px;font-size:13px;color:var(--m)}
body.mb .card .back:hover{color:#fff}

/* footer */
body.mb footer.mf{border-top:1px solid var(--line);padding:32px 0;color:var(--m);font-size:12.5px;line-height:1.8}
body.mb footer.mf .cols{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
body.mb footer.mf p{margin:0}
body.mb footer.mf a:hover{color:#fff;text-decoration:underline}
body.mb footer.mf .links a{margin-right:14px}

/* theme toggle (icon-only, last item of .navr — stays in the top bar on mobile) */
body.mb .thm{width:36px;height:36px;flex-shrink:0;display:inline-grid;place-items:center;padding:0;border-radius:99px;border:1px solid var(--line);background:var(--card);color:var(--t);cursor:pointer;transition:border-color .2s}
body.mb .thm:hover{border-color:rgba(124,92,255,.5)}
body.mb .thm:focus-visible{outline:2px solid var(--b);outline-offset:2px}
body.mb .thm svg{display:block}
body.mb .thm .i-sun{display:none}
html[data-theme="light"] body.mb .thm .i-sun{display:block}
html[data-theme="light"] body.mb .thm .i-moon{display:none}
@media(max-width:900px){body.mb .thm{width:32px;height:32px}}
/* <=360px (320 devices): tighter header width budget so the theme toggle is never clipped — wordmark collapses (icon stays) */
@media(max-width:360px){body.mb .w{padding-left:12px;padding-right:12px}body.mb .mnav .bar{gap:8px}body.mb .navr{gap:6px}body.mb .logo{font-size:0;gap:0}body.mb .navr .lg.pri{padding:5px 9px}body.mb .thm{flex-shrink:0}}

/* light companion (html[data-theme=light]); dark = body.mb tokens above, unchanged */
html[data-theme="light"] body.mb{--bg:#f4f6fb;--card:rgba(255,255,255,.86);--line:rgba(88,72,190,.14);--t:#141826;--m:#596175;--b:#0a8072;--up:#d3203d;--dn:#1b64d6;color-scheme:light}
html[data-theme="light"] body.mb .bgfx{background:radial-gradient(800px 500px at 15% -5%,rgba(124,92,255,.16),transparent 60%),radial-gradient(700px 500px at 90% 10%,rgba(24,224,200,.12),transparent 60%),var(--bg)}
html[data-theme="light"] body.mb .bgfx:after{opacity:.35}
html[data-theme="light"] body.mb .mnav{background:rgba(244,246,251,.8)}
html[data-theme="light"] body.mb .tabs a:hover,html[data-theme="light"] body.mb .navr .lg:hover,html[data-theme="light"] body.mb .pager a:hover,html[data-theme="light"] body.mb .card .back:hover,html[data-theme="light"] body.mb footer.mf a:hover{color:var(--t)}
html[data-theme="light"] body.mb .tabs a.on{color:#4a2fc4;background:rgba(124,92,255,.1);box-shadow:inset 0 0 0 1px rgba(124,92,255,.35)}
html[data-theme="light"] body.mb .navr .lg.pri,html[data-theme="light"] body.mb .thm,html[data-theme="light"] body.mb .pager a,html[data-theme="light"] body.mb .pager span{background:#fff}
html[data-theme="light"] body.mb .pager .on{background:linear-gradient(135deg,var(--a),#5b8cff);color:#fff}
html[data-theme="light"] body.mb .pager span.gap{background:none}
html[data-theme="light"] body.mb .glass{background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.8));box-shadow:0 1px 2px rgba(30,24,80,.04),0 14px 34px -20px rgba(60,45,160,.25)}
html[data-theme="light"] body.mb .glass:before{background:linear-gradient(140deg,rgba(124,92,255,.2),transparent 40%)}
html[data-theme="light"] body.mb .field,html[data-theme="light"] body.mb .filters select,html[data-theme="light"] body.mb .filters input{background:#fff;color:var(--t);color-scheme:light}
html[data-theme="light"] body.mb .filters select option{background:#fff;color:var(--t)}
html[data-theme="light"] body.mb .btn.g{color:var(--t);background:#fff}
html[data-theme="light"] body.mb th{background:rgba(20,24,38,.025)}
html[data-theme="light"] body.mb tbody tr:hover td{background:rgba(124,92,255,.04)}
html[data-theme="light"] body.mb tbody tr.none:hover td{background:none}
html[data-theme="light"] body.mb .empty b{color:var(--t)}
html[data-theme="light"] body.mb .note{background:#fff;color:#454c60}
html[data-theme="light"] body.mb .note a{color:#5235d0}
html[data-theme="light"] body.mb .msg.err{background:rgba(211,32,61,.06);border-color:rgba(211,32,61,.35);color:#a8142c}
html[data-theme="light"] body.mb .msg.ok{background:rgba(10,128,114,.06);border-color:rgba(10,128,114,.3)}
/* 웹 백테스트 설정 작성기 (/account/backtests) */
body.mb .cmp-tools{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
body.mb .cmp-file{position:relative;overflow:hidden}
body.mb .cmp-file input{position:absolute;inset:0;opacity:0;cursor:pointer}
body.mb .cmp-help{margin:6px 0 0;font-size:12px;line-height:1.6;flex-basis:100%;white-space:pre-line;word-break:keep-all;overflow-wrap:break-word}
/* job-card [설정 파일 저장] import note (the run-card hint #cmp-json-note is a plain .cmp-help): full-row muted note (flex-basis 100%) so it is not squeezed into the 600px .filters .btn{width:100%} row */
body.mb .cmp-json-note{margin:6px 0 0;font-size:12px;line-height:1.6;flex-basis:100%;word-break:keep-all;overflow-wrap:break-word}
body.mb .cmp-job-detail > .cmp-json-note{margin:0}
body.mb .cmp-mode{font-size:13px;color:var(--m);margin:0 0 10px 4px}
body.mb .cmp-sec{padding:16px 18px;margin:0 0 14px;min-width:0}
body.mb .cmp-sec legend{font-weight:700;font-size:15px;padding:0 6px}
body.mb .cmp-sec>summary{font-weight:700;cursor:pointer}
body.mb .cmp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin-top:8px}
body.mb .cmp-f{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--m);min-width:0}
body.mb .cmp-f small{font-size:11px;line-height:1.5}
body.mb .cmp-f input[type=checkbox]{width:20px;height:20px;accent-color:#7c5cff}
body.mb .cmp-f [aria-invalid=true]{border-color:rgba(255,77,106,.8)}
body.mb .cmp-cap{color:#fff;font-weight:600;font-size:13px}
body.mb .cmp-cap .req{color:#ff8da1}
body.mb .cmp-wide{grid-column:1/-1}
body.mb .cmp-ta{height:auto;min-height:44px;resize:vertical;line-height:1.5}
body.mb .cmp-json{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;width:100%}
body.mb .cmp-sub{border-left:2px solid var(--line);padding-left:10px;min-width:0}
body.mb .cmp-sublabel{font-weight:700;font-size:13px;margin-bottom:4px}
body.mb .cmp-list{display:flex;flex-direction:column;gap:8px;margin-top:8px}
body.mb .cmp-item{border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:rgba(255,255,255,.02)}
body.mb .cmp-item>summary{cursor:pointer;font-weight:600}
body.mb .cmp-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:8px}
body.mb .cmp-between{justify-content:space-between;margin-top:0}
body.mb .btn.sm{height:34px;padding:0 12px;font-size:13px;border-radius:10px}
body.mb .cmp-errors{list-style:none;margin:0;padding:0;font-size:13px;line-height:1.6;max-height:260px;overflow:auto}
body.mb .cmp-errors .err{color:#ffb3c0}
body.mb .cmp-errors .warn{color:#ffd58a}
body.mb .cmp-errors .ok{color:var(--b)}
body.mb .cmp-pre{white-space:pre-wrap;margin-top:8px}
/* 내 웹 백테스트 작업 (t402u): every job is its own card — the member .glass box (same background/border/radius),
   .cmp-sec padding, 14px between cards, no row rules; inside, a vertical stack (title·status, request line,
   매수·매도 texts, wallet curve, actions). Nothing inside the card is another .glass box. */
body.mb .cmp-jobs-sec{margin-bottom:14px;min-width:0}
body.mb .cmp-jobs{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:14px}
body.mb .cmp-job{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:16px 18px;min-width:0;max-width:100%}
body.mb .cmp-job-title{font-weight:700;overflow-wrap:anywhere}
body.mb .cmp-job-meta{font-size:13px}
body.mb .cmp-job .cmp-wallet{flex:0 0 auto}
body.mb .cmp-job-acts{display:flex;flex-wrap:wrap;gap:8px;align-items:center;min-width:0}
body.mb .cmp-job-head{display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:100%;margin:0;padding:0;border:0;background:transparent;box-shadow:none;color:inherit;font:inherit;text-align:left;cursor:pointer;min-width:0;max-width:100%;border-radius:8px}
body.mb .cmp-job-head:focus-visible{outline:2px solid var(--b,#18e0c8);outline-offset:3px}
body.mb .cmp-job-twist{font-size:13px;font-weight:600;color:var(--m)}
body.mb .cmp-job-detail{display:flex;flex-direction:column;gap:10px;min-width:0;max-width:100%}
body.mb .cmp-job-detail[hidden]{display:none!important}
@media(max-width:400px){body.mb .cmp-job-head{gap:6px}body.mb .cmp-job-twist{font-size:12.5px}}
/* t400u: the member's own 매수·매도 texts, read-only, exactly as typed; a long one scrolls by itself (~12 lines) */
body.mb .cmp-cond{display:flex;flex-direction:column;gap:8px;min-width:0}
body.mb .cmp-cond-item{min-width:0}
body.mb .cmp-cond-label{font-size:12px;font-weight:700;color:var(--m);margin-bottom:4px}
body.mb .cmp-cond-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13.5px;line-height:1.6;max-height:calc(1.6em * 12);overflow-y:auto;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--card)}
@media(max-width:600px){body.mb .cmp-job{padding:14px}}
html[data-theme="light"] body.mb .cmp-cap{color:var(--t)}
html[data-theme="light"] body.mb .cmp-errors .err{color:#a8142c}
html[data-theme="light"] body.mb .cmp-errors .warn{color:#8a5a00}
html[data-theme="light"] body.mb .cmp-item{background:#fff}
body.mb .cmp-job .btn{height:34px;padding:0 12px;font-size:13px;border-radius:10px;border:1px solid var(--line)}
/* daily wallet curve inside a completed job card (docs/WEB-TASK-backtest-wallet-curve-ui-20261109.md): full card width,
   between the status line and the downloads; two stacked single-axis charts; never wider than the card */
body.mb .cmp-wallet{flex:1 1 100%;width:100%;min-width:0;max-width:100%;display:flex;flex-direction:column;gap:8px;margin:4px 0 2px}
body.mb .cmp-wallet .wc-note{margin:0;font-size:13px}
body.mb .cmp-wallet .wc-err{color:var(--t)}
body.mb .wc-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0}
body.mb .wc-stat{min-width:0;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--card)}
body.mb .wc-stat dt{font-size:12px;color:var(--m)}
body.mb .wc-stat dd{margin:2px 0 0;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.mb .wc-bar,body.mb .wc-toggles{display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-width:0}
body.mb .wc-seg{display:flex;flex-wrap:wrap;gap:4px}
body.mb .wc-btn,body.mb .wc-key{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;font:inherit;font-size:12.5px;color:var(--m);background:transparent;border:1px solid var(--line);border-radius:99px;cursor:pointer}
body.mb span.wc-key{cursor:default;color:var(--t)}
body.mb .wc-btn[aria-pressed="true"],body.mb button.wc-key[aria-pressed="true"]{color:var(--t);background:rgba(124,92,255,.16);border-color:rgba(124,92,255,.45)}
body.mb button.wc-key:disabled{cursor:not-allowed;opacity:.75}
body.mb .wc-sw{display:inline-block;width:14px;height:0;border-top:2px solid currentColor}
body.mb .wc-sw.dash{border-top-style:dashed}
body.mb .wc-sw.area{height:8px;border-top-width:2px}
/* t421u: one chart; (%) lines (right axis) are thin + dashed, their keys share the row and wrap */
body.mb .wc-sw.dash{border-top-width:1.5px}
body.mb .wc-key{max-width:100%;white-space:nowrap}
body.mb .wc-chart{position:relative;width:100%;min-width:0}
body.mb .wc-chart canvas{display:block;max-width:100%}
body.mb .wc-c1{height:220px}
body.mb .wc-tip{position:absolute;z-index:2;pointer-events:none;display:flex;flex-direction:column;gap:1px;padding:6px 9px;font-size:12px;line-height:1.45;white-space:nowrap;color:var(--t);background:rgba(10,12,20,.92);border:1px solid var(--line);border-radius:8px;font-variant-numeric:tabular-nums}
body.mb .wc-tip[hidden]{display:none}
html[data-theme="light"] body.mb .wc-tip{background:rgba(255,255,255,.96);box-shadow:0 4px 14px rgba(20,24,38,.12)}
@media(max-width:600px){body.mb .wc-stats{grid-template-columns:repeat(2,minmax(0,1fr))}body.mb .wc-c1{height:180px}body.mb .cmp-job .wc-btn,body.mb .cmp-job .wc-key{height:30px}}
/* t409u: 사용금액비율 (small chart) + 연도별 수익률 table, inside .cmp-wallet (no extra card); scroll stays inside the table box */
body.mb .wc-yearly{display:flex;flex-direction:column;gap:6px;min-width:0;max-width:100%}
body.mb .wc-yearly[hidden],body.mb .wc-uhead[hidden]{display:none}
body.mb .wc-uhead,body.mb .wc-yhead{margin:2px 0 0;font-size:12.5px;color:var(--m);font-variant-numeric:tabular-nums}
body.mb .wc-yhead{color:var(--t);font-weight:700;font-size:13px}
/* t540u: --ycell = the card tone made opaque (--card over --bg) for the sticky head / year column; thin themed scrollbar */
body.mb .wc-yscroll{max-height:344px;overflow:auto;min-width:0;max-width:100%;border:1px solid var(--line);border-radius:10px;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;--ycell:linear-gradient(var(--card),var(--card)) var(--bg);--ythumb:rgba(255,255,255,.18);--ythumb-h:rgba(255,255,255,.3);--yhover:rgba(255,255,255,.025);scrollbar-width:thin;scrollbar-color:var(--ythumb) transparent}
html[data-theme="light"] body.mb .wc-yscroll{--ythumb:rgba(88,72,190,.24);--ythumb-h:rgba(88,72,190,.4);--yhover:rgba(124,92,255,.04)}
body.mb .wc-yscroll::-webkit-scrollbar{width:6px;height:6px}
body.mb .wc-yscroll::-webkit-scrollbar-track,body.mb .wc-yscroll::-webkit-scrollbar-corner{background:transparent}
body.mb .wc-yscroll::-webkit-scrollbar-thumb{background:var(--ythumb);border-radius:99px}
body.mb .wc-yscroll::-webkit-scrollbar-thumb:hover{background:var(--ythumb-h)}
body.mb .wc-ytable{width:100%;border-collapse:separate;border-spacing:0;font-size:12.5px}
body.mb .wc-ytable th,body.mb .wc-ytable td{padding:6px 10px;text-align:right;white-space:nowrap;border-bottom:1px solid var(--line);line-height:1.45}
body.mb .wc-ytable thead th{position:sticky;top:0;z-index:2;background:var(--ycell);color:var(--m);font-weight:500;font-size:12px}
/* t540u nits: >600px pins 연도 (fixed 56px) + 기간 (left = 56px), divider on 기간; <=600px pins 연도 only (see media below) */
body.mb .wc-ytable tbody th{position:sticky;left:0;z-index:1;box-sizing:border-box;width:56px;min-width:56px;color:var(--t);font-weight:600;font-size:12.5px;background:var(--ycell)}
body.mb .wc-ytable thead th:first-child{left:0;z-index:4;box-sizing:border-box;width:56px;min-width:56px}
body.mb .wc-ytable td.wc-yper{position:sticky;left:56px;z-index:1;background:var(--ycell);box-shadow:inset -1px 0 var(--line)}
body.mb .wc-ytable thead th:nth-child(2){left:56px;z-index:3;box-shadow:inset -1px 0 var(--line)}
body.mb .wc-ytable tbody tr:hover td{background:var(--yhover)}
body.mb .wc-ytable tbody tr:hover th,body.mb .wc-ytable tbody tr:hover td.wc-yper{background:linear-gradient(var(--yhover),var(--yhover)),var(--ycell)}
body.mb .wc-ytable th:first-child,body.mb .wc-ytable thead th:nth-child(2),body.mb .wc-ytable .wc-yper{text-align:left}
body.mb .wc-ytable tbody tr:last-child th,body.mb .wc-ytable tbody tr:last-child td{border-bottom:0}
body.mb .wc-part{display:inline-block;margin-left:6px;padding:0 6px;border:1px solid var(--line);border-radius:99px;font-size:11px;line-height:1.5;color:var(--m)}
body.mb .wc-ytable th .wc-part-y{display:none;margin-left:4px;padding:0 5px;font-size:10.5px;font-weight:500}
@media(max-width:600px){body.mb .wc-ytable th,body.mb .wc-ytable td{padding:6px 8px}body.mb .wc-ytable tbody th,body.mb .wc-ytable thead th:first-child{width:auto;min-width:0;box-shadow:inset -1px 0 var(--line)}body.mb .wc-ytable td.wc-yper{position:static;background:none;box-shadow:none}body.mb .wc-ytable tbody tr:hover td.wc-yper{background:var(--yhover)}body.mb .wc-ytable thead th:nth-child(2){left:auto;z-index:2;box-shadow:none}body.mb .wc-ytable th .wc-part-y{display:inline-block}body.mb .wc-ytable .wc-yper .wc-part-p{display:none}}

body.mb .cmp-ai{display:flex;flex-direction:column;gap:10px;align-items:stretch;min-width:0}
body.mb .cmp-ai>*{min-width:0;max-width:100%;flex-shrink:0}
body.mb .cmp-ai label.cmp-ai-compose{flex:0 0 auto}
/* t464u G2: 「설정 방법 보기」 guide links (new tab) */
body.mb .cmp-guides{margin:6px 0 0;font-size:12px;line-height:1.6}
body.mb .cmp-guide{color:var(--b);text-decoration:underline;text-underline-offset:3px;font-weight:400;font-size:12px;white-space:nowrap}
/* t606u: composer 이용 안내 link — own full-width row inside the flex-wrap .cmp-tools, taller tap target */
body.mb .cmp-usage{flex-basis:100%;margin:2px 0 0}
body.mb .cmp-usage .cmp-guide{display:inline-block;padding:4px 0}
body.mb label .cmp-guide{margin-left:6px}
body.mb .cmp-ai-thread{display:flex;flex-direction:column;gap:10px;max-height:min(300px,38vh);overflow-y:auto;overflow-x:hidden;min-width:0;overscroll-behavior:contain;padding:2px;box-sizing:border-box}
body.mb .cmp-ai-thread:empty{display:none}
body.mb .cmp-ai-message{border:1px solid var(--line);border-radius:12px;padding:10px 12px;max-width:100%;min-width:0;box-sizing:border-box;flex:0 0 auto;overflow-wrap:anywhere;font-size:13px;line-height:1.6}
body.mb .cmp-ai-user{align-self:flex-end;background:rgba(124,92,255,.09)}
body.mb .cmp-ai-assistant{align-self:flex-start;background:rgba(255,255,255,.02)}
body.mb .cmp-ai-speaker{font-size:12px;color:var(--m)}
body.mb .cmp-ai .cmp-ta{display:block;width:100%;height:auto;min-height:76px;max-height:160px;margin-top:6px;box-sizing:border-box}
body.mb .cmp-ai-message .cmp-pre{margin-top:4px;min-width:0;overflow-wrap:anywhere}
body.mb .cmp-basics .cmp-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
body.mb .cmp-basics label{min-width:0}
body.mb .cmp-basics input,body.mb .cmp-basics select{box-sizing:border-box}
body.mb .cmp-basics-status{overflow-wrap:anywhere}
body.mb .cmp-hint{display:block;margin-top:4px;font-size:12px;line-height:1.4;overflow-wrap:anywhere;min-height:0}
body.mb .cmp-hint:empty{display:none}
body.mb .cmp-hint-err{color:#ffb3c0;font-weight:600}
html[data-theme="light"] body.mb .cmp-hint-err{color:#a8142c}
@media(max-width:600px){body.mb .cmp-ai{padding:14px 12px}body.mb .cmp-ai-message{padding:9px 10px}body.mb .cmp-grid{grid-template-columns:minmax(0,1fr)}}
body.mb .cmp-ai>.btn{align-self:flex-start}
html[data-theme="light"] body.mb .cmp-ai-assistant{background:#fff}

body.mb .cmp-ai-prose p{margin:4px 0 0;min-width:0;overflow-wrap:anywhere}
body.mb .cmp-ai-prose p b{margin-right:2px}
body.mb .cmp-confirm{display:flex;flex-direction:column;gap:4px;min-width:0}
body.mb .cmp-confirm[hidden]{display:none}
body.mb .filters label.cmp-confirm-check{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;font-size:14px;color:var(--t);text-align:left;cursor:pointer;flex:0 0 auto}
body.mb .filters .cmp-confirm-check input{width:20px;min-width:20px;height:20px;padding:0;margin:0;flex:0 0 auto;accent-color:#7c5cff}
body.mb .cmp-expert{margin-top:8px;min-width:0}
body.mb .cmp-expert>summary{cursor:pointer;color:var(--m);padding:8px 2px;font-size:13px}

/* 대상 종목 picker: full-width block, finger-sized buttons/rows/× (44px), results scroll within the screen height */
body.mb .cmp-targets{grid-column:1/-1;display:flex;flex-direction:column;gap:8px;min-width:0}
body.mb .filters .cmp-targets-label{display:block;flex:none;font-size:12px;color:var(--m)}
body.mb .cmp-targets-example{font-size:12px;line-height:1.4}
body.mb .cmp-universe{display:flex;flex-wrap:wrap;gap:8px}
body.mb .cmp-uni{min-height:44px;padding:0 16px;border-radius:99px;border:1px solid var(--line);background:var(--card);color:var(--t);font:inherit;font-size:14px;cursor:pointer;touch-action:manipulation}
body.mb .cmp-uni[aria-pressed="true"]{border-color:rgba(124,92,255,.75);background:rgba(124,92,255,.18)}
body.mb .cmp-target-results{width:100%;box-sizing:border-box;max-height:min(420px,60vh);max-height:min(420px,60dvh);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.03)}
body.mb .cmp-target-results[hidden]{display:none}
body.mb .cmp-target-title{margin:0;padding:10px 14px;font-size:13px;color:var(--t);border-bottom:1px solid var(--line)}
body.mb .cmp-target-list{list-style:none;margin:0;padding:0}
body.mb .cmp-target-row{display:flex;width:100%;min-height:48px;align-items:center;gap:8px;padding:10px 14px;box-sizing:border-box;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--t);font:inherit;font-size:15px;text-align:left;cursor:pointer;overflow-wrap:anywhere;touch-action:manipulation}
body.mb .cmp-target-list li:last-child .cmp-target-row{border-bottom:0}
body.mb .cmp-target-row:hover,body.mb .cmp-target-row:focus{background:rgba(124,92,255,.12);outline:none}
body.mb .cmp-chips{display:flex;flex-wrap:wrap;gap:8px;list-style:none;margin:0;padding:0}
body.mb .cmp-chips:empty{display:none}
body.mb .cmp-chip{display:inline-flex;align-items:center;max-width:100%;min-height:40px;padding-left:14px;border-radius:99px;border:1px solid rgba(124,92,255,.45);background:rgba(124,92,255,.12);color:var(--t);font-size:14px;box-sizing:border-box}
body.mb .cmp-chip-text{overflow-wrap:anywhere}
body.mb .cmp-chip-x{min-width:44px;min-height:44px;margin:-2px 0;padding:0;border:0;background:transparent;color:var(--t);font:inherit;font-size:20px;line-height:1;cursor:pointer;touch-action:manipulation}
html[data-theme="light"] body.mb .cmp-target-results{background:#fff}

/* t463u 리밸런싱: 매매 방식 toggle + 비중 표 (docs/PLAN-rebalancing-ux-t463u.md §1·§3); ≤600px = stacked rows, no h-scroll */
body.mb .cmp-modes{grid-column:1/-1;display:flex;flex-direction:column;gap:8px;min-width:0}
body.mb .cmp-mode-btns{display:flex;flex-wrap:wrap;gap:8px}
body.mb .cmp-uni[aria-checked="true"]{border-color:rgba(124,92,255,.75);background:rgba(124,92,255,.18)}
body.mb .cmp-rebal{display:flex;flex-direction:column;gap:10px;min-width:0;margin:0 0 14px}
body.mb .cmp-rebal[hidden],body.mb [data-rebal-hidden]{display:none!important}
body.mb .cmp-rebal-ai{display:flex;flex-direction:column;gap:6px;min-width:0}
body.mb .cmp-rebal-ai .cmp-ta{display:block;width:100%;min-height:60px;max-height:160px;margin-top:6px;box-sizing:border-box}
body.mb .cmp-rebal-band{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center}
body.mb .filters .cmp-rebal-band>label:first-child{display:flex;flex-direction:row;align-items:center;gap:6px;flex:0 0 auto;font-size:14px;color:var(--t)}
body.mb .cmp-rebal-band small{flex-basis:100%;font-size:12px}
body.mb .cmp-rebal input.cmp-rb-in{width:84px;min-width:0;height:40px;text-align:right;box-sizing:border-box}
body.mb .filters .cmp-rebal-band input{width:84px;height:40px;text-align:right}
body.mb .cmp-rebal-table{width:100%;border-collapse:collapse;font-size:14px}
body.mb .cmp-rebal-table th{text-align:left;font-size:12px;font-weight:600;color:var(--m)}
body.mb .cmp-rebal-table td,body.mb .cmp-rebal-table th{padding:6px 8px;vertical-align:middle}
body.mb .cmp-rebal-table .cmp-rb-unit{margin-left:4px;font-size:12px;color:var(--m)}
body.mb .cmp-rebal-table tr.cmp-rb-cash td{border-top:1px solid var(--line);font-weight:600}
body.mb .cmp-rebal-table [aria-invalid=true]{border-color:rgba(255,77,106,.8)}
body.mb .cmp-rebal-table .cmp-rb-err{display:block;font-size:11px;color:#ffb3c0;margin-top:2px}
html[data-theme="light"] body.mb .cmp-rebal-table .cmp-rb-err{color:#a8142c}
body.mb .cmp-rebal:not(.perrow) .cmp-rb-band{display:none}
body.mb .cmp-rebal.perrow .cmp-rebal-band>label:first-child{display:none}
body.mb .cmp-rebal-sum{font-weight:700}
body.mb .cmp-rebal-sum.under,body.mb .cmp-rebal-sum.over{color:#ffd58a}
html[data-theme="light"] body.mb .cmp-rebal-sum.under,html[data-theme="light"] body.mb .cmp-rebal-sum.over{color:#9a5b00}
body.mb .cmp-rebal-summary:empty,body.mb .cmp-rebal-sum:empty{display:none}
body.mb .cmp-badge{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:99px;font-size:12px;font-weight:600;border:1px solid rgba(124,92,255,.6);background:rgba(124,92,255,.14);vertical-align:1px}
body.mb .cmp-rtable{width:auto;max-width:100%;border-collapse:collapse;font-size:13px}
body.mb .cmp-rtable th,body.mb .cmp-rtable td{padding:4px 10px 4px 0;text-align:left;font-weight:400}
body.mb .cmp-rtable thead th{font-size:12px;color:var(--m)}
body.mb .cmp-rtable tr.cmp-rb-cash td{border-top:1px solid var(--line)}
/* t488u: 「종목별로 다르게」 — site-style switch (avoids huge .filters input checkbox chrome) */
body.mb .cmp-rebal-band .cmp-rebal-switch{
  display:inline-flex;align-items:center;gap:10px;flex:0 0 auto;width:auto;max-width:100%;
  min-height:32px;padding:4px 10px 4px 6px;margin:0;border-radius:99px;
  border:1px solid var(--line);background:var(--card);color:var(--t);
  font:inherit;font-size:13px;line-height:1.2;cursor:pointer;box-sizing:border-box
}
/* track */
body.mb .cmp-rebal-band .cmp-rebal-switch::before{
  content:"";width:34px;height:20px;border-radius:99px;flex:0 0 auto;
  border:1px solid var(--line);background:rgba(255,255,255,.08);box-sizing:border-box;
  box-shadow:inset 10px 0 0 0 #c9cdd8;transition:box-shadow .15s ease, background .15s ease, border-color .15s ease
}
body.mb .cmp-rebal-band .cmp-rebal-switch[aria-checked="true"]{
  border-color:rgba(124,92,255,.55);background:rgba(124,92,255,.12)
}
body.mb .cmp-rebal-band .cmp-rebal-switch[aria-checked="true"]::before{
  border-color:rgba(124,92,255,.8);background:rgba(124,92,255,.35);
  box-shadow:inset -10px 0 0 0 #7c5cff
}
html[data-theme="light"] body.mb .cmp-rebal-band .cmp-rebal-switch::before{
  background:#eef0f5;box-shadow:inset 10px 0 0 0 #fff
}
html[data-theme="light"] body.mb .cmp-rebal-band .cmp-rebal-switch[aria-checked="true"]::before{
  background:rgba(124,92,255,.25);box-shadow:inset -10px 0 0 0 #7c5cff
}

/* ≤600px: one card per symbol; title row + 3-col 목표/아래/위 grid (no h-scroll, no leftover table lines) */
@media(max-width:600px){
  body.mb .cmp-rebal-table thead{display:none}
  body.mb .cmp-rebal-table,body.mb .cmp-rebal-table tbody{display:block;width:100%}
  body.mb .cmp-rebal-table tr{
    display:grid;grid-template-columns:1fr 1fr 1fr;column-gap:8px;row-gap:8px;
    align-items:start;padding:12px 0;margin:0;border:0;border-bottom:1px solid var(--line);background:transparent
  }
  body.mb .cmp-rebal-table tr.cmp-rb-cash td{border-top:0}
  body.mb .cmp-rebal-table td{padding:0;border:0;min-width:0;background:transparent}
  body.mb .cmp-rebal-table td.cmp-rb-name{
    grid-column:1 / span 2;grid-row:1;min-width:0;overflow-wrap:anywhere;
    font-size:14px;font-weight:600;color:var(--t);line-height:1.35;text-decoration:none;border:0
  }
  body.mb .cmp-rebal-table td.cmp-rb-x{
    grid-column:3;grid-row:1;justify-self:end;align-self:start;margin:0;border:0
  }
  body.mb .cmp-rebal-table td.cmp-rb-x .btn,body.mb .cmp-rebal-table td.cmp-rb-x button{
    min-width:36px;min-height:36px
  }
  body.mb .cmp-rebal-table tr.cmp-rb-cash td.cmp-rb-x{
    visibility:hidden; /* keep grid; no em-dash leftover */
  }
  body.mb .cmp-rebal-table td.cmp-rb-w{grid-column:1;grid-row:2}
  body.mb .cmp-rebal-table td.cmp-rb-down{grid-column:2;grid-row:2}
  body.mb .cmp-rebal-table td.cmp-rb-up{grid-column:3;grid-row:2}
  body.mb .cmp-rebal:not(.perrow) .cmp-rebal-table td.cmp-rb-w{grid-column:1 / span 3}
  body.mb .cmp-rebal-table td[data-label]{
    display:flex;flex-direction:column;align-items:stretch;gap:4px
  }
  body.mb .cmp-rebal-table td[data-label]:before{
    content:attr(data-label);margin:0;font-size:12px;font-weight:600;color:var(--m);line-height:1.2
  }
  body.mb .cmp-rebal-table .cmp-rb-unit{margin-left:0;font-size:11px}
  body.mb .cmp-rebal input.cmp-rb-in,
  body.mb .filters .cmp-rebal-table input.cmp-rb-in{
    width:100%;max-width:100%;min-width:0;height:40px;box-sizing:border-box;text-align:right
  }
  body.mb .cmp-rebal-table .cmp-rb-err{min-height:0}
  body.mb .cmp-rebal{overflow-x:hidden}
}
/* tqqq.app 미리 채우기 배너 (docs/plans/tqqq-prefill-ux.md §4) */
body.mb .cmp-prefill{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;margin:0 0 12px;padding:12px 14px;border-radius:12px;border:1px solid rgba(124,92,255,.45);background:rgba(124,92,255,.1);font-size:14px;line-height:1.6;word-break:keep-all;overflow-wrap:break-word}
body.mb .cmp-prefill[hidden]{display:none}
body.mb .cmp-prefill p{margin:0}
body.mb .cmp-prefill .cmp-prefill-note{color:#ffd58a}
body.mb .cmp-prefill a{color:inherit;text-decoration:underline}
/* t554u: text takes the remaining width; on a narrow banner (< ~15em of text room) 지우기 wraps under the text instead of squeezing it */
body.mb .cmp-prefill{flex-wrap:wrap;row-gap:8px}
body.mb .cmp-prefill .cmp-prefill-text{flex:1 1 15em;min-width:0}
/* t554u: the banner sits inside section.filters, so beat `@media(max-width:600px){.filters .btn{width:100%}}` (+ field sizing): 지우기 stays a small button */
body.mb .filters .cmp-prefill .btn,body.mb .cmp-prefill .btn{flex:0 0 auto;width:auto;min-width:0;max-width:none;height:auto;min-height:0;padding:6px 12px;font-size:13px;line-height:1.4;white-space:nowrap;align-self:flex-start;margin-left:auto}
html[data-theme="light"] body.mb .cmp-prefill{background:rgba(82,53,208,.06);border-color:rgba(82,53,208,.3)}
html[data-theme="light"] body.mb .cmp-prefill .cmp-prefill-note{color:#9a5b00}

/* U1 dividend options (t538u checkbox row; t539u no on-card monthly table) */
body.mb .cmp-dividend{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;margin-top:10px;min-width:0}
body.mb .cmp-div-check{display:inline-flex;align-items:center;gap:6px;margin:0;font-weight:600;color:var(--t);font-size:14px}
body.mb .cmp-div-check input{width:16px;height:16px;margin:0;accent-color:var(--b,#18e0c8);flex-shrink:0}
body.mb .cmp-div-check input:disabled{opacity:.45}
body.mb .cmp-div-hint{flex:1 1 100%}
body.mb .cmp-badge-div{margin-left:6px}
body.mb .wc-divsum,body.mb .wc-divnote{margin:4px 0 2px;font-size:13px;color:var(--t);line-height:1.45}
body.mb .wc-divnote{color:var(--m);font-size:12.5px}
/* t538u: beat `.filters label{flex-direction:column}` + `.filters input` field styles */
body.mb .filters .cmp-dividend{flex-direction:row;justify-content:flex-start;align-items:center}
body.mb .filters label.cmp-div-check{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:0 0 auto;width:auto;min-width:0;margin:0;text-align:left;cursor:pointer;font-weight:600;color:var(--t);font-size:14px}
body.mb .filters .cmp-div-check input[type=checkbox]{width:18px;min-width:18px;max-width:18px;height:18px;min-height:18px;padding:0;margin:0;border:0;border-radius:4px;background:transparent;box-shadow:none;flex:0 0 18px;accent-color:var(--b,#18e0c8);color:inherit;color-scheme:inherit}
body.mb .filters .cmp-div-check input[type=checkbox]:focus,body.mb .filters .cmp-div-check input[type=checkbox]:focus-visible{outline:2px solid var(--b,#18e0c8);outline-offset:2px;border:0;box-shadow:none}
html[data-theme="light"] body.mb .filters .cmp-div-check input[type=checkbox]{background:transparent;color:inherit;border:0;box-shadow:none}
body.mb .filters .cmp-div-hint{flex:1 1 100%}
@media(max-width:400px){
  body.mb .cmp-dividend,body.mb .filters .cmp-dividend{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:8px}
  body.mb .cmp-div-check,body.mb .filters label.cmp-div-check{font-size:13.5px;flex-direction:row;align-items:center;justify-content:flex-start;align-self:flex-start;flex:0 0 auto}
}
/* t526u 결과 공유 (S1): 「공유 중」 header badge (teal, visible while the card is collapsed) + the [공유] panel under the action row */
body.mb .cmp-badge-share{margin-left:6px;border-color:rgba(24,224,200,.6);background:rgba(24,224,200,.12)}
body.mb .cmp-share{display:flex;flex-direction:column;gap:8px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.02);min-width:0}
body.mb .cmp-share-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;min-width:0}
body.mb .cmp-share .cmp-share-url{flex:1 1 240px;width:auto;height:34px;padding:6px 10px;font-size:13px}
body.mb .cmp-share-note{margin:0;font-size:12.5px;line-height:1.6}
body.mb .cmp-share-status{font-size:12.5px}
/* D1 「설정 공개」 switch + 이름·메모 preview */
body.mb .cmp-share-setting{cursor:pointer;font-size:13.5px;font-weight:700}
body.mb .cmp-share-setting input{width:16px;height:16px;margin:0}
body.mb .cmp-share-review{display:flex;flex-direction:column;gap:4px;min-width:0}
body.mb .cmp-share-free{margin:0;padding-left:18px;font-size:12.5px;line-height:1.6;overflow-wrap:anywhere}
body.mb .cmp-share-warn{color:var(--warn,#f0a020)}
/* G1a 「갤러리에 게시」 switch + in-panel confirm (consent box; never window.confirm) */
body.mb .cmp-share-gallery{display:flex;flex-direction:column;gap:6px;min-width:0}
body.mb .cmp-share-confirm{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;min-width:0}
body.mb .cmp-share-consent{cursor:pointer;font-size:13px;line-height:1.5}
body.mb .cmp-share-consent input{width:16px;height:16px;margin:0;flex:0 0 auto}
html[data-theme="light"] body.mb .cmp-badge-share{border-color:rgba(10,128,114,.5);background:rgba(10,128,114,.08)}
html[data-theme="light"] body.mb .cmp-share{background:#fff}
/* t540u 백테스트 두 개 비교 C1: card checkbox (outside the head button), sticky picker bar, compare header + metrics table */
body.mb #web-backtest[hidden],body.mb #web-backtest-jobs[hidden],body.mb .cmpx[hidden],body.mb .cmpx-bar[hidden],body.mb .cmpx-block[hidden]{display:none!important}
body.mb .cmp-job-top{display:flex;align-items:flex-start;gap:12px;min-width:0}
body.mb .cmp-job-top > .cmp-job-head{flex:1 1 auto}
body.mb .cmp-pick{flex:0 0 18px;width:18px;height:18px;margin-top:3px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;position:relative}
body.mb .cmp-pick input[type=checkbox]{-webkit-appearance:none;appearance:none;width:18px;height:18px;min-width:18px;margin:0;padding:0;border:1px solid var(--line);border-radius:5px;background:var(--card);display:grid;place-content:center;cursor:pointer}
body.mb .cmp-pick input[type=checkbox]:checked{border-color:var(--a);background:var(--a)}
body.mb .cmp-pick input[type=checkbox]:checked:after{content:"";width:5px;height:9px;margin-top:-2px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
body.mb .cmp-pick input[type=checkbox]:focus-visible{outline:2px solid var(--b,#18e0c8);outline-offset:2px}
body.mb .cmp-pick-off{opacity:.4;cursor:not-allowed}
body.mb .cmp-pick-off input[type=checkbox]{cursor:not-allowed;pointer-events:none}
/* t540u C1 nits: the queued/running placeholder is not a control (no pointer); a tap on the dimmed box reaches the label (hint in the bar) */
body.mb .cmp-pick.cmp-pick-empty{cursor:default}
body.mb .cmpx-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
body.mb .cmpx-bar{position:sticky;bottom:12px;z-index:5;margin-top:14px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;padding:10px 14px;border:1px solid var(--line);border-radius:14px;background:linear-gradient(180deg,rgba(255,255,255,.065),rgba(255,255,255,.02)),rgba(5,6,10,.88);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);font-size:14px;font-variant-numeric:tabular-nums}
body.mb .cmpx-bar-text{min-width:0;overflow-wrap:anywhere}
body.mb .cmpx-bar-warn{font-weight:700}
body.mb .cmpx-bar-acts{display:flex;gap:8px;flex-wrap:wrap}
body.mb .cmpx{display:flex;flex-direction:column;align-items:stretch;gap:14px;margin-bottom:14px;min-width:0}
body.mb .cmpx-back{align-self:flex-start}
body.mb .cmpx-msg{margin-top:0}
body.mb .cmpx-msg p{margin:0 0 10px}
body.mb .cmpx-card{display:flex;flex-direction:column;gap:14px;padding:18px 20px;min-width:0}
body.mb .cmpx-a{--cmpx:#9b85ff}
body.mb .cmpx-b{--cmpx:var(--b)}
body.mb .cmpx-head{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px 18px;min-width:0}
body.mb .cmpx-side{border-left:4px solid var(--cmpx);padding-left:12px;min-width:0;display:flex;flex-direction:column;gap:4px}
body.mb .cmpx-title{font-weight:700;overflow-wrap:anywhere}
body.mb .cmpx-tag{display:inline-block;margin-right:6px;font-weight:800;color:var(--cmpx,var(--t))}
body.mb .cmpx-meta{font-size:13px}
body.mb .cmpx-note{margin:0;font-size:13px}
body.mb .cmpx-scroll{overflow-x:auto;min-width:0}
body.mb .cmpx-table th,body.mb .cmpx-table td{padding:10px 12px;vertical-align:top}
body.mb .cmpx-table td{font-variant-numeric:tabular-nums}
body.mb .cmpx-table tbody th{color:var(--t);font-weight:600;font-size:13.5px;background:transparent}
body.mb .cmpx-table tbody tr:last-child th{border-bottom:0}
body.mb .cmpx-col{white-space:nowrap}
body.mb .cmpx-dot{display:inline-block;width:8px;height:8px;border-radius:99px;margin-right:6px;background:var(--cmpx);vertical-align:1px}
body.mb .cmpx-colname{display:inline-block;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
body.mb .cmpx-sub,body.mb .cmpx-win{display:block;margin-top:2px;font-size:11.5px;font-weight:400;color:var(--m)}
body.mb .cmpx-win{color:var(--t);font-weight:600}
body.mb .cmpx-diff{color:var(--t)}
body.mb .cmpx-acts{display:flex;flex-wrap:wrap;gap:8px}
body.mb .cmpx-blocks{display:flex;flex-direction:column;gap:12px;min-width:0}
body.mb .cmpx-block-head{margin:0 0 6px;font-size:12.5px;font-weight:700;color:var(--m)}
/* t540u C2: overlay chart card above the metrics table (reuses .wc-bar/.wc-seg/.wc-btn/.wc-key/.wc-chart/.wc-tip) */
body.mb .cmpx-ctl{gap:6px 10px}
body.mb .cmpx-fx{font-size:12.5px}
body.mb .cmpx-fx[hidden],body.mb .cmpx-cnotes[hidden]{display:none}
body.mb .cmpx-cnotes{display:flex;flex-direction:column;gap:4px}
body.mb .cmpx-key .wc-sw{color:var(--cmpx)}
body.mb .cmpx-c1{height:260px}
body.mb .cmpx-c2{height:120px}
body.mb .cmpx-ddhead{margin:0;font-size:12px;color:var(--m)}
body.mb .cmpx-tip-sub{font-size:11px;color:var(--m)}
html[data-theme="light"] body.mb .cmpx-a{--cmpx:#6a4cf0}
html[data-theme="light"] body.mb .cmpx-bar{background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.86)),var(--bg);box-shadow:0 1px 2px rgba(30,24,80,.04),0 14px 34px -20px rgba(60,45,160,.25)}
/* t540u C3: 연도별 비교 card — reuses .wc-yearly/.wc-yscroll/.wc-ytable (thin scrollbar, 344px, sticky header + year);
   .cmpx-ytable has no 기간 column, so only the year column is pinned (the card's 2nd sticky column is switched off) */
body.mb .cmpx-ytable tbody th,body.mb .cmpx-ytable thead th:first-child{width:auto;min-width:0;box-shadow:inset -1px 0 var(--line)}
body.mb .cmpx-ytable thead th:nth-child(2){left:auto;z-index:2;box-shadow:none;text-align:right}
body.mb .cmpx-ytable th .wc-part-y{display:inline-block}
body.mb .cmpx-ytable thead th .cmpx-dot{margin-right:5px}
body.mb .cmpx-ytable td.cmpx-ydiff{color:var(--t)}body.mb .cmpx-ytable td.cmpx-ydiff.mu{color:var(--m)}
body.mb .cmpx-ytable td.cmpx-big{font-weight:700}
/* t540u C3: mobile-only labels (legend title, 「2개 선택됨」, 「해제」) are hidden on desktop; the legend is a toggle */
body.mb .cmpx-key-name,body.mb .cmpx-bar-count,body.mb .cmpx-bar-short{display:none}
/* t540u C3: compare view + list bar at <=600px (plan §5); desktop layout unchanged */
@media(max-width:600px){
body.mb .cmpx-head{grid-template-columns:minmax(0,1fr)}
body.mb .cmpx-card{padding:14px}
body.mb .cmpx-c1{height:220px}
body.mb .cmpx-c2{height:90px}
body.mb .cmpx .wc-btn,body.mb .cmpx .wc-key{height:30px}
body.mb .cmpx-keys{flex-wrap:nowrap;overflow:hidden}
body.mb .cmpx-key{flex:0 1 auto;min-width:0}
body.mb .cmpx-key .cmpx-key-eq{display:none}
body.mb .cmpx-key .cmpx-key-name{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis}
body.mb .cmpx-key .wc-sw{width:8px;height:8px;border:0;border-radius:99px;background:var(--cmpx)}
body.mb .cmpx-scroll{overflow:visible}
body.mb .cmpx-table,body.mb .cmpx-table tbody,body.mb .cmpx-table tr{display:block;width:100%}
body.mb .cmpx-table thead{display:none}
body.mb .cmpx-table tr{padding:10px 0;border-bottom:1px solid var(--line)}
body.mb .cmpx-table tbody tr:last-child{border-bottom:0}
body.mb .cmpx-table th,body.mb .cmpx-table td{padding:0;border:0;white-space:normal}
body.mb .cmpx-table tbody th{display:block;margin-bottom:3px}
body.mb .cmpx-table tbody th .cmpx-sub{display:inline;margin-left:6px}
body.mb .cmpx-table td.cmpx-val{display:inline;font-size:14px}
body.mb .cmpx-table td.cmpx-val::before{content:attr(data-tag) " ";font-weight:800;color:var(--m)}
body.mb .cmpx-table td.cmpx-val[data-tag="B"]::before{content:" · B "}
body.mb .cmpx-table td.cmpx-diff{display:block;margin-top:3px;font-size:12px;color:var(--m)}
body.mb .cmpx-table td.cmpx-diff:not(.cmpx-diff-blank)::before{content:"차이 "}
body.mb .cmpx-table .cmpx-diff .cmpx-sub,body.mb .cmpx-table .cmpx-diff .cmpx-win{display:inline;margin:0;font-size:12px;font-weight:400;color:var(--m)}
body.mb .cmpx-table .cmpx-diff:not(.cmpx-diff-blank) .cmpx-sub::before,body.mb .cmpx-table .cmpx-diff .cmpx-win::before{content:" · "}
body.mb .cmpx-bar{position:fixed;left:0;right:0;bottom:0;z-index:40;margin:0;min-height:56px;max-height:calc(64px + env(safe-area-inset-bottom));flex-wrap:nowrap;padding:8px 12px calc(8px + env(safe-area-inset-bottom));border-width:1px 0 0;border-radius:0}
body.mb .cmpx-bar-text{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.mb .cmpx-bar-text.cmpx-bar-warn{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;font-size:13px;line-height:1.35;max-height:2.7em}
body.mb .cmpx-bar-acts{flex:0 0 auto;flex-wrap:nowrap}
body.mb .cmpx-bar-titles,body.mb .cmpx-bar-long{display:none}
body.mb .cmpx-bar-count,body.mb .cmpx-bar-short{display:inline}
body.mb.cmpx-baron{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
}
