/* ============================================================================
   m-app.css — the phone app (below 992px), round 2 (2026-09-30).

   Phones run the DESKTOP v2 layer (app.html sets ODETTE_V2 everywhere and
   html.m-on below 992px). The v2 stylesheets' desktop blocks now match every
   width, so every tile, button, table and number on a phone is the desktop's
   own element in the desktop's own style. This file only LAYS THEM OUT for a
   phone: fixed regions (header, competition line, page, tab bar), the trade
   page as one column (assets, question, chart + ONE day's ladder, positions),
   the ticket as a bottom sheet, the news + chat rail as its own tab.

   Everything is scoped to html.m-on, set in the head only below 992px, so
   desktop never matches a rule here. Loaded with media="(max-width: 991.98px)",
   the head script's own bound (below 992px).
   ========================================================================== */
@media (max-width: 991.98px) {

html.m-on {
    --m-safe-t: env(safe-area-inset-top, 0px);
    --m-safe-b: env(safe-area-inset-bottom, 0px);
    --m-safe-l: env(safe-area-inset-left, 0px);
    --m-safe-r: env(safe-area-inset-right, 0px);
    --m-head: 52px;
    --m-comp: 30px;
    --m-tabs-h: 56px;
    --m-top: calc(var(--m-safe-t) + var(--m-head) + var(--m-comp));
    --m-bot: calc(var(--m-tabs-h) + var(--m-safe-b));
}
html.m-on, html.m-on body { height: 100%; overflow: hidden !important; overscroll-behavior: none; }
html.m-on body { -webkit-tap-highlight-color: transparent; }
/* an app has no scrollbars (iOS / Android parity) */
html.m-on * { scrollbar-width: none; }
html.m-on *::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ---- the desktop's lg utilities hold on the phone app ------------------
   The v2 markup marks its desktop parts d-none d-lg-* and the pre-v2 phone
   parts d-lg-none; the phone app is v2, so it takes the lg side. */
html.m-on .d-lg-none { display: none !important; }
html.m-on .d-none.d-lg-inline-flex, html.m-on .d-lg-inline-flex { display: inline-flex !important; }
html.m-on .d-none.d-lg-flex, html.m-on .d-lg-flex { display: flex !important; }
html.m-on .d-none.d-lg-block, html.m-on .d-lg-block { display: block !important; }
html.m-on .d-none.d-lg-inline-block, html.m-on .d-lg-inline-block { display: inline-block !important; }
html.m-on .d-lg-inline-flex[hidden], html.m-on .d-lg-flex[hidden], html.m-on .d-lg-block[hidden] { display: none !important; }

/* ---- fixed regions -------------------------------------------------- */
html.m-on body.v2 .app-container { height: 100%; min-height: 0 !important; padding: 0 !important; }
html.m-on body.v2 .app-container > header {
    position: fixed !important; top: 0; left: 0; right: 0; z-index: 1020;
    height: calc(var(--m-safe-t) + var(--m-head)); padding-top: var(--m-safe-t) !important;
}
html.m-on body.v2 .app-container > header .navbar { height: var(--m-head); padding: 0 !important; }
html.m-on body.v2 .app-container > header .container-fluid { height: 100%; padding: 0 16px !important; flex-wrap: nowrap !important; gap: 8px; }
/* the pages live on the tab bar */
html.m-on body.v2 .app-container > header .navbar-nav.me-auto { display: none !important; }
/* the collapse holds only the page links (the tab bar's job on a phone);
   the bell, balance and wallet are .hdr-tools, its sibling */
html.m-on body.v2 .app-container > header .navbar-collapse { display: none !important; }
html.m-on body.v2 .app-container > header .navbar-brand { margin: 0 !important; flex: none; }
html.m-on body.v2 .app-container > header .hdr-tools { margin-left: auto !important; flex: 0 1 auto; gap: 6px !important; min-width: 0; }
/* the desktop's loading face is a desktop-shaped skeleton; the phone waits
   on the chart row's own veil instead */
html.m-on #v2-boot { display: none !important; }
html.m-on body.v2 .app-container > header .navbar-toggler { display: none !important; }

/* the controls fit 390px and 360px (design A, 2026-10-27: Disconnect was cut
   off at the right edge). Each is a 36px chip; Disconnect shows its icon only
   (its word stays its accessible name), and the address gives way first, so
   no control leaves the screen */
html.m-on body.v2 .app-container > header :is(.wallet-section, #wallet-status, .connected-details) { min-width: 0; }
html.m-on body.v2 .app-container > header .wallet-section { flex: 0 1 auto; }
html.m-on body.v2 .app-container > header #nav-alert-btn { flex: none; width: 36px; height: 36px; }
html.m-on body.v2 .app-container > header #v2-balance-chip { flex: none; height: 36px; padding: 0 10px; }
html.m-on body.v2 .app-container > header #v2-connect-btn { height: 36px !important; }
html.m-on body.v2 .app-container > header .header-wallet-pill { flex: 0 1 auto; min-width: 0; gap: 6px; height: 36px !important; padding: 0 10px !important; }
html.m-on body.v2 .app-container > header .header-wallet-pill .address-display { min-width: 0; margin-right: 0; overflow: hidden; text-overflow: ellipsis; }
html.m-on body.v2 .app-container > header .header-wallet-pill :is(.connection-dot, .header-wallet-chevron) { flex: none; }
html.m-on body.v2 .app-container > header #wallet-help-icon { flex: none; width: 36px; height: 36px; margin-left: 6px; padding: 0 !important; justify-content: center; }
html.m-on body.v2 .app-container > header #disconnect-wallet-btn.wallet-cta {
    flex: none; width: 36px !important; height: 36px !important; padding: 0 !important; margin-left: 6px !important;
    font-size: 0 !important; line-height: 0 !important;
    background: var(--v2-chip, #232C42) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23E86A62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='m16 17 5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E") center / 16px 16px no-repeat !important;
}

html.m-on body.v2 #v2-banner {
    position: fixed !important; top: calc(var(--m-safe-t) + var(--m-head)); left: 0; right: 0; z-index: 1019;
    height: var(--m-comp) !important; margin: 0 !important;
}
html.m-on body.v2 #v2-comp-line { height: var(--m-comp) !important; padding: 0 16px !important; gap: 10px !important; overflow: hidden; white-space: nowrap; }
html.m-on body.v2 #v2-comp-line > * { flex: none; }
/* revamp.css hid the line below 992px for the pre-v2 phone UI */
html.m-on body.v2 #v2-comp-line { display: flex !important; align-items: center; }
/* 390px holds the title, the pool and your rank; the rules sentence is the
   scoreboard's, and the tab bar is the way there */
html.m-on body.v2 #v2-comp-line .v2-comp-tag,
html.m-on body.v2 #v2-comp-line .v2-comp-cta { display: none !important; }
/* the line leads with the weekly pool (slide 9: no title); the rank closes it */
html.m-on body.v2 #v2-comp-line .v2-comp-first { margin-left: 0 !important; }
html.m-on body.v2 #v2-comp-line .v2-comp-first + .v2-comp-item { margin-left: auto !important; }

/* every page takes the space between the bands and the tab bar */
html.m-on body.v2 .content-section {
    position: fixed !important; top: var(--m-top) !important; bottom: var(--m-bot) !important; left: 0 !important; right: 0 !important;
    margin: 0 !important; padding: 0 !important; width: auto !important; max-width: none !important; min-height: 0 !important;
    overflow-x: hidden !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch;
}
html.m-on body.v2 .app-container > main,
html.m-on body.v2 .app-container .main-layout { display: contents !important; }

/* the desktop's status bar (network, maker liquidity, latency, public beta)
   lives at the foot of the Trollbox tab: the trade page needs the height */
html.m-on body.v2 .status-bar { display: none !important; }
html.m-on.m-chat body.v2 .status-bar {
    display: flex !important; position: fixed !important; left: 0; right: 0; bottom: var(--m-bot); top: auto !important; z-index: 1026;
    height: 30px; overflow-x: auto; overflow-y: hidden; white-space: nowrap; flex-wrap: nowrap !important;
}
/* the pre-v2 phone's floating beta badge: the status bar's "Public beta" is the way in */
html.m-on body.v2 .beta-badge-container { display: none !important; }

/* ---- the tab bar (m-app.js) ---------------------------------------- */
html.m-on #m-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    box-sizing: border-box;
    height: auto; padding: 0 0 var(--m-safe-b);
    /* 56px with the 1px top border, plus the home-indicator inset: equal to --m-bot. */
    grid-template-rows: calc(var(--m-tabs-h) - 1px);
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--bg-primary, #0B0F19); border-top: 1px solid var(--v2-hair, rgba(255, 255, 255, .06));
}
html.m-on #m-tabs button {
    border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font: 500 11px/1 var(--sans, Inter, sans-serif); color: var(--text-muted, #7E8A9C); touch-action: manipulation;
}
html.m-on #m-tabs button svg { width: 21px; height: 21px; }
html.m-on #m-tabs button[aria-current="page"] { color: var(--text-primary, #F5F7FA); font-weight: 600; }

/* ---- the wallet dialog (web3-onboard) --------------------------------
   onboard's dialogs sit at z-index 10, so the tab bar cut off the bottom of
   the wallet list. They go over every phone band and sheet (m-app.js centres
   the card inside onboard's shadow root). */
html.m-on { --onboard-modal-z-index: 1060; }

/* ---- the wallet popover ("Pick a way in"; the wallet menu once connected)
   app.css made it a full-width sheet under the header, but since phones run
   v2, revamp.css's desktop width (300px) wins and the card hung off the top
   left. On the phone it is a centred card over a dimmed page. The dim is the
   header's own ::before, in the header's stacking context just under the
   card; while the card is open the header rises over the tab bar and the
   ticket. A tap on the dim lands outside .hdr-tools, so ui_interactions.js's
   outside click closes the card, and the tap never reaches the page. */
html.m-on body.v2 #wallet-pop {
    top: 50% !important; left: 50% !important; right: auto !important; bottom: auto !important;
    width: min(360px, calc(100vw - 32px)) !important;
    max-height: calc(100% - var(--m-safe-t) - var(--m-safe-b) - 32px) !important;
    transform: translate(-50%, -50%) scale(.96);
    transform-origin: center;
}
html.m-on body.v2 #wallet-pop.is-open { transform: translate(-50%, -50%); }
html.m-on body.v2:has(#wallet-pop.is-open) .app-container > header { z-index: 1050 !important; }
html.m-on body.v2:has(#wallet-pop.is-open) .app-container > header::before {
    content: ''; position: fixed; inset: 0; z-index: 1079; background: rgba(4, 6, 11, .6);
}

/* ====================================================================
   TRADE — one column: assets, the question + views, the chart with ONE
   day's ladder, the positions strip. The desktop's wrappers are flattened.
   ==================================================================== */
/* showSection writes an inline display:block: the page is a flex column over it
   (the hidden state, an inline display:none, wins below) */
html.m-on body.v2 #trade-section { overflow: hidden !important; display: flex !important; flex-direction: column !important; }
html.m-on body.v2 #trade-section[style*="display: none"] { display: none !important; }
html.m-on body.v2 #trade-section > .container,
html.m-on body.v2 #trade-section > .container > .row,
html.m-on body.v2 #trade-section > .container > .row > .col-12,
html.m-on body.v2 #trade-section .professional-asset-header,
html.m-on body.v2 #trade-section .asset-selector-wrapper { display: contents !important; }
html.m-on body.v2 .trade-unified-layout {
    display: flex !important; flex-direction: column; flex: 1 1 0 !important; min-height: 0 !important; height: auto !important;
    border-top: 0 !important;
}
html.m-on body.v2 #v2-col1 { flex: 1 1 auto; min-height: 0; border-right: 0 !important; display: flex !important; flex-direction: column; }
html.m-on body.v2 #v2-col1 > .asset-sidebar { flex: none; padding: 0 !important; height: auto !important; border: 0 !important; }
html.m-on body.v2 #asset-selection-container {
    flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden; padding: 8px 16px !important; width: auto !important;
    scroll-snap-type: x proximity;
    /* the app scrolls the chosen chip into view: keep the 16px gutter when it does */
    scroll-padding-inline: 16px;
}
html.m-on body.v2 #asset-selection-container .asset-selection-btn { flex: none; scroll-snap-align: start; }
html.m-on body.v2 #v2-col1 .trade-panel-main,
html.m-on body.v2 #v2-col1 .trade-panel-main-inner,
html.m-on body.v2 #v2-col1 .trade-content,
html.m-on body.v2 #basic-view-container { flex: 1 1 auto !important; min-height: 0 !important; height: auto !important; display: flex !important; flex-direction: column; }
html.m-on body.v2 #v2-col1 .spot-ticker-bar { display: none !important; }

/* the question on its own line; the days and the views share the next */
html.m-on body.v2 #basic-view-container .filter-label-section {
    flex: none; height: auto !important; min-height: 0 !important; display: flex !important; flex-wrap: wrap !important; align-items: center;
    gap: 8px; padding: 8px 16px !important;
}
html.m-on body.v2 #basic-view-container #desktop-prediction-prompt { flex: 1 0 100% !important; min-width: 0; margin: 0 !important; }
html.m-on body.v2 #basic-view-container .filter-label-right { flex: 1 0 100% !important; width: 100% !important; display: flex !important; align-items: center; gap: 8px; margin: 0 !important; position: static !important; }
html.m-on body.v2 #basic-view-container .view-text-links { margin-left: auto !important; }
/* the phone shows ONE day's ladder, so the day chips carry the choice in
   the chart view too (desktop shows all three days and hides them there) */
html.m-on body.v2 #basic-view-container #v2-day-chips,
html.m-on body.v2 #basic-view-container:has(#v2-view-region[data-v2-view="chart"]) #v2-day-chips,
html.m-on body.v2.ns-on #basic-view-container:has(#v2-view-region[data-v2-view="basic"][data-ns="new"]) #v2-day-chips { display: flex !important; margin-right: 0 !important; }

html.m-on body.v2 #v2-view-region { flex: 1 1 auto; min-height: 0; height: auto !important; }
html.m-on body.v2 #v2-chart-row { height: 100% !important; min-height: 0 !important; }
/* one day's ladder: the chosen well, beside the chart. max-width, because
   V2Wells writes an inline !important flex-basis sized for three wells.
   188px (was 236px; user, 2026-10-11: "make the chart bigger, and the right
   side needs to be smaller"): the chart gets ~202px of a 390px phone. The
   range column's base is two 31px lanes (revamp.js LANE_W on the phone);
   V2Wells widens it inline when a day draws three, and the strikes give way
   (67px still holds BTC's "> 84,500"). The clock keeps its words and seconds
   at 11px: "2 days 18 hr 43 min 48 sec" fits the narrower head. */
html.m-on body.v2 #v2-wells { max-width: 188px !important; min-width: 0 !important; }
html.m-on body.v2 #v2-wells .v2-well-ranges { flex: 0 0 62px !important; }
html.m-on body.v2 #v2-wells .v2-well-clock { font-size: 11px !important; }
html.m-on body.v2 #v2-wells .v2-well:not(.is-primary) { display: none !important; }
html.m-on body.v2 #v2-wells .v2-well.is-primary { flex: 1 1 auto !important; }

/* the chart row's loading face, phone-shaped: the chart and ONE well */
html.m-on body.v2 .v2-veil-skel .v2-veil-chart { flex: 1 1 auto !important; min-width: 0 !important; width: auto !important; }
html.m-on body.v2 .v2-veil-skel .v2-veil-wells { flex: 0 0 auto !important; width: min(188px, 48%) !important; }
html.m-on body.v2 .v2-veil-skel .v2-veil-well { flex: 1 1 auto !important; width: auto !important; }
html.m-on body.v2 .v2-veil-skel .v2-veil-well:not(:first-child) { display: none !important; }

/* the chart's labels on a phone (m-app.js tidyChartTags): the pick's pill
   goes (the lit tile, the zone and the inline ticket carry it); the breakeven
   tag rides the right edge beside the spot tag, never over the line's head */
html.m-on body.v2 #v2-pays-tag { display: none !important; }
html.m-on body.v2 #tc-tv-be-label { left: auto !important; right: 2px !important; max-width: none !important; white-space: nowrap; }
html.m-on body.v2 #tc-tv-be-label .tc-tv-be-from { display: none !important; }

/* the slider's range buttons at phone width: no "Stays" word (the sky
   box says range), the bounds when the button can hold them, the
   multiplier always (m-app.js drops its "up to") */
html.m-on body.v2 #ranger-zones .ranger-zone-button:not(.is-spread) {
    container-type: inline-size; overflow: hidden; padding: 0 2px !important;
    display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
html.m-on body.v2 #ranger-zones .ranger-zone-button:not(.is-spread) .ranger-btn-label { display: none !important; }
html.m-on body.v2 #ranger-zones .ranger-zone-button:not(.is-spread) .ranger-btn-range { font-size: 11px !important; line-height: 13px !important; white-space: nowrap; }
html.m-on body.v2 #ranger-zones .ranger-zone-button:not(.is-spread) .ranger-btn-multiplier { font-size: 12px !important; line-height: 14px !important; font-weight: 600 !important; white-space: nowrap; }
html.m-on body.v2 .strike-slider-track #ranger-zones { margin-top: 10px !important; }
@container (max-width: 66px) {
    html.m-on body.v2 #ranger-zones .ranger-btn-range { display: none !important; }
}

/* the positions strip, under the chart */
/* (2026-11-12) starts open (m-app.js wireStrip); it was folded by default: the ladder needs the height (18 levels at
   the desktop's 14px pitch floor is ~250px of well body, more on a book with
   off-grid strikes). Open, it never covers the page: below the New Slider's
   lanes, or a split under the Chain (both below). */
html.m-on body.v2 .trade-unified-layout { position: relative; }
html.m-on body.v2 #trade-positions-block {
    flex: none !important; margin: 0 !important; min-height: 0 !important; overflow: hidden;
    display: flex !important; flex-direction: column; max-height: 36px !important;
    background: var(--bg-primary, #0B0F19); border-top: 1px solid var(--v2-hair, rgba(255, 255, 255, .06));
}
/* (2026-11-12) outside the New Slider (the Chain view; the boot before the
   New Slider is built) the strip opens only on a tap there (m-app.js
   m-strip-user, never as the boot default), and as a split, not an overlay
   (the 58% overlay is gone): the strip takes the bottom 45% of the trade
   column in the flow, 180px at least, and its pane scrolls the rows; the view
   above keeps the top and its own scroll (#v2-chain scrolls inside the
   region), so every strike and the spot row stay reachable. A fold gives the
   view the full height again. */
html.m-on.m-strip-open.m-strip-user:not(.m-no-wallet) body.v2 .trade-unified-layout:has(#v2-view-region:not([data-v2-view="basic"][data-ns="new"])) > #trade-positions-block {
    position: relative !important; flex: 0 0 45% !important; min-height: 180px !important; max-height: none !important; height: auto;
}
/* (2026-11-12) the New Slider: the open strip never covers the chart or the
   lanes. It sits in the flow below the last lane and takes the rest of the
   column, 180px at least; its pane scrolls its rows. When the lanes leave
   less than 180px, the trade column scrolls (m-app.js shows the strip on
   open). The lanes view then sizes to its content instead of scrolling. */
html.m-on.m-strip-open:not(.m-no-wallet) body.v2 .trade-unified-layout:has(#v2-view-region[data-v2-view="basic"][data-ns="new"]) {
    overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain;
}
html.m-on.m-strip-open:not(.m-no-wallet) body.v2 .trade-unified-layout:has(#v2-view-region[data-v2-view="basic"][data-ns="new"]) :is(#v2-col1, .trade-panel-main, .trade-panel-main-inner, .trade-content, #basic-view-container, #v2-view-region) {
    flex: 0 0 auto !important;
}
html.m-on.m-strip-open:not(.m-no-wallet) body.v2 .trade-unified-layout:has(#v2-view-region[data-v2-view="basic"][data-ns="new"]) #v2-view-region > #ns-view {
    position: relative; inset: auto; overflow: visible; padding-bottom: 16px;
}
html.m-on.m-strip-open:not(.m-no-wallet) body.v2 .trade-unified-layout:has(#v2-view-region[data-v2-view="basic"][data-ns="new"]) > #trade-positions-block {
    position: relative !important; z-index: auto; flex: 1 1 0 !important; min-height: 180px !important; height: auto; box-shadow: none;
}
html.m-on body.v2 #trade-positions-block .user-positions-table-container { padding: 0 !important; margin: 0 !important; }
html.m-on body.v2 #trade-positions-block .trade-strip-tabs { flex: none; height: 36px; padding: 0 0 0 12px !important; margin: 0 !important; display: flex !important; align-items: center; }
html.m-on body.v2 #trade-positions-block .trade-strip-tab[data-count]::after { content: " " attr(data-count); color: var(--text-muted, #7E8A9C); font-weight: 500; }
/* the fold's handle: a chevron at the row's end */
html.m-on body.v2 #trade-positions-block .trade-strip-tabs::after {
    content: ""; width: 7px; height: 7px; margin: 0 16px 0 10px; flex: none;
    border-right: 1.5px solid var(--text-muted, #7E8A9C); border-top: 1.5px solid var(--text-muted, #7E8A9C);
    transform: rotate(-45deg) translateY(2px); transition: transform .2s;
}
/* the chevron says open where the strip shows open (m-app.js stripShown) */
html.m-on.m-strip-open.m-strip-user body.v2 #trade-positions-block .trade-strip-tabs::after,
html.m-on.m-strip-open body.v2 .trade-unified-layout:has(#v2-view-region[data-v2-view="basic"][data-ns="new"]) > #trade-positions-block .trade-strip-tabs::after { transform: rotate(135deg) translateY(2px); }
/* the strip's row, phone columns: position, cost, P&L, expiry, share (size lives in the position sheet) */
html.m-on body.v2 #v2-pos-strip .v2-pos-cols,
html.m-on body.v2 #v2-pos-strip .v2-pos-row { grid-template-columns: minmax(0, 1.45fr) minmax(0, .85fr) minmax(0, 1fr) 58px 24px 0px !important; column-gap: 8px !important; padding-left: 16px !important; padding-right: 12px !important; }
html.m-on body.v2 #v2-pos-strip .v2-pos-cols > :nth-child(2),
html.m-on body.v2 #v2-pos-strip .v2-pos-row > .v2-pos-size { display: none !important; }

html.m-on body.v2 #trade-positions-block > .col-12 { display: flex; flex-direction: column; min-height: 0; padding: 0 !important; }
html.m-on body.v2 #trade-positions-block .user-positions-table-container { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
html.m-on body.v2 #trade-positions-block .trade-strip-pane { min-height: 0; overflow-y: auto; }

/* ====================================================================
   THE TICKET — the desktop's column 2, inline in the page (trade-phone.css
   lays it out).
   ==================================================================== */
html.m-on body.v2 #v2-col2 .trade-vertical-divider,
html.m-on body.v2 #v2-col2 #ticket-reopen-tab,
html.m-on body.v2 #v2-col2 #ticket-collapse-btn { display: none !important; }
html.m-on body.v2 #v2-col2 .trade-panel-preview { width: 100% !important; max-width: none !important; position: static !important; height: auto !important; }
/* one ticket on the phone: no Basic / Advanced switch */
html.m-on body.v2 #v2-ticket-tabs { display: none !important; }

/* ====================================================================
   TROLLBOX — the desktop's column 3 (news + chat) as its own tab.
   ==================================================================== */
html.m-on body.v2 #v2-col3 { display: none !important; }
html.m-on.m-chat body.v2 #v2-col3 {
    display: flex !important; position: fixed !important; top: var(--m-top); bottom: calc(var(--m-bot) + 30px); left: 0; right: 0; z-index: 1025;
    width: auto !important; border: 0 !important; background: var(--bg-primary, #0B0F19);
}
html.m-on.m-chat body.v2 #v2-col3-inner { position: absolute !important; inset: 0 !important; display: flex; flex-direction: column; padding: 12px 16px !important; gap: 10px; }
html.m-on.m-chat body.v2 #v2-chat { flex: 1 1 auto; min-height: 0; }
/* revamp.css hid the news module below 992px for the pre-v2 phone UI */
html.m-on.m-chat body.v2 #v2-news { display: block !important; flex: none; }

/* ====================================================================
   PAGES — the desktop's page system at phone width: the head wraps, the big
   tabs stay on one line, a band is 2 × 2, and every table keeps the columns
   a phone can read (the rest stay on the row's own modal and on desktop).
   ==================================================================== */
/* the pages' frame: the trade page's 16px gutter, 16px above the title */
html.m-on body.v2 #portfolio-section .pf-wrap,
html.m-on body.v2 #referral-section .ref-wrap,
html.m-on body.v2 #cli-section .cl-wrap,
html.m-on body.v2 #scoreboard-cards .sbc-wrap { padding: 16px 16px 28px !important; margin: 0 !important; max-width: none !important; }
/* a head is the title and its primary action on one row; anything else
   (filters, week tabs) takes a full row under it, flush left */
html.m-on body.v2 .v2-page-head { justify-content: flex-start !important; margin: 0 0 12px !important; }
html.m-on body.v2 .v2-page-head > :first-child { flex: 0 1 auto; margin: 0 !important; }
html.m-on body.v2 .pf-head .pf-head-r { display: contents !important; }
html.m-on body.v2 .pf-head #pf-new-trade { order: 2; margin-left: auto !important; }
html.m-on body.v2 .pf-head .pf-filters { order: 3; flex: 1 0 100%; justify-content: flex-start !important; margin: 0 !important; }
html.m-on body.v2 .sbc-head .sbc-stage-actions { order: 2; margin-left: auto !important; }
html.m-on body.v2 .sbc-head #sbc-periods { order: 3; flex: 1 0 100%; margin: 0 !important; padding-left: 0 !important; justify-content: flex-start !important; }
html.m-on body.v2 .sbc-head #sbc-periods > :first-child { margin-left: 0 !important; padding-left: 0 !important; }
html.m-on body.v2 .ref-head .v2-page-actions { margin-left: auto !important; }
html.m-on body.v2 .v2-page-head { flex-wrap: wrap !important; row-gap: 10px !important; column-gap: 8px !important; height: auto !important; align-items: center !important; }
html.m-on body.v2 .v2-page-head .v2-page-actions { flex-wrap: wrap !important; justify-content: flex-end; gap: 6px !important; margin-left: auto; max-width: 100%; }
html.m-on body.v2 .v2-bigtabs { flex-wrap: nowrap !important; overflow-x: auto; gap: 14px !important; max-width: 100%; }
html.m-on body.v2 .v2-bigtabs > * { white-space: nowrap !important; flex: none; }
html.m-on body.v2 .v2-bigtabs > * > * { font-size: 12px !important; }
html.m-on body.v2 .v2-band { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; height: auto !important; }
html.m-on body.v2 .v2-band > * { min-width: 0 !important; width: auto !important; border-left: 0 !important; border-right: 0 !important; }
html.m-on body.v2 .v2-band { row-gap: 4px !important; }
html.m-on body.v2 .v2-band > .sbc-strip-you,
html.m-on body.v2 .v2-band > #referral-tile-link-cell { grid-column: 1 / -1; }
/* a band cell stacks its label over its value at phone width */
html.m-on body.v2 #scoreboard-cards #sbc-strip > .sbc-strip-cell:not(.sbc-strip-you) { flex-direction: column !important; align-items: flex-start !important; justify-content: flex-start !important; gap: 2px !important; }
html.m-on body.v2 #scoreboard-cards #sbc-strip > .sbc-strip-cell:not(.sbc-strip-you) > * { margin: 0 !important; white-space: nowrap; }
/* the tab bar is the way to the scoreboard; the head keeps its filters and New trade */
html.m-on body.v2 #pf-scoreboard-link { display: none !important; }
/* an empty / connect face: its sentence on one line over its buttons,
   never squeezed into a column beside them */
html.m-on body.v2 .v2-blank { flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; text-align: left !important; }
html.m-on body.v2 .v2-blank .v2-blank-acts { justify-content: flex-start !important; flex-wrap: wrap; gap: 8px !important; }
/* a panel's head line: the title whole; its meta and switch take the next
   row, spread across it, when they cannot sit beside it */
html.m-on body.v2 #portfolio-section .v2-panel-head,
html.m-on body.v2 #scoreboard-cards .v2-panel-head,
html.m-on body.v2 #referral-section .v2-panel-head { flex-wrap: wrap !important; height: auto !important; min-height: 36px; row-gap: 6px !important; padding-top: 8px !important; padding-bottom: 8px !important; }
html.m-on body.v2 .v2-panel-head > :first-child { white-space: nowrap; }
html.m-on body.v2 #portfolio-section .v2-panel-head > .v2-panel-r { flex: 1 0 100%; justify-content: space-between !important; margin: 0 !important; }
/* a position reads on two lines: asset and kind, then the strike or range whole */
html.m-on body.v2 .v2-pos-row .v2-pos-id em { display: block; white-space: nowrap; }
/* the big tabs fit 390px: a step smaller, a little closer */
html.m-on body.v2 .v2-bigtabs { gap: 12px !important; }
html.m-on body.v2 .v2-bigtabs > * { font-size: 14px !important; }
/* a table's loading rows stay inside their card */
html.m-on body.v2 #portfolio-section :is(#pf-pane-mine, #pf-pane-all, #pf-pane-hist) { overflow: hidden; }
/* referrals: the link full width, its three counts on one row */
html.m-on body.v2 #referral-tiles.v2-band { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
html.m-on body.v2 #scoreboard-cards .sbc-tools { flex-wrap: wrap !important; row-gap: 6px; height: auto !important; }
html.m-on body.v2 #scoreboard-cards .sbc-sorts { overflow-x: auto; flex-wrap: nowrap !important; max-width: 100%; }

/* every table's row: two lines where a cell needs them, no ellipsis on money */
html.m-on body.v2 .v2-pos-row { height: auto !important; min-height: 32px; padding-top: 5px !important; padding-bottom: 5px !important; align-items: center; }
html.m-on body.v2 .v2-pos-row > * { min-width: 0; white-space: normal !important; overflow: visible; text-overflow: clip; line-height: 1.3; }
html.m-on body.v2 .v2-pos-row .v2-pos-pnl { display: flex !important; flex-direction: column; align-items: flex-start; gap: 1px; }
html.m-on body.v2 .v2-pos-row .v2-pos-exp .v2-pos-bar { display: none !important; }
html.m-on body.v2 .v2-pos-cols, html.m-on body.v2 .v2-pos-row { column-gap: 8px !important; padding-left: 16px !important; padding-right: 12px !important; }

/* trade strip history + portfolio history: position, premium, P&L, share */
html.m-on body.v2 #v2-hist-strip .v2-pos-cols, html.m-on body.v2 #v2-hist-strip .v2-pos-row,
html.m-on body.v2 #pf-hist-strip .v2-pos-cols, html.m-on body.v2 #pf-hist-strip .v2-pos-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) minmax(0, 1fr) 24px !important; }
html.m-on body.v2 #v2-hist-strip :is(.v2-pos-cols, .v2-pos-row) > :is(:nth-child(1), :nth-child(3), :nth-child(5), :nth-child(7)),
html.m-on body.v2 #pf-hist-strip :is(.v2-pos-cols, .v2-pos-row) > :is(:nth-child(1), :nth-child(3), :nth-child(5), :nth-child(7)) { display: none !important; }
/* portfolio open: position, cost, P&L, expires, share */
html.m-on body.v2 #pf-mine-strip .v2-pos-cols, html.m-on body.v2 #pf-mine-strip .v2-pos-row { grid-template-columns: minmax(0, 1.45fr) minmax(0, .85fr) minmax(0, 1fr) 58px 24px !important; }
html.m-on body.v2 #pf-mine-strip :is(.v2-pos-cols, .v2-pos-row) > :is(:nth-child(2), :nth-child(4)) { display: none !important; }
/* everyone's open: trader, position, projected P&L, share */
html.m-on body.v2 #pf-all-strip .v2-pos-cols, html.m-on body.v2 #pf-all-strip .v2-pos-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr) 24px !important; }
html.m-on body.v2 #pf-all-strip :is(.v2-pos-cols, .v2-pos-row) > :is(:nth-child(3), :nth-child(4), :nth-child(6)) { display: none !important; }
/* scoreboard: rank, trader, prize, score */
html.m-on body.v2 #sbc-body .v2-pos-cols, html.m-on body.v2 #sbc-body .v2-pos-row { grid-template-columns: 28px minmax(0, 1fr) 56px 56px !important; }
html.m-on body.v2 #sbc-body :is(.v2-pos-cols, .v2-pos-row) > :is(:nth-child(3), :nth-child(4), :nth-child(5)) { display: none !important; }
/* referees: wallet, trades, premium paid, last trade */
html.m-on body.v2 #referral-strip .v2-pos-cols, html.m-on body.v2 #referral-strip .v2-pos-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, .6fr) minmax(0, 1fr) minmax(0, .9fr) !important; }
html.m-on body.v2 #referral-strip :is(.v2-pos-cols, .v2-pos-row) > :nth-child(2) { display: none !important; }

/* stacking over the page: modals, their backdrops and toasts */
html.m-on .modal { z-index: 1060 !important; }
html.m-on .modal-backdrop { z-index: 1055 !important; }
html.m-on #notification-container { z-index: 1080 !important; }

@media (prefers-reduced-motion: reduce) {
    html.m-on body.v2 #wallet-pop { transform: translate(-50%, -50%); }
}

/* ---- fewer bands (2026-10-07: "the UI seems cluttered for mobile") ----
   The trade page stacked six bands above the chart. On the phone:
     · the question goes: the ticket asks it in full ("Will ETH close above
       $2,560 in 15h 39m?"), and the asset chip and the day chip say which;
     · the chart's toolbar goes (Live / 1d / 2d / 3d / Fit all, the source):
       the phone fits the chart to the day on screen (m-app.js refitOnDay),
       and its "1d" sat under the "+1 day" chip meaning something else;
     · the days and the views share a row that fits a 360px phone (the views
       ran 25px past a 393px screen and cut "Chain" in half);
     · the positions strip waits for a wallet (before one, it only repeated
       the header's Connect wallet);
     · the weekly prize pool rides the trade page only; Scoreboard carries
       it in full (round 2, below, takes it off the trade page too). */
html.m-on body.v2 #basic-view-container #desktop-prediction-prompt { display: none !important; }
html.m-on body.v2 #v2-chart-row .tc-tv-tools { display: none !important; }
/* A tile's y is the chart's y: revamp.js alignToPlot offsets the wells by the
   toolbar's height. With no toolbar the plot starts at the row's top, and
   alignToPlot refuses a 0 offset (it keeps the old 42px), so it is set here. */
html.m-on body.v2 #v2-wells { --v2-wells-top: 0px !important; }
html.m-on body.v2 #basic-view-container .filter-label-right { gap: 8px !important; }
html.m-on body.v2 #basic-view-container .view-text-links { margin-left: auto !important; }
/* the days and the views: two sunken switchers on one row (design A,
   2026-10-27). The days take the row's width, one equal segment a day,
   named as the Slider names them (Tomorrow, Thursday); the views keep
   their words at the right. Segments are 24px in a 28px track, as before (user, 2026-10-28: the taller row pushed the lanes into a scroll). */
html.m-on body.v2 #v2-day-chips { flex: 1 1 auto; min-width: 0; }
html.m-on body.v2 #v2-day-chips > * { flex: 1 1 0; min-width: 0; height: 24px !important; padding: 0 6px !important; }
/* a long name ("Wednesday" at 320px) ends in an ellipsis inside its segment:
   a block, because a flex box draws no ellipsis */
html.m-on body.v2 #v2-day-chips > * { display: block !important; line-height: 24px !important; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0 !important; }
html.m-on body.v2 #basic-view-container .view-text-links { flex: none; }
html.m-on body.v2 #basic-view-container .view-text-links > * { height: 24px !important; padding: 0 10px !important; }
@media (max-width: 380px) {
    html.m-on body.v2 #v2-day-chips > * { padding: 0 4px !important; }
    html.m-on body.v2 #basic-view-container .view-text-links > * { padding: 0 8px !important; }
}
html.m-on.m-no-wallet body.v2 #trade-positions-block { display: none !important; }
/* Portfolio's blank face hides two of its three tabs (portfolio.css), so the
   strip held one tab, "Everyone's open", over a panel with the same title.
   The filters stay: they cut that public list too, and a filter that empties
   both panes is another way to the blank face. */
html.m-on body.v2 #portfolio-section .pf-wrap.pf-is-blank #pf-tabs { display: none !important; }
/* Trollbox: the calendar card with nothing ahead held only "No scheduled
   events ahead" and its feed's age ("19h ago"). It returns with an event. */
html.m-on.m-chat body.v2 #v2-news:has(#v2-news-list > .v2-news-none:only-child) { display: none !important; }

/* ---- fewer bands, round 2 (user, 2026-10-11: "for the trade, i feel that
   is extremely cluttered"; "why is there 2 connect wallet ... keep it only
   top right") ----
     · the weekly prize pool leaves the trade page too (it left the other
       tabs on 2026-10-07): Scoreboard carries it in full, the chart takes
       its 30px;
     · the ladder draws the strikes that trade. A rung with no quote keeps
       its height, because a tile's y is the chart's y, but draws nothing:
       on a 390px phone 15 of 24 rungs were grey price labels;
     · the ladder's head keeps its clock; its "+1 DAY" repeated the day chip;
     · Connect wallet lives top right only. Portfolio's no-wallet card goes,
       and so do the ticket's two extra buttons (its own button opens the
       header card: m-app.js wireConnectStack). Portfolio's card still shows
       a failed read and a filtered zero, which are not about the wallet. */
html.m-on { --m-comp: 0px; }
html.m-on body.v2 #v2-banner { display: none !important; }
html.m-on body.v2 #v2-wells .v2-cell-empty { background: transparent !important; color: transparent !important; }
html.m-on body.v2 #v2-wells .v2-well-day { display: none !important; }
html.m-on body.v2 #v2-connect-stack .v2-connect-alts { display: none !important; }
html.m-on.m-no-wallet body.v2 #portfolio-section .pf-wrap > .pf-blank { display: none !important; }

/* ---- the chart over a strike rail (direction A; user, 2026-10-11:
   "when it clicks it looks weird") -------------------------------------
   The chart takes the phone's width. The ladder still lays out, hidden,
   because V2Wells fits the chart's price window from it; the day's strikes
   are the rail under the chart (m-rail.js). The rail and the one-line pick
   are the chart view's; Slider and Chain keep their own faces and the bar. */
html.m-on.m-view-chart body.v2 #v2-chart-row { position: relative; }
html.m-on.m-view-chart body.v2 #v2-wells {
    position: absolute !important; top: 0; right: 0; bottom: 0; width: 188px !important;
    visibility: hidden !important; pointer-events: none !important;
}
html.m-on body.v2 .v2-veil-skel .v2-veil-wells { display: none !important; }
/* the ladder's leader (V2Wells.leaders) joins the chart to a tile: with the
   ladder out of view it drew a second, solid line under the pick's line */
html.m-on.m-view-chart body.v2 #v2-chart-row .v2-leader { display: none !important; }

html.m-on #m-rail { display: none; }
html.m-on.m-view-chart.m-on-trade:not(.m-chat) #m-rail { display: block; flex: none; padding: 8px 0; }
/* no side switch (one side quoted): the cards keep the old 6px above them */
html.m-on.m-view-chart.m-on-trade:not(.m-chat) #m-rail:has(> .m-rail-seg:empty) { padding-top: 6px; }
html.m-on #m-rail .m-rail-seg { display: inline-flex; gap: 2px; padding: 2px; margin: 0 16px 8px; border-radius: 7px; background: var(--panel-sunken, #070A11); }
html.m-on #m-rail .m-rail-seg:empty { display: none; }
html.m-on #m-rail .m-rail-seg button {
    height: 24px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent;
    font: 500 12px/1 var(--sans, Inter, sans-serif); color: var(--text-muted, #7E8A9C); touch-action: manipulation;
}
html.m-on #m-rail .m-rail-seg button[aria-selected="true"] { background: var(--v2-chip, #232C42); color: var(--text-primary, #F5F7FA); }
html.m-on #m-rail .m-rail-row {
    display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 0 16px;
    scroll-padding-inline: 16px; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
}
/* two lines, not three (user, 2026-10-11: "make the chart more bigger"):
   the strike and its price on one line, its side and distance under them */
html.m-on #m-rail .m-card {
    flex: none; min-width: 112px; height: 54px; padding: 8px 12px; border: 0; border-radius: 8px;
    background: var(--card-bg, #0E1322); color: var(--text-primary, #F5F7FA); text-align: left;
    display: grid; grid-template-columns: auto auto; grid-template-areas: "t f" "k k";
    column-gap: 10px; row-gap: 3px; align-content: center; scroll-snap-align: start; touch-action: manipulation;
}
html.m-on #m-rail .m-card-t { grid-area: t; }
html.m-on #m-rail .m-card-f { grid-area: f; justify-self: end; align-self: baseline; }
html.m-on #m-rail .m-card-k { grid-area: k; }
html.m-on #m-rail .m-card-k { font: 500 11px/1.2 var(--sans, Inter, sans-serif); color: var(--text-muted, #7E8A9C); white-space: nowrap; }
html.m-on #m-rail .m-card-t { font: 600 16px/1.1 var(--sans, Inter, sans-serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
html.m-on #m-rail .m-card-f { font: 600 12px/1.2 var(--sans, Inter, sans-serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
html.m-on #m-rail .m-card.is-call .m-card-f { color: #5EDD9C; }
html.m-on #m-rail .m-card.is-put .m-card-f { color: #E86A62; }
html.m-on #m-rail .m-card.is-range .m-card-f { color: var(--v2-sky, #7DD3FC); }
/* the picked card alone fills solid (DESIGN.md, The Rail Rule) */
html.m-on #m-rail .m-card.is-on.is-call { background: #5EDD9C; color: #07120B; }
html.m-on #m-rail .m-card.is-on.is-put { background: #E86A62; color: #1A0908; }
html.m-on #m-rail .m-card.is-on.is-range { background: var(--v2-sky, #7DD3FC); color: var(--v2-on-sky, #07131C); }
html.m-on #m-rail .m-card.is-on .m-card-k,
html.m-on #m-rail .m-card.is-on .m-card-f { color: inherit; }
/* the loading face: blank cards, no words (the chart's veil speaks) */
html.m-on #m-rail .m-card.is-skel { pointer-events: none; opacity: .55; }
html.m-on #m-rail .m-rail-empty { margin: 0; padding: 22px 16px; font: 400 12px/1.5 var(--sans, Inter, sans-serif); color: var(--text-muted, #7E8A9C); }

/* one line per pick: no payout wash, premium band or breakeven tag on the
   phone (the ticket states the breakeven); a range keeps its band */
html.m-on body.v2 #tc-tv-selection-zone.is-call,
html.m-on body.v2 #tc-tv-selection-zone.is-put,
html.m-on body.v2 #tc-tv-premium-zone,
html.m-on body.v2 #tc-tv-be-label { display: none !important; }
html.m-on #m-pick-tag {
    position: absolute; left: 8px; z-index: 5; transform: translateY(-50%); pointer-events: none;
    padding: 2px 6px; border-radius: 4px; white-space: nowrap;
    font: 600 11px/1.3 var(--sans, Inter, sans-serif); font-variant-numeric: tabular-nums;
}
html.m-on #m-pick-tag.is-call { background: #5EDD9C; color: #07120B; }
html.m-on #m-pick-tag.is-put { background: #E86A62; color: #1A0908; }
html.m-on #m-pick-tag[hidden] { display: none; }

/* the ticket on the phone (direction A): the question, the amount and the
   figures a buyer acts on. The chart carries the line, so the ticket draws no
   second payoff (DESIGN.md, The One Payoff Rule) and no scenario table. The
   per-contract cost sat beside a payout for the typed amount and read as two
   prices for one trade; Max loss says what the trade costs. A range has no
   above / below side and two breakevens, so the switch and the one-breakeven
   row leave on a range. With no wallet the button says what to do. */
html.m-on body.v2 #v2-tk-payoff,
html.m-on body.v2 #v2-scenarios,
html.m-on body.v2 #v2-params > .v2-param:has(#v2-param-cost) { display: none !important; }
html.m-on.m-pick-range body.v2 #v2-col2 .v2-decide,
html.m-on.m-pick-range body.v2 #v2-params > .v2-param:has(#v2-param-be) { display: none !important; }
html.m-on.m-no-wallet body.v2 #v2-commit-cause { display: none !important; }

/* ---- the Slider table on the phone (user, 2026-10-12): rows a thumb can hit (44px) ---- */
html.m-on body.v2 #v2-slider-table .v2-tbl-head { padding-left: 16px !important; padding-right: 16px !important; }
html.m-on body.v2 #v2-slider-table .v2-tbl-row { height: 44px !important; min-height: 44px; padding-left: 16px !important; padding-right: 16px !important; }
html.m-on body.v2 #v2-slider-table .v2-tbl-row span { font-size: 13px !important; line-height: 1.2 !important; }
html.m-on body.v2 #v2-slider-table .v2-tbl-strike { font-weight: 600 !important; }
html.m-on body.v2 #ranger-zones .ranger-zone-button { height: 36px !important; min-height: 36px; }
html.m-on body.v2 #ranger-zones .ranger-zone-button.is-spread .ranger-btn-range,
html.m-on body.v2 #ranger-zones .ranger-zone-button.is-spread .ranger-btn-multiplier { font-size: 12px !important; line-height: 14px !important; }

/* ---- the Slider view, design A (user, 2026-10-27: "apply the mobile A
   layout, then range and spread need to be consistent with the UI desktop";
   "spread it across the full width so it is not cramped") ----------------
   The phone runs the desktop's New Slider (new-slider.js): the same slider,
   lanes and bars, here in one column. The chart comes first, in the
   desktop's panel; then ONE panel of lanes, each named above its row, so
   the slider and every range and spread bar share the panel's full width as
   one price axis. The day switcher above replaces the settle-day cards. The
   view layer is restated here, so the phone does not rest on the desktop
   rules' body:not(.m-on) gate (m-on is on html). */
html.m-on body.v2 #v2-view-region > #ns-view {
    display: flex; flex-direction: column; gap: 8px;
    position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto;
    padding: 0 16px 16px; visibility: hidden; pointer-events: none;
    container: ns / inline-size;
}
html.m-on body.v2 #v2-view-region[data-v2-view="basic"][data-ns="new"] > #ns-view { visibility: visible; pointer-events: auto; z-index: 2; }
html.m-on body.v2 #v2-view-region[data-v2-view="basic"][data-ns="new"] > .strike-slider-track { visibility: hidden !important; pointer-events: none !important; }
html.m-on body.v2 #ns-view .ns-dates { display: none; }
/* the chart: the desktop's panel, the full width of the gutter */
html.m-on body.v2 #ns-view .ns-chart {
    order: -1; flex: none; min-height: 0; margin: 0; padding: 0;
    border-radius: 8px; background: var(--card-bg, #0E1322); overflow: hidden;
}
html.m-on body.v2 #ns-view #ns-chart-slot #sc-chart .sc-head { padding: 6px 8px; }
html.m-on body.v2 #ns-view #ns-chart-slot #sc-chart .sc-plot { flex: none; height: var(--sc-h); min-height: 0; }
/* 140px (was the phone's 168px): the chart, the lanes and the ticket bar fit
   an 844px screen on a three-bar day; a taller day scrolls */
html.m-on body.v2 #ns-view #sc-chart { --sc-h: 140px; }
/* the lanes: one panel, hairline rows, the name over the row */
html.m-on body.v2 #ns-view .ns-inputs { flex: none; border: 0; border-radius: 8px; background: var(--card-bg, #0E1322); }

/* ---- the share sheet ------------------------------------------------
   The desktop sheet is 480px wide and ran off both sides of a phone. Here
   it is the screen less a 16px gutter. The card keeps its 440×231 layout
   and is scaled to fit (share-card.js sets --v2-share-s); the negative
   margins give back the space the scale removes. The exported PNG is
   rendered at desktop width, so it does not change. */
html.m-on body.v2 .v2-share-box { width: calc(100vw - 32px); max-width: 480px; padding: 0 16px 16px; }
html.m-on body.v2 .v2-share-box .v2-share-card {
    flex: none;
    transform: scale(var(--v2-share-s, 1));
    transform-origin: 0 0;
    margin: 0 calc(440px * (var(--v2-share-s, 1) - 1)) calc(231px * (var(--v2-share-s, 1) - 1)) 0;
}
html.m-on body.v2 .v2-share-opts { flex-wrap: wrap; gap: 8px 16px; }
html.m-on body.v2 .v2-share-actions { flex-wrap: wrap; }
html.m-on body.v2 .v2-share-actions button,
html.m-on body.v2 .v2-share-actions button:first-child { min-width: 0; padding: 0 8px; white-space: nowrap; }

/* ---- the home-screen app, sideways ----------------------------------
   The home-screen app runs edge to edge (app.html's viewport-fit). On a
   phone held sideways the camera housing sits at one side, so every fixed
   region keeps clear of it. In a browser tab, and upright, the side insets
   are 0 and nothing moves. */
html.m-on body.v2 .app-container > header,
html.m-on body.v2 #v2-banner,
html.m-on body.v2 .content-section,
html.m-on.m-chat body.v2 .status-bar,
html.m-on #m-tabs,
html.m-on.m-chat body.v2 #v2-col3 { left: var(--m-safe-l) !important; right: var(--m-safe-r) !important; }
/* app.css gives every header width: 100%, which would push it past the right side */
html.m-on body.v2 .app-container > header { width: auto; }

/* ---- touch targets (2026-10-15) --------------------------------------
   One rule: a control a thumb taps is 44px tall to the finger (Apple HIG).
   The look stays the design's (chips 28px, switch segments 24px in a 28px
   track, buttons 30px); a transparent ::before hit box, 44px tall and
   centred, carries the extra height. The trade page's rows are padded to
   44px so two rows' boxes never overlap (asset row 8 + 28 + 8, days and
   views row 8 + 28 + 8, rail switch 8 + 2 + 24 + 2 + 8). Inside a box that
   scrolls or clips, the hit box stops at its edge: the positions strip
   (36px), the big tab rows (Portfolio 40px, Scoreboard 34px) and the
   scoreboard's sort track (28px). ::before, because ::after is already the
   strip tab's count and the filter dropdowns' chevron. */
html.m-on body.v2 #asset-selection-container .asset-selection-btn { height: 28px !important; padding-top: 0 !important; padding-bottom: 0 !important; align-items: center; }
html.m-on body.v2 .app-container > header :is(.navbar-brand, #nav-alert-btn, #v2-balance-chip, #header-wallet-btn, #wallet-help-icon, #disconnect-wallet-btn),
html.m-on body.v2 #asset-selection-container .asset-selection-btn,
html.m-on body.v2 #v2-day-chips > *,
html.m-on body.v2 #basic-view-container .view-text-links > *,
html.m-on #m-rail .m-rail-seg button,
html.m-on body.v2 #trade-positions-block :is(.trade-strip-tab, #v2-strip-portfolio),
html.m-on body.v2 #v2-col2 :is(#v2-step-down, #v2-step-up, .v2-side > button, .v2-preset, #trade-now-btn),
html.m-on body.v2 .content-section :is(.v2-bigtabs > *, .pf-view, .pf-chip, .sbc-sort, .pgr-btn, .pgr-sel, .form-select-dropdown,
    #pf-new-trade, .sbc-stage-btn, #sbc-new-trade, #sbc-per, #referral-share-btn, #referral-copy-btn, .v2-page-actions > button, summary) { position: relative; }
html.m-on body.v2 .app-container > header :is(.navbar-brand, #nav-alert-btn, #v2-balance-chip, #header-wallet-btn, #wallet-help-icon, #disconnect-wallet-btn)::before,
html.m-on body.v2 #asset-selection-container .asset-selection-btn::before,
html.m-on body.v2 #v2-day-chips > *::before,
html.m-on body.v2 #basic-view-container .view-text-links > *::before,
html.m-on #m-rail .m-rail-seg button::before,
html.m-on body.v2 #trade-positions-block :is(.trade-strip-tab, #v2-strip-portfolio)::before,
html.m-on body.v2 #v2-col2 :is(#v2-step-down, #v2-step-up, .v2-side > button, .v2-preset, #trade-now-btn)::before,
html.m-on body.v2 .content-section :is(.v2-bigtabs > *, .pf-view, .pf-chip, .sbc-sort, .pgr-btn, .pgr-sel, .form-select-dropdown,
    #pf-new-trade, .sbc-stage-btn, #sbc-new-trade, #sbc-per, #referral-share-btn, #referral-copy-btn, .v2-page-actions > button, summary)::before {
    content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%);
}
/* narrower than a thumb: the box is 44px wide too */
html.m-on body.v2 :is(#nav-alert-btn, #v2-step-down, #v2-step-up)::before { left: 50%; right: auto; width: 44px; transform: translate(-50%, -50%); }
/* the strip is a 36px band; its whole height is the tab */
html.m-on body.v2 #trade-positions-block :is(.trade-strip-tab, #v2-strip-portfolio)::before { height: 36px; }
/* the amount: the field is 44px and the input fills its height */
html.m-on body.v2 #v2-col2 .ticket-amt-field { min-height: 44px; padding-top: 0 !important; padding-bottom: 0 !important; align-items: stretch !important; }
html.m-on body.v2 #v2-col2 .ticket-amt-field > :not(input) { align-self: center; }
html.m-on body.v2 #v2-col2 #ticket-amount-input { height: auto !important; }
}
