[hidden]{display:none!important}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}button:not(.btn){font:inherit}p{margin:4px 0}h2{font-size:15px;margin:10px 0 0}main{min-width:0}.om-state{border:0;cursor:pointer}.om-state.open{background:#16352B;color:#5DCAA5;box-shadow:inset 0 0 0 1px rgba(93,202,165,.35),0 0 10px rgba(93,202,165,.12)}.om-state.bad{background:#3B1C1C;color:#F09595;box-shadow:inset 0 0 0 1px rgba(240,149,149,.4),0 0 10px rgba(240,149,149,.14)}nav .om-sound{background:transparent;border:0;padding:0}.om-sound svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2}.om-nav a[aria-current=page]{color:var(--gold);background:var(--goldbg);font-weight:600;box-shadow:inset 0 0 0 1px rgba(242,184,75,.28),0 0 12px rgba(242,184,75,.1)}.om-connection{color:var(--muted);font-size:11px}.tabs{margin-left:0;overflow:visible}.tabs a{height:auto;padding:7px 2px;border-radius:0}.tabs button{border:0;background:transparent;padding:7px 2px;color:var(--muted)}.tabs .on{color:var(--gold);box-shadow:inset 0 -2px var(--gold)}.actions>div{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap}.actions .btn{padding:0 8px}.bar .r{align-items:center}.topbar,.community-filters{margin-top:10px}.community-filters input{flex:1;min-width:140px}.community-filters select{max-width:170px}.checkline{display:flex;align-items:center;gap:8px}.checkline input{width:auto}.curve{width:100%;height:190px;display:block}.curve polyline{fill:none;stroke:var(--gold);stroke-width:2}.chart svg{height:100%;margin:0}.chart{overflow:hidden}.empty{color:var(--muted)}.params{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:8px}.params label{display:grid;color:var(--muted);font-size:11px}.params input{width:100%}.rule-preview:empty{display:none}.wide{grid-column:1/-1}dialog{background:var(--panel);border:1px solid var(--line2);border-radius:6px;color:var(--fg);padding:12px;width:600px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto}dialog::backdrop{background:#0009}.modal-actions{justify-content:flex-end;margin-top:8px}#notice,#modalError{color:var(--up)}.login{max-width:440px;margin:24px auto}.login form{display:grid;gap:8px}.om-visitor{font-size:11px;color:var(--muted)}.trade-table{table-layout:fixed}
.report-trades{min-width:0}.report-trades.scrolling{max-height:396px;overflow-y:auto;overscroll-behavior:contain}
.report-trades .table{margin-top:0}.trade-table th{position:sticky;top:0;background:var(--panel);z-index:1}
.trade-table th,.trade-table td{padding:8px 4px;white-space:nowrap;overflow-wrap:normal}
.trade-table th:nth-child(1){width:5%}.trade-table th:nth-child(2){width:10%}
.trade-table th:nth-child(3),.trade-table th:nth-child(5){width:17%}
.trade-table th:nth-child(4),.trade-table th:nth-child(6){width:9%}
.trade-table th:nth-child(7),.trade-table th:nth-child(8){width:8%}
.trade-table th:nth-child(9){width:17%}

@media(max-width:1000px){.trade-date{display:none}}
@media(max-width:760px){.params{grid-template-columns:repeat(2,minmax(0,1fr))}.actions>div{gap:4px}.actions .btn{padding:0 4px}.om-nav .ico{display:none}.t td{overflow-wrap:anywhere}.trade-table thead{display:none}.trade-table tbody{display:block}.trade-table tr{display:grid}.trade-table td{display:block;border:0;width:auto!important}.trade-table td::before{display:none}
 .report-trades.scrolling{max-height:480px}
 .trade-table tr{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:18px 18px;gap:1px 4px;padding:5px 0;line-height:18px}
 .trade-table td{white-space:nowrap;overflow:visible;overflow-wrap:normal;line-height:18px}
 .trade-table td::before{display:none}.trade-table td:nth-child(1){grid-column:1;grid-row:2}
 .trade-table td:nth-child(2){grid-column:1;grid-row:1;font-weight:600}
 .trade-table td:nth-child(3){grid-column:2;grid-row:1;font-size:11px;color:var(--muted)}
 .trade-table td:nth-child(4){grid-column:2;grid-row:2;text-align:left}
 .trade-table td:nth-child(5){grid-column:3;grid-row:1;font-size:11px;color:var(--muted)}
 .trade-table td:nth-child(6){grid-column:3;grid-row:2;text-align:left}
 .trade-table td:nth-child(7){display:none}.trade-table td:nth-child(8){grid-column:4;grid-row:2}
 .trade-table td:nth-child(9){grid-column:4;grid-row:1}
}




.detail-grid{margin-top:6px}.detail-grid p{margin:4px 0}.bar details{margin:0}.bar details>summary{padding:0 8px}.params label{gap:2px}.params input{font-size:13px}.form label>label{margin-top:2px}.rule-preview{margin-top:8px}
/* Keep prototype geometry; enlarge hit targets without resizing visible controls. */
@media(max-width:760px){a,button,summary{position:relative}a::after,button::after,summary::after{content:"";position:absolute;width:max(100%,44px);height:max(100%,36px);left:50%;top:50%;transform:translate(-50%,-50%)}.om-state::after{min-height:36px}.form label:first-child{grid-column:auto}.actions>div{justify-content:flex-end}.actions .btn{min-width:44px}.detail-grid{gap:6px}.tabs a{min-width:44px}.params label:first-child{grid-column:auto}}

@media(max-width:760px){.table .actions .btn:not(:first-child){display:none}}

/* REL10R2: explicit control baseline, prototype control heights stay unchanged. */
.control-row{align-items:end}.form-action{display:grid;align-self:end;min-width:0}.choice-field{display:grid;gap:2px;min-width:0}.control-row>.form-action>.btn{height:30px;min-height:30px}
.strategy-status{white-space:nowrap!important;overflow-wrap:normal!important;width:80px;min-width:80px}
@media(max-width:760px){.control-row>.form-action>.btn{height:36px;min-height:36px}body[data-page="mine"] .table{table-layout:fixed}body[data-page="mine"] .table .strategy-status{width:64px;min-width:64px}body[data-page="mine"] .table .numeric{width:82px}body[data-page="mine"] .table .actions{width:56px}body[data-page="mine"] .table .name{min-width:0}body[data-page="mine"] .table .name a{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}

/* REL11: mobile option text wraps in both selection and expanded list. */
/* REL11R1: transparent brand hit area; preserve the 49 x 22 visible tag. */
@media(max-width:760px){body[data-page="login"] #omStateTag::after{content:"";width:max(100%,44px);height:max(100%,36px)}}
.readable-choice{display:none}
/* REL11R3: reserve room for full strategy names without changing control styling. */
body[data-page="backtest"] .control-row{grid-template-columns:minmax(272px,1.8fr) minmax(188px,1fr) repeat(2,minmax(0,1fr))}
body[data-page="backtest"] .control-row>label{min-width:0}
@media(max-width:760px){body[data-page="backtest"] .control-row{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-page="backtest"] .control-row>.choice-field:first-child{grid-column:1/-1}}
@media(max-width:760px){.native-choice{display:none}.readable-choice{display:block;position:relative;margin:0;min-width:0;color:var(--fg)}.readable-choice>summary{min-height:36px;line-height:18px;padding:8px 24px 8px 10px;background:rgba(15,19,24,.6);border:1px solid var(--line2);border-radius:6px;color:var(--fg);font-size:13px;white-space:normal;overflow-wrap:anywhere;list-style:none}.readable-choice>summary::after{content:'▾';position:absolute;right:8px;top:8px;width:auto;height:auto;left:auto;transform:none}.choice-options{position:absolute;z-index:100;left:0;right:0;max-height:50vh;overflow-y:auto;background:var(--panel);border:1px solid var(--line2);border-radius:6px}.choice-options>.btn{display:block;width:100%;height:auto;min-height:36px;white-space:normal;overflow-wrap:anywhere;text-align:left;padding:8px 10px;border:0;border-radius:0;color:var(--fg);font-size:13px}.choice-options>[aria-selected=true]{color:var(--gold);background:var(--goldbg)}.choice-options>.btn::after{display:none}}

/* P2-LAUNCH: only the new ledger and invitation controls; locked pages unchanged. */
body[data-page="trades"] .ledger-table{table-layout:fixed}
body[data-page="trades"] .ledger-table .numeric{text-align:right;font-variant-numeric:tabular-nums}
.trade-datetime{display:flex;align-items:flex-end;gap:4px;min-width:0;position:relative}
.trade-datetime>label{flex:1;min-width:0;display:grid;color:var(--muted);font-size:11px}
.trade-datetime input{width:100%;min-width:0;font-variant-numeric:tabular-nums}
.trade-picker{position:static;margin:0;flex-shrink:0}
.trade-picker>summary{min-width:44px;height:30px;display:flex;align-items:center;justify-content:center;color:var(--gold);border:1px solid var(--line2);border-radius:6px;cursor:pointer;list-style:none;font-size:12px}
.trade-date-parts{position:absolute;top:100%;left:0;right:0;z-index:20;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:8px;background:var(--panel);border:1px solid var(--line2);border-radius:6px}
.trade-date-parts label{display:grid;min-width:0;font-size:11px;color:var(--muted)}
.trade-date-parts .btn{align-self:end;min-width:44px;min-height:36px;height:auto;white-space:normal}
body[data-page="trades"] .ledger-table th:nth-child(1){width:5%}
body[data-page="trades"] .ledger-table th:nth-child(2){width:13%}
body[data-page="trades"] .ledger-table th:nth-child(3),body[data-page="trades"] .ledger-table th:nth-child(5){width:13%}
body[data-page="trades"] .ledger-table th:nth-child(4),body[data-page="trades"] .ledger-table th:nth-child(6){width:8%}
body[data-page="trades"] .ledger-table th:nth-child(7),body[data-page="trades"] .ledger-table th:nth-child(8){width:6%}
body[data-page="trades"] .ledger-table th:nth-child(9){width:10%}
body[data-page="trades"] .ledger-table th:nth-child(10){width:18%}
body[data-page="trades"] .ledger-table td{white-space:normal;overflow-wrap:anywhere}
body[data-page="trades"] .ledger-table .bar{justify-content:flex-end;gap:4px}
body[data-page="settings"] section>div>input[readonly]{max-width:100%;box-sizing:border-box}
@media(min-width:761px) and (max-width:1000px){body[data-page="trades"] .control-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
 .trade-picker>summary{height:36px}
 body[data-page="trades"] .trade-datetime{grid-column:1/-1}
 body[data-page="trades"] .ledger-table tr{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;gap:4px 10px;min-width:0;padding:8px 0;border-bottom:1px solid var(--line)}
 body[data-page="trades"] .ledger-table td{display:flex;justify-content:space-between;align-items:baseline;gap:4px;padding:0;min-width:0;grid-column:auto;grid-row:auto;font-size:12px;line-height:20px;white-space:normal;text-align:right}
 body[data-page="trades"] .ledger-table td::before{display:block;content:attr(data-label);color:var(--muted);font-size:11px;white-space:nowrap;text-align:left}
 body[data-page="trades"] .ledger-table .trade-date{display:inline}
 body[data-page="trades"] .ledger-table td:nth-child(10){grid-column:1/-1;justify-content:flex-end}
 body[data-page="trades"] .ledger-table td:nth-child(10)::before{display:none}
 body[data-page="trades"] .ledger-table td:nth-child(10) .btn{height:36px;min-height:36px}
 body[data-page="trades"] .control-row{grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-page="trades"] .control-row>.bar{align-self:end;min-height:36px}
 body[data-page="settings"] .t{table-layout:fixed}
 body[data-page="settings"] .t th{white-space:normal}
}

/* R2: real control hit areas; pseudo-elements must never intercept siblings. */
.password-reminder{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;margin-bottom:8px;background:var(--goldbg);color:var(--gold);border-left:2px solid var(--gold)}
.password-reminder .btn{flex-shrink:0}
.invitations{margin-top:8px;min-width:0}.invitations>.bar{min-height:36px}.invitations .btn{height:36px;min-height:36px}
.invitation-output{display:flex;align-items:stretch;gap:8px;margin-top:8px;max-width:440px}.invitation-output:empty{display:none}
.invitation-output textarea{flex:1;min-width:0;width:0;min-height:36px;height:36px;resize:none;padding:7px 8px;font:13px/20px ui-monospace,Menlo,monospace;overflow-wrap:anywhere;white-space:pre-wrap}
.invitation-output .btn{flex-shrink:0}.invitations>p{margin-top:6px}
@media(max-width:760px){
 .om-nav{flex-wrap:wrap;justify-content:flex-start;overflow:visible;gap:2px 0}.om-nav a{flex:none}
 body[data-page="settings"] .control-row .btn{min-width:44px;min-height:36px}
 .invitation-table thead{display:none}.invitation-table tbody{display:block}
 .invitation-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 8px;padding:8px 0;border-bottom:1px solid var(--line)}
 .invitation-table td{display:block;min-width:0;border:0;padding:0!important;overflow-wrap:anywhere}
 .invitation-table td::before{content:attr(data-label);display:block;color:var(--muted);font-size:11px}
 .invitation-table td:last-child{grid-column:2;justify-self:end}.invitation-table td:last-child::before{display:none}
}
