/* mobile-deck.css - THE HANDSET (1.11.9.43). The phone layout brought up to
   the desktop's look. Picked from the mobile mockups: M1 "Handset", with M3's
   thumb sheet on Market.

   The phone is the same machine as the PC, shrunk: the gunmetal of the panel
   bezels and the Bridge Deck, dot-matrix amber for names and labels, green
   phosphor glass for the things you read, physical keycaps for the things you
   press. mobile.css still owns the SHELL (what is fixed, what scrolls, what is
   shown in which view, the drawer's stacking); this file owns the LOOK and is
   loaded after it, so every rule here is a restyle of something mobile.css
   already places. Every rule is scoped to body.fm-mobile; the desktop is not
   touched.

   Palette, shared with chat-deck.css (I6 Gunmetal):
     housing   #1b201b -> #0a0c0a, inner edge #262c26
     glass     #040604 with a 3px amber dot grid
     phosphor  #7cf0a4 / glow rgba(66,255,126,.35)
     amber     #f0b454 (legends #f5c26a)                                      */

body.fm-mobile {
  --fm-top: 62px;
  --fm-nav: 74px;
  --hs-amb: #f5c26a;
  --hs-ph: #7cf0a4;
  --hs-glow: rgba(66,255,126,.35);
  --hs-housing: linear-gradient(180deg,#1b201b,#0a0c0a);
  --hs-glass: radial-gradient(circle,rgba(240,180,84,.06) .7px,transparent 1.1px) 0 0/3px 3px,#040604;
  --hs-cap: linear-gradient(#262b26,#171a17);
  --hs-cap-sh: 0 3px 0 #060706,0 5px 5px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.1);
  --hs-lit: radial-gradient(ellipse at 50% 45%,#ffe9b8,#f0b454 60%,#b97f2a);
  --hs-lit-sh: 0 3px 0 #4a3010,0 5px 5px rgba(0,0,0,.55),0 0 14px rgba(240,180,84,.45);
  background: #050605;
}
/* Small phones keep their tighter chrome (mobile.css sets 40/46 there). */
@media (max-height: 640px) {
  body.fm-mobile { --fm-top: 54px; --fm-nav: 60px; }
}

/* The scroll region sits on the housing, not on the page colour. */
body.fm-mobile .grid { background: linear-gradient(180deg,#0b0d0b,#060706); }

/* ── Header board ────────────────────────────────────────────────────────── */
body.fm-mobile #fmTop {
  background: var(--hs-housing);
  border-bottom: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -1px 0 #000, 0 3px 10px rgba(0,0,0,.6);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: 0 8px; gap: 8px;
}
body.fm-mobile #fmTop .fmt-portrait {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 3px;
  border: 0; box-shadow: 0 0 0 1px #000, 0 0 0 2px #2c332c, inset 0 0 8px #000;
  background-color: #040604; background-size: cover; background-position: center;
  color: var(--hs-amb); font-size: 15px; display: flex; align-items: center; justify-content: center;
}
body.fm-mobile #fmTop .fmt-glass {
  flex: 1 1 auto; min-width: 0; padding: 5px 8px 4px; border-radius: 3px;
  background: var(--hs-glass);
  box-shadow: inset 0 0 8px #000, 0 0 0 1px #000, 0 0 0 2px #1f241f;
  display: flex; flex-direction: column; gap: 3px;
}
body.fm-mobile #fmTop .fmt-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
body.fm-mobile #fmTop .fmt-id { flex: 1 1 auto; min-width: 0; }
body.fm-mobile #fmTop .fmt-name {
  font-family: 'Doto','Share Tech Mono',ui-monospace,monospace; font-weight: 700;
  font-size: 15px; letter-spacing: .1em; line-height: 1;
  color: var(--amber,#f0b454); text-shadow: 0 0 6px rgba(240,180,84,.4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase;
}
body.fm-mobile #fmTop .fmt-eod { display: flex; align-items: baseline; gap: 5px; text-align: right; }
body.fm-mobile #fmTop .fmt-eod-l {
  font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 7.5px; letter-spacing: .14em;
  color: #8a7a52; opacity: 1;
}
body.fm-mobile #fmTop .fmt-eod-v {
  font-family: 'Doto','Share Tech Mono',ui-monospace,monospace; font-weight: 700;
  font-size: 15px; line-height: 1; color: #46ff7d; text-shadow: 0 0 6px rgba(70,255,125,.45);
  font-variant-numeric: tabular-nums;
}
body.fm-mobile #fmTop .fmt-eod-v.urgent { color: #ff5a4a; text-shadow: 0 0 6px rgba(255,90,74,.6); }
body.fm-mobile #fmTop .fmt-tape { overflow: hidden; height: 11px; -webkit-mask-image: linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent); mask-image: linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent); }
body.fm-mobile #fmTop .fmt-run { --fmb-dur: 40s; }
body.fm-mobile #fmTop .fmt-wallet { flex: 0 0 auto; text-align: right; line-height: 1.05; }
body.fm-mobile #fmTop .fmt-cash-l {
  font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 7.5px; letter-spacing: .16em; color: #8a7a52;
}
body.fm-mobile #fmTop .fmt-cash {
  font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 14px; font-weight: 400;
  color: var(--hs-amb); text-shadow: 0 0 6px rgba(240,180,84,.3); white-space: nowrap;
}
body.fm-mobile #fmTop .fmt-menu,
body.fm-mobile #fmTop .fmt-back {
  width: 34px; height: 34px; flex: 0 0 auto; border: 0; border-radius: 5px;
  background: var(--hs-cap); color: var(--hs-amb); box-shadow: var(--hs-cap-sh);
  font-size: 15px; line-height: 34px; padding: 0; text-align: center;
}
body.fm-mobile #fmTop .fmt-menu:active,
body.fm-mobile #fmTop .fmt-back:active { transform: translateY(2px); box-shadow: 0 1px 0 #060706; }
@media (max-width: 360px) {
  body.fm-mobile #fmTop .fmt-eod-l { display: none; }
  body.fm-mobile #fmTop .fmt-name { font-size: 13px; }
}

/* ── Segment strip (Board, Wallet) ──────────────────────────────────────────
   Lit legend cells on glass, like the desktop's tab board. */
body.fm-mobile #fmCtx {
  background: var(--hs-glass); border-bottom: 1px solid #1a1f1a;
  box-shadow: inset 0 -6px 10px rgba(0,0,0,.5); gap: 4px; padding: 4px 6px;
}
body.fm-mobile #fmCtx .fm-seg {
  flex: 1 1 0; border: 0; border-radius: 3px; margin: 0;
  background: #0b0d0b; color: #8a7a52; box-shadow: inset 0 0 0 1px #262b26;
  font-family: 'Doto','Share Tech Mono',ui-monospace,monospace; font-weight: 700;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
}
body.fm-mobile #fmCtx .fm-seg.on {
  color: #ffd27a; text-shadow: 0 0 8px rgba(240,180,84,.9);
  box-shadow: inset 0 0 0 1px #f0b454, 0 0 10px rgba(240,180,84,.3);
}

/* ── Keycap navigation ───────────────────────────────────────────────────── */
body.fm-mobile #fmNav {
  background: var(--hs-housing);
  border-top: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 -4px 14px rgba(0,0,0,.6);
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 0px));
  gap: 7px;
}
body.fm-mobile #fmNav button {
  border: 0; border-radius: 5px; margin: 0; padding: 0;
  background: var(--hs-cap); color: var(--hs-amb); box-shadow: var(--hs-cap-sh);
  font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 9px; letter-spacing: .1em;
  gap: 3px;
}
body.fm-mobile #fmNav button:active { transform: translateY(2px); box-shadow: 0 1px 0 #060706, inset 0 1px 0 rgba(255,255,255,.1); opacity: 1; }
body.fm-mobile #fmNav button.on { background: var(--hs-lit); color: #1a0f02; box-shadow: var(--hs-lit-sh); border-top-color: transparent; }
/* The phone key is green, like CONTACTS on the deck. */
body.fm-mobile #fmNav button[data-fmv="chat"]:not(.on) {
  background: linear-gradient(#1d3a26,#10241a); color: #42ff7e;
  box-shadow: 0 3px 0 #04100a,0 5px 5px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.1),0 0 10px rgba(66,255,126,.18);
}
body.fm-mobile #fmNav .fmn-ic { font-size: 0; line-height: 0; height: 18px; display: flex; align-items: center; }
body.fm-mobile #fmNav .fmn-ic .fmn-f { font-size: 18px; line-height: 18px; font-family: 'Share Tech Mono',ui-monospace,monospace; }
body.fm-mobile #fmNav .fmn-badge {
  top: 4px; right: 6px; background: #ff5a4a; color: #fff; text-shadow: none;
  min-width: 14px; line-height: 14px; font-size: 8.5px; border-radius: 7px; box-shadow: 0 0 6px rgba(255,90,74,.6);
}
@media (max-height: 640px) {
  body.fm-mobile #fmNav { padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
  body.fm-mobile #fmNav button > span[data-i18n] { display: none; }
}

/* ── Section titles, on the phone too ────────────────────────────────────── */
body.fm-mobile .fm-sec-t {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Doto','Share Tech Mono',ui-monospace,monospace; font-weight: 700;
  font-size: 14px; letter-spacing: .14em; line-height: 1;
}
body.fm-mobile .fm-sec-t::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex: 0 0 auto; background: var(--green); box-shadow: 0 0 5px var(--green); }
body.fm-mobile .fm-sec-rule { background: linear-gradient(90deg,color-mix(in srgb,var(--amber) 22%,transparent),transparent); }
body.fm-mobile .fm-sec-meta { font-family: 'Doto','Share Tech Mono',ui-monospace,monospace; font-weight: 700; font-size: 9px; }

/* ── Market ──────────────────────────────────────────────────────────────── */
/* The chart sits in a glass well with a bezel ring. */
body.fm-mobile #marketTab > #chart {
  border-radius: 3px; background: #040604;
  box-shadow: inset 0 0 12px #000, 0 0 0 1px #000, 0 0 0 3px #1a1f1a;
}
/* The panels under it (limit orders, alerts, upgrades, live trades) become
   glass cards in the housing. Their own inline borders are overridden. */
body.fm-mobile #marketTab #limitPanel,
body.fm-mobile #marketTab #alertPanel,
body.fm-mobile #marketTab #marketUpgradesPanel,
body.fm-mobile #marketTab #tradeFeedWrap {
  background: var(--hs-glass) !important; border: 0 !important; border-radius: 4px !important;
  box-shadow: inset 0 0 10px #000, 0 0 0 1px #000, 0 0 0 2px #1a1f1a !important;
  margin-top: 10px !important;
}

/* THE THUMB SHEET. The order row, pinned over the bottom of the scroll region
   while Market is up. A housing slab with a grab bar, the symbol and the -/+
   stepper on one line and BUY / SELL / SHORT keycaps under them. */
body.fm-mobile[data-fmv="market"] { --fm-sheet: 118px; }
body.fm-mobile[data-fmv="market"] .grid { padding-bottom: calc(var(--fm-sheet) + 18px); }
body.fm-mobile[data-fmv="market"] #marketTab > .row.fm-sheet {
  position: fixed; left: 0; right: 0; bottom: var(--fm-nav); z-index: 9990;
  margin: 0 !important; padding: 14px 12px 10px;
  display: grid !important; grid-template-columns: minmax(0,1fr) 40px 64px 40px; grid-template-rows: auto 48px;
  gap: 8px; align-items: center;
  background: var(--hs-housing); border-radius: 14px 14px 0 0;
  box-shadow: 0 -6px 18px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.08), inset 0 0 0 1px #262c26;
}
/* The grab bar is a real button (1.11.9.44): a tap folds the sheet to a tab. */
.fm-grip { display: none; }
body.fm-mobile[data-fmv="market"] .fm-sheet .fm-grip {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  position: absolute; top: 0; left: 0; right: 0; height: 18px; margin: 0; padding: 0;
  border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
body.fm-mobile[data-fmv="market"] .fm-sheet .fm-grip-bar { width: 36px; height: 4px; border-radius: 2px; background: #3a403a; }
body.fm-mobile[data-fmv="market"] .fm-sheet .fm-grip-lb { display: none; }
body.fm-mobile.fm-sheet-min[data-fmv="market"] { --fm-sheet: 26px; }
body.fm-mobile.fm-sheet-min[data-fmv="market"] #marketTab > .row.fm-sheet { padding: 0 !important; height: 26px; display: block !important; }
body.fm-mobile.fm-sheet-min[data-fmv="market"] #marketTab > .row.fm-sheet > :not(.fm-grip) { display: none !important; }
body.fm-mobile.fm-sheet-min[data-fmv="market"] .fm-sheet .fm-grip { height: 26px; }
body.fm-mobile.fm-sheet-min[data-fmv="market"] .fm-sheet .fm-grip-lb {
  display: inline; font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 10px; letter-spacing: .16em; color: #8a7a52;
}
body.fm-mobile.fm-sheet-min[data-fmv="market"] .fm-sheet .fm-grip-bar { transform: rotate(180deg); }
body.fm-mobile.fm-kbd[data-fmv="market"] #marketTab > .row.fm-sheet { bottom: 0; }
.fm-step { display: none; }
body.fm-mobile[data-fmv="market"] .fm-sheet .fm-step {
  display: block; height: 38px; border: 0; border-radius: 5px; padding: 0;
  background: var(--hs-cap); color: var(--hs-amb); box-shadow: var(--hs-cap-sh);
  font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 20px; line-height: 38px;
}
body.fm-mobile[data-fmv="market"] .fm-sheet .fm-step:active { transform: translateY(2px); box-shadow: 0 1px 0 #060706; }
body.fm-mobile[data-fmv="market"] .fm-sheet #sym,
body.fm-mobile[data-fmv="market"] .fm-sheet #shares {
  max-width: none !important; min-width: 0 !important; width: 100%; box-sizing: border-box; flex: none !important;
  background: transparent; border: 0; border-bottom: 1px solid rgba(240,180,84,.4); border-radius: 0;
  color: var(--hs-amb); font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 17px; padding: 4px 2px;
}
body.fm-mobile[data-fmv="market"] .fm-sheet #shares { text-align: center; -moz-appearance: textfield; }
body.fm-mobile[data-fmv="market"] .fm-sheet #shares::-webkit-inner-spin-button,
body.fm-mobile[data-fmv="market"] .fm-sheet #shares::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
body.fm-mobile[data-fmv="market"] .fm-sheet #sym:focus,
body.fm-mobile[data-fmv="market"] .fm-sheet #shares:focus { outline: none; border-bottom-color: #f0b454; }
body.fm-mobile[data-fmv="market"] .fm-sheet #sym { grid-column: 1; grid-row: 1; text-transform: uppercase; }
body.fm-mobile[data-fmv="market"] .fm-sheet .fm-step:first-of-type { grid-column: 2; grid-row: 1; }
body.fm-mobile[data-fmv="market"] .fm-sheet #shares { grid-column: 3; grid-row: 1; }
body.fm-mobile[data-fmv="market"] .fm-sheet .fm-step:last-of-type { grid-column: 4; grid-row: 1; }
/* Row two: BUY and SELL share the width, SHORT is narrower. The grid has four
   tracks; the buttons span them as 1.5 / 1.5 / 1 by sitting in a subgrid of
   their own row. */
body.fm-mobile[data-fmv="market"] .fm-sheet #buy,
body.fm-mobile[data-fmv="market"] .fm-sheet #sell,
body.fm-mobile[data-fmv="market"] .fm-sheet #shortBtn {
  grid-row: 2; height: 48px; margin: 0; border: 0 !important; border-radius: 5px;
  font-family: 'Share Tech Mono',ui-monospace,monospace !important; font-size: 15px; letter-spacing: .1em; text-transform: uppercase;
}
body.fm-mobile[data-fmv="market"] .fm-sheet #buy { grid-column: 1; background: linear-gradient(#46e07a,#1f9a48) !important; color: #021006 !important; box-shadow: 0 3px 0 #0a3a1a,0 5px 5px rgba(0,0,0,.55); }
body.fm-mobile[data-fmv="market"] .fm-sheet #sell { grid-column: 2 / 4; background: linear-gradient(#e0503a,#9a2a18) !important; color: #fff0e8 !important; box-shadow: 0 3px 0 #3a0c04,0 5px 5px rgba(0,0,0,.55); }
body.fm-mobile[data-fmv="market"] .fm-sheet #shortBtn { grid-column: 4; font-size: 10px !important; letter-spacing: .04em; background: var(--hs-cap) !important; color: #ff8a6a !important; box-shadow: var(--hs-cap-sh); padding: 0; }
body.fm-mobile[data-fmv="market"] .fm-sheet #buy:active,
body.fm-mobile[data-fmv="market"] .fm-sheet #sell:active,
body.fm-mobile[data-fmv="market"] .fm-sheet #shortBtn:active { transform: translateY(2px); }
/* Cash is in the header; the row's own copy is still updated, just not drawn. */
body.fm-mobile[data-fmv="market"] .fm-sheet #cash { display: none !important; }

/* ── Chat: the CRT and the Bridge Deck, phone sized ─────────────────────────
   chat-deck.js builds the deck on every device; mobile.js tags its keyboard
   into the chat view. The screen is #chatBox; the keyboard sits under it. */
body.fm-mobile[data-fmv="chat"] { --fm-deck: 128px; }
body.fm-mobile[data-fmv="chat"] #rightPanel { position: absolute; inset: 0; }
body.fm-mobile[data-fmv="chat"] #chatBox {
  inset: 10px 12px calc(var(--fm-deck) + 8px) 12px !important; border-radius: 10px/12px !important;
  background: radial-gradient(ellipse at 50% 45%,#0a1a0e 0%,#05100a 65%,#020805 100%) !important;
  box-shadow: inset 0 0 30px rgba(0,0,0,.9),0 0 0 2px #000,0 0 0 6px #121612,0 0 0 7px #2c332c !important;
  color: var(--hs-ph); overflow: hidden;
}
body.fm-mobile[data-fmv="chat"] .grid { background: linear-gradient(180deg,#141814,#0a0c0a); }
body.fm-mobile[data-fmv="chat"] #chatBox::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  background: repeating-linear-gradient(0deg,rgba(0,0,0,.22) 0 1px,transparent 1px 3px);
}
body.fm-mobile[data-fmv="chat"] #chatTabs,
body.fm-mobile[data-fmv="chat"] .roomPager,
body.fm-mobile[data-fmv="chat"] #globalRoomPager { display: none !important; }
body.fm-mobile[data-fmv="chat"] #chatBox .fmd-head,
body.fm-mobile[data-fmv="chat"] #chatBox .fmd-rule { display: flex !important; }
body.fm-mobile[data-fmv="chat"] #chatBox .fmd-rule { display: block !important; }
body.fm-mobile[data-fmv="chat"] #chatBox .fmd-head { order: -2; padding: 10px 12px 0; }
body.fm-mobile[data-fmv="chat"] #chatBox .fmd-rule { order: -2; margin: 6px 12px 2px; }
body.fm-mobile[data-fmv="chat"] #chatAnnounce { order: -1; margin: 0 10px 6px !important; }
body.fm-mobile[data-fmv="chat"] .chat-channel { padding: 4px 12px; color: #b8f0c8; }
body.fm-mobile[data-fmv="chat"] #chatInputRow {
  position: relative; z-index: 4; align-items: center; background: transparent;
  border-top: 1px solid rgba(124,240,164,.3); margin: 0 10px 8px; padding: 7px 0 0;
}
body.fm-mobile[data-fmv="chat"] #chatChannelBadge,
body.fm-mobile[data-fmv="chat"] #chatSend { display: none !important; }
body.fm-mobile[data-fmv="chat"] .fmd-prompt { display: inline !important; font-size: 14px; }
body.fm-mobile[data-fmv="chat"] #chatInput {
  background: transparent; border: 0; border-radius: 0; padding: 2px 0;
  color: var(--hs-ph); caret-color: var(--hs-ph); text-shadow: 0 0 6px rgba(124,240,164,.3);
}
body.fm-mobile[data-fmv="chat"] #chatInput::placeholder { color: rgba(124,240,164,.4); }
/* The keyboard: flat (no tilt on a phone, the angle eats height), channels,
   rooms with A-/A+, then CONTACTS and XMIT. WIRE and RANKS are Wallet's. */
body.fm-mobile[data-fmv="chat"] #rightPanel > .fmd-deck {
  display: block !important; position: absolute; left: 12px; right: 12px; bottom: 6px;
}
body.fm-mobile[data-fmv="chat"] .fmd-tray { transform: none; margin: 0; padding: 0; gap: 7px; background: none; box-shadow: none; }
body.fm-mobile[data-fmv="chat"] .fmd-row.fn { grid-template-columns: 1fr 1fr; }
body.fm-mobile[data-fmv="chat"] .fmd-row.fn > .fmd-k:nth-child(2),
body.fm-mobile[data-fmv="chat"] .fmd-row.fn > .fmd-k:nth-child(3) { display: none; }
body.fm-mobile[data-fmv="chat"] .fmd-k { height: 34px; }
body.fm-mobile.fm-kbd[data-fmv="chat"] { --fm-deck: 0px; }
body.fm-mobile.fm-kbd[data-fmv="chat"] #rightPanel > .fmd-deck { display: none !important; }
/* Keycap colours come from chat-deck.css (they are not scoped to desktop);
   its --fmd-ph lives on #rightPanel.fmd, which is set on phones too. */
body.fm-mobile #rightPanel.fmd { --fmd-ph: #7cf0a4; --fmd-ph-glow: rgba(66,255,126,.35); --fmd-amb: #f5c26a; }

/* ── Wallet: Wire and Ranks are screens too ──────────────────────────────── */
body.fm-mobile[data-fmv="wallet"] #transferSection,
body.fm-mobile[data-fmv="wallet"] #leaderboardCompact {
  position: relative; margin: 4px 4px 10px; padding: 12px 14px 12px; border: 0 !important; border-radius: 10px/12px;
  background: radial-gradient(ellipse at 50% 45%,#0a1a0e 0%,#05100a 65%,#020805 100%);
  box-shadow: inset 0 0 30px rgba(0,0,0,.9),0 0 0 2px #000,0 0 0 6px #121612,0 0 0 7px #2c332c;
  color: var(--hs-ph);
}
body.fm-mobile[data-fmv="wallet"] #transferSection > h2,
body.fm-mobile[data-fmv="wallet"] #leaderboardCompact > h2 {
  pointer-events: none; display: inline-block; margin: 0 0 8px !important; padding: 1px 6px;
  font-family: 'Share Tech Mono',ui-monospace,monospace !important; font-size: 14px !important; letter-spacing: .14em;
  background: var(--hs-ph); color: #031006 !important; text-shadow: none !important;
}
body.fm-mobile[data-fmv="wallet"] #transferSection > h2 *,
body.fm-mobile[data-fmv="wallet"] #leaderboardCompact > h2 * { color: #031006 !important; opacity: 1 !important; }
body.fm-mobile[data-fmv="wallet"] .collapse-chevron { display: none; }
body.fm-mobile[data-fmv="wallet"] #transferSection .row { flex-direction: column; align-items: stretch; gap: 10px; }
body.fm-mobile[data-fmv="wallet"] #transferSection .input {
  max-width: none !important; background: transparent; border: 0; border-bottom: 1px solid rgba(124,240,164,.45); border-radius: 0;
  color: var(--hs-ph); font-size: 16px; padding: 6px 0;
}
body.fm-mobile[data-fmv="wallet"] #transferSection .fmd-lbl { display: block !important; margin-bottom: -6px; }
body.fm-mobile[data-fmv="wallet"] #transferSection #xfer {
  height: 46px; border: 0; border-radius: 5px; background: var(--hs-lit); color: #1a0f02; box-shadow: var(--hs-lit-sh);
  font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 15px; letter-spacing: .14em; text-transform: uppercase;
}
body.fm-mobile[data-fmv="wallet"] #transferSection .collapse-body > div:not(.row) { color: var(--hs-ph) !important; opacity: .85; font-size: 11px !important; line-height: 1.5 !important; }
body.fm-mobile[data-fmv="wallet"] #leaderboardCompact #board .lb-row {
  background: transparent; border: 0; border-bottom: 1px dotted rgba(124,240,164,.2); border-radius: 0; padding: 8px 2px; font-size: 13px; color: var(--hs-ph);
}
body.fm-mobile[data-fmv="wallet"] #leaderboardCompact #board .lb-row > * { font-size: 13px !important; }
body.fm-mobile[data-fmv="wallet"] #leaderboardCompact #board .lb-row > b { color: var(--hs-ph); font-weight: 400; }
/* Every account is listed (1.11.9.45): the board scrolls inside its screen,
   and your own row sticks to its top or bottom edge when scrolled away. */
body.fm-mobile[data-fmv="wallet"] #leaderboardCompact #board {
  max-height: 62vh; max-height: 62dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
body.fm-mobile[data-fmv="wallet"] #leaderboardCompact #board .lb-row > span:first-child { min-width: 40px !important; font-variant-numeric: tabular-nums; }
body.fm-mobile[data-fmv="wallet"] #leaderboardCompact #board .lb-row.lb-me {
  background: #0b1d10; border-bottom-color: rgba(124,240,164,.55); box-shadow: inset 3px 0 0 var(--hs-ph);
}

/* ── Board ───────────────────────────────────────────────────────────────── */
body.fm-mobile #fmLeft .search,
body.fm-mobile #fmLeft input[type="search"],
body.fm-mobile #fmLeft #search {
  background: transparent; border: 0; border-bottom: 1px solid rgba(240,180,84,.4); border-radius: 0; color: var(--hs-amb);
  font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 16px;
}

/* ── More grid and the casino lobby: keycap tiles ────────────────────────── */
body.fm-mobile #fmMore .fm-sect {
  font-family: 'Doto','Share Tech Mono',ui-monospace,monospace; font-weight: 700; font-size: 12px; letter-spacing: .16em;
  color: var(--amber,#f0b454); opacity: 1; display: flex; align-items: center; gap: 8px; margin: 16px 2px 9px;
}
body.fm-mobile #fmMore .fm-sect::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg,rgba(240,180,84,.25),transparent); }
body.fm-mobile #fmMore .fm-sect:first-child { margin-top: 4px; }
body.fm-mobile .fm-grid3 { gap: 9px; }
body.fm-mobile .fm-tile {
  aspect-ratio: auto; height: 82px; border: 0; border-radius: 6px;
  background: var(--hs-cap); box-shadow: var(--hs-cap-sh);
  color: var(--hs-amb); gap: 7px;
}
body.fm-mobile .fm-tile:active { transform: translateY(2px); box-shadow: 0 1px 0 #060706 !important; background: var(--hs-cap) !important; }
body.fm-mobile .fm-tile .ic { font-size: 22px; line-height: 1; color: var(--hs-amb); display: flex; }
body.fm-mobile .fm-tile .ic svg { width: 24px; height: 24px; }
body.fm-mobile .fm-tile .lb { font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 10px; letter-spacing: .1em; color: #e2d8c0; }
body.fm-mobile .fm-tile .bg { background: #ff5a4a; color: #fff; }
body.fm-mobile .fm-tile.fm-locked { background: linear-gradient(#2a1814,#160c0a); }
body.fm-mobile .fm-tile.fm-locked .ic { color: #a05050; filter: none; }
/* Recovery is closed for testing: its tile is red like the desktop tab. */
body.fm-mobile #fmMore .fm-tile[data-fmkey="recovery"] .ic,
body.fm-mobile #fmMore .fm-tile[data-fmkey="recovery"] .lb { color: #ff6a5a; }
body.fm-mobile #fmCasinoLobby .fm-tile .ic { font-size: 24px; filter: grayscale(1) sepia(1) saturate(3) hue-rotate(-12deg) brightness(.95); }

/* ── The drawer, on the housing ──────────────────────────────────────────── */
body.fm-mobile #fm-header-user {
  background: var(--hs-housing) !important;
  border-left: 0 !important;
  box-shadow: -8px 0 24px rgba(0,0,0,.7), inset 1px 0 0 #262c26;
}
body.fm-mobile #fm-header-user .hbtn,
body.fm-mobile #fm-header-user > button {
  border: 0 !important; border-radius: 5px !important; background: var(--hs-cap) !important; color: var(--hs-amb) !important;
  box-shadow: var(--hs-cap-sh) !important; font-family: 'Share Tech Mono',ui-monospace,monospace !important; letter-spacing: .08em;
}
body.fm-mobile #fmDrawerClose {
  border: 0; border-radius: 5px; background: var(--hs-cap); color: var(--hs-amb); box-shadow: var(--hs-cap-sh);
}

@media (prefers-reduced-motion: reduce) {
  body.fm-mobile #fmTop .fmt-run { animation: none; }
}

/* ── The trial bar ────────────────────────────────────────────────────────────
   fm-auth.js draws it inline above the nav. On a phone it wrapped to three
   lines and sat over the thumb sheet and the deck. Here it is one 36px strip
   in the housing, and everything pinned above the nav moves up by it. */
body.fm-mobile #fm-guest-bar {
  height: 36px; box-sizing: border-box; flex-wrap: nowrap !important; gap: 6px !important; padding: 0 8px !important;
  background: linear-gradient(180deg,#141814,#0b0d0b) !important; border-top: 1px solid #262c26 !important;
  font-family: 'Share Tech Mono',ui-monospace,monospace !important; font-size: 10px !important; color: #8a7a52 !important;
  letter-spacing: .04em;
}
body.fm-mobile #fm-guest-bar > span { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.fm-mobile #fm-guest-bar > button {
  flex: 0 0 auto; height: 26px; padding: 0 10px !important; border: 0 !important; border-radius: 4px !important;
  background: var(--hs-cap) !important; color: var(--hs-amb) !important; box-shadow: 0 2px 0 #060706,0 3px 4px rgba(0,0,0,.5) !important;
  font-family: 'Share Tech Mono',ui-monospace,monospace !important; font-size: 10px !important; letter-spacing: .06em;
}
body.fm-mobile #fm-guest-bar > button:first-of-type { background: linear-gradient(#46e07a,#1f9a48) !important; color: #021006 !important; }
body.fm-mobile:has(#fm-guest-bar) .grid { bottom: calc(var(--fm-nav) + 36px); }
body.fm-mobile:has(#fm-guest-bar)[data-fmv="market"] #marketTab > .row.fm-sheet { bottom: calc(var(--fm-nav) + 36px); }
/* The day-trade count (trade-limit.js appends it to the order row): a small
   readout on the sheet's top edge, opposite the grab bar. */
body.fm-mobile[data-fmv="market"] .fm-sheet #dayTradeBadge {
  position: absolute; top: 3px; right: 12px; margin: 0 !important;
  font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 9px; letter-spacing: .06em; color: #8a7a52; opacity: 1;
}
body.fm-mobile[data-fmv="market"] .fm-sheet #dayTradeBadge.dt-exhausted { color: #ff8a6a; }
body.fm-mobile[data-fmv="market"] .fm-sheet { padding-top: 18px !important; }

/* The Support submenu inside the drawer: the same keys as the rest of it. */
body.fm-mobile #fm-support-wrap > div > a,
body.fm-mobile #fm-support-wrap > div > button,
body.fm-mobile #fm-support-wrap > div > span {
  display: flex !important; align-items: center; min-height: 38px; margin: 0 0 8px !important; padding: 0 12px !important;
  border: 0 !important; border-radius: 5px !important; background: var(--hs-cap) !important; color: #e2d8c0 !important;
  box-shadow: var(--hs-cap-sh) !important; text-decoration: none !important;
  font-family: 'Share Tech Mono',ui-monospace,monospace !important; font-size: 12px !important; letter-spacing: .08em;
}
body.fm-mobile #fm-support-wrap > div > :last-child { color: #ff8a6a !important; }
body.fm-mobile #fm-header-user #fm-header-name {
  font-family: 'Doto','Share Tech Mono',ui-monospace,monospace; font-weight: 700; letter-spacing: .1em; color: var(--amber,#f0b454);
}

/* ── Contacts on a phone, as a modal: only when the deck never built
   (since 1.11.9.123 the directory normally sits on the chat CRT, #fmdLine).
   Dressed as the same directory either way. */
body.fm-mobile #fmcontactsOverlay:not(.fmc-docked) { background: rgba(2,4,2,.92); align-items: stretch; padding: 10px; box-sizing: border-box; }
body.fm-mobile .fmc-contacts {
  width: 100%; max-height: none; border: 0; border-radius: 12px/14px;
  background: radial-gradient(ellipse at 50% 30%,#0a1a0e 0%,#05100a 65%,#020805 100%);
  box-shadow: inset 0 0 30px rgba(0,0,0,.9),0 0 0 2px #000,0 0 0 6px #121612,0 0 0 7px #2c332c;
}
body.fm-mobile .fmc-chead { background: linear-gradient(#071209 70%,transparent); border: 0; border-bottom: 1px dashed rgba(124,240,164,.28); }
body.fm-mobile .fmc-ctitle { font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 14px; background: #7cf0a4; color: #021006; padding: 1px 6px; }
body.fm-mobile .fmc-contacts .fmv-sec { background: transparent; border: 0; }
body.fm-mobile .fmc-contacts .fmv-h { font-family: 'Share Tech Mono',ui-monospace,monospace; color: #f5c26a; }
body.fm-mobile .fmc-card { align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px dotted rgba(124,240,164,.18); }
body.fm-mobile .fmc-cav { width: 40px; height: 40px; border-radius: 3px; border-width: 1px; }
body.fm-mobile .fmc-cblurb { display: none; }
body.fm-mobile .fmc-cname { font-size: 14px; color: #c8f4d6; }
body.fm-mobile .fmc-crole { font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 10px; }
body.fm-mobile .fmc-callbtn { border-color: rgba(245,194,106,.6); color: #f5c26a; padding: 8px 12px; }
body.fm-mobile .fmc-contacts .fmv-btn { padding: 7px 10px; }

/* ══ THE TICKET (1.11.9.97) ═════════════════════════════════════════════════
   MARKET opens on the ticker list; a tap opens that stock's ticket. The list
   and the ticket are sized for reading at arm's length: names and prices at
   15-17px instead of the desktop's 11-12px, one row per 60px touch target. */

/* The list: search and book switch at full touch height. */
body.fm-mobile[data-fmv="list"] #search { height: 44px; font-size: 15px; }
body.fm-mobile[data-fmv="list"] #marketViewTabs .mv-tab { height: 40px; font-size: 12px; }
body.fm-mobile[data-fmv="list"] #marketViewTabs .mv-theme { width: 28px; }
body.fm-mobile[data-fmv="list"] #tickers .ticker.tk {
  grid-template-columns: minmax(0,1fr) 52px auto 22px;
  grid-template-areas: "sym spark px star" "name spark px star" "lore lore lore lore";
  min-height: 60px; padding: 8px 10px; column-gap: 10px; row-gap: 2px; align-items: center;
  border-bottom: 1px solid #142016;
}
body.fm-mobile[data-fmv="list"] #tickers .tk .sym { font-size: 16px; font-weight: 700; letter-spacing: .05em; align-self: end; }
body.fm-mobile[data-fmv="list"] #tickers .tk .tk-name { font-size: 12px; opacity: .7; align-self: start; }
body.fm-mobile[data-fmv="list"] #tickers .tk .tk-spark { width: 52px; height: 22px; }
body.fm-mobile[data-fmv="list"] #tickers .tk .px,
body.fm-mobile[data-fmv="list"] #tickers .tk.active .px { font-size: 15px; font-weight: 600; }
body.fm-mobile[data-fmv="list"] #tickers .tk .tk-pct { font-size: 12px; margin-top: 2px; padding: 1px 5px; border-radius: 2px; }
body.fm-mobile[data-fmv="list"] #tickers .tk .tk-pct.up { background: #0f3a1d; }
body.fm-mobile[data-fmv="list"] #tickers .tk .tk-pct.dn { background: #3a0f0f; }
body.fm-mobile[data-fmv="list"] #news .news-line { font-size: 14px; line-height: 1.45; padding: 6px 0; }

/* The ticket head: what you are trading and what it costs, before anything else. */
#fmStockHead { display: none; }
body.fm-mobile[data-fmv="market"] #fmStockHead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 4px 2px 12px; margin-bottom: 10px; border-bottom: 1px solid #1d2a1f;
}
body.fm-mobile #fmStockHead .fsh-id { min-width: 0; }
body.fm-mobile #fmStockHead .fsh-sym {
  font-family: 'Doto','Share Tech Mono',ui-monospace,monospace; font-weight: 700;
  font-size: 22px; letter-spacing: .12em; color: var(--hs-amb); line-height: 1;
}
body.fm-mobile #fmStockHead .fsh-name { margin-top: 4px; font-size: 12px; color: var(--muted); opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.fm-mobile #fmStockHead .fsh-q { text-align: right; flex: 0 0 auto; }
body.fm-mobile #fmStockHead .fsh-px {
  font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 30px; line-height: 1;
  color: #d4ffe2; font-variant-numeric: tabular-nums; text-shadow: 0 0 8px var(--hs-glow);
}
body.fm-mobile #fmStockHead .fsh-pct { margin-top: 4px; font-size: 13px; }
body.fm-mobile #fmStockHead .fsh-pct.up { color: #7dffa6; }
body.fm-mobile #fmStockHead .fsh-pct.dn { color: #ff8a8a; }
body.fm-mobile #fmStockHead .fsh-pct.fl { color: var(--muted); }

/* Under the chart: positions first, limit orders folded, the XP bar gone
   (it is on the profile and in the drawer). */
body.fm-mobile[data-fmv="market"] #xp-bar-wrap { display: none !important; }
#fmLimitToggle { display: none; }
body.fm-mobile[data-fmv="market"] #fmLimitToggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  height: 44px; margin-top: 10px; padding: 0 12px; border: 0; border-radius: 4px;
  background: var(--hs-cap); box-shadow: var(--hs-cap-sh); color: var(--hs-amb);
  font-family: 'Share Tech Mono',ui-monospace,monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
}
body.fm-mobile[data-fmv="market"] #fmLimitToggle .fml-chev { transition: transform .15s; }
body.fm-mobile.fm-limit-open[data-fmv="market"] #fmLimitToggle .fml-chev { transform: rotate(90deg); }
body.fm-mobile[data-fmv="market"]:not(.fm-limit-open) #marketTab #limitPanel { display: none !important; }
body.fm-mobile[data-fmv="market"] #marketTab #limitPanel .input { height: 40px; font-size: 14px; }
body.fm-mobile[data-fmv="market"] #marketTab .pos-h { font-size: 12px !important; opacity: .7 !important; margin-top: 14px !important; }
body.fm-mobile[data-fmv="market"] #positions .pos-row { font-size: 14px; padding: 6px 0; border-bottom: 1px solid #142016; }
body.fm-mobile[data-fmv="market"] #tradeFeedPanel { font-size: 12px; }

/* Four keys now, so each gets room for a readable legend. */
body.fm-mobile #fmNav button { font-size: 10.5px; }

/* ══ STATION AND THE CASINO KEY (1.11.9.122) ════════════════════════════════
   Five keys on the nav: Market, Comms, Casino, Wallet, Station. The casino key
   is the desktop header button's slot reels on a keycap, a little wider than
   the rest. The More grid becomes Station: four keys a row, every system the
   phone can reach, including the header tools that had no way in. */
body.fm-mobile #fmNav { gap: 6px; }
body.fm-mobile #fmNav button[data-fmv="casino"] { flex: 1.25 1 0; }
body.fm-mobile #fmNav button[data-fmv="casino"]:not(.on) {
  background: #010401; box-shadow: 0 3px 0 #060706, 0 5px 5px rgba(0,0,0,.55), inset 0 0 0 1px #2a3a2e, 0 0 12px rgba(66,255,126,.10);
}
body.fm-mobile #fmNav .fmn-reels { display: flex; gap: 2px; font-size: 11px; line-height: 17px; }
body.fm-mobile #fmNav .fmn-reels i {
  display: block; width: 11px; height: 17px; border-radius: 2px; background: #000; border: 1px solid #3a3020;
  color: #ffce4d; font-style: normal; text-align: center; font-family: 'Doto','Share Tech Mono',monospace; font-weight: 700;
  text-shadow: 0 0 5px rgba(255,206,77,.7);
}
body.fm-mobile #fmNav button[data-fmv="casino"].on .fmn-reels i { border-color: #6a4a12; }
@media (max-width: 360px) { body.fm-mobile #fmNav .fmn-reels i { width: 9px; font-size: 10px; } }

body.fm-mobile .fm-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
body.fm-mobile .fm-grid4 .fm-tile { height: 68px; gap: 6px; padding: 4px 2px; }
body.fm-mobile .fm-grid4 .fm-tile .ic svg { width: 21px; height: 21px; }
body.fm-mobile .fm-grid4 .fm-tile .lb { font-size: 9px; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
body.fm-mobile .fm-grid4 .fm-tile .lk { font-size: 7px; }
/* Section heads, shared by Station and the lobby: a green lamp and a rule. */
body.fm-mobile .fm-sect-t {
  font-family: 'Doto','Share Tech Mono',ui-monospace,monospace; font-weight: 700; font-size: 12px; letter-spacing: .16em;
  color: var(--hs-amb); opacity: 1; display: flex; align-items: center; gap: 8px; margin: 14px 2px 8px; text-transform: uppercase;
}
body.fm-mobile .fm-sect-t::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex: 0 0 auto; background: var(--hs-ph); box-shadow: 0 0 5px var(--hs-ph); }
body.fm-mobile .fm-sect-t::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg,rgba(240,180,84,.25),transparent); }
body.fm-mobile #fmMore .fm-sect-t:first-child, body.fm-mobile #fmCasinoLobby .fm-sect-t:first-child { margin-top: 4px; }

/* ── The casino lobby, racked like the Gaming Deck ─────────────────────── */
body.fm-mobile #fmCasinoLobby .fm-tile .ic { filter: none; color: var(--hs-amb); }
body.fm-mobile #fmCasinoLobby .fmc-note { font-size: 9.5px; letter-spacing: .14em; color: #7d8f80; margin: -2px 2px 8px; }
body.fm-mobile #fmCasinoLobby .fmc-live { height: 92px; background: #010401; box-shadow: 0 3px 0 #060706, 0 5px 5px rgba(0,0,0,.55), inset 0 0 0 1px #1d261f; }
body.fm-mobile #fmCasinoLobby .fmc-cd {
  font-family: 'Doto','Share Tech Mono',monospace; font-weight: 700; font-size: 17px; line-height: 1; letter-spacing: .04em;
  color: var(--hs-ph); text-shadow: 0 0 7px var(--hs-glow); min-height: 17px;
}
body.fm-mobile #fmCasinoLobby .fmc-cd.now { color: #ffce4d; text-shadow: 0 0 7px rgba(255,206,77,.6); }
body.fm-mobile #fmCasinoLobby .fmc-foot { margin-top: 14px; }
body.fm-mobile #fmCasinoLobby .fmc-wide { height: 48px; flex-direction: row; gap: 10px; }
body.fm-mobile #fmCasinoLobby .fmc-wide .ic svg { width: 18px; height: 18px; }

/* ── Header tools opened from Station ─────────────────────────────────────
   Their windows are positioned and dragged for a desktop (inline left/top),
   and sit at z 9100-9150, under the 9991+ phone chrome. On a phone they are
   pinned between the top bar and the nav, full width, and their own close
   control stays the way out. */
body.fm-mobile #fmDecWin, body.fm-mobile #fmLedgerWin, body.fm-mobile #fmRadioWin {
  left: 6px !important; right: 6px !important; top: calc(var(--fm-top) + 6px) !important; bottom: auto !important;
  width: auto !important; max-width: none !important;
  max-height: calc(100% - var(--fm-top) - var(--fm-nav) - 12px) !important; overflow: auto;
}
body.fm-mobile #fmCalcWin {
  left: 50% !important; top: calc(var(--fm-top) + 12px) !important; transform: translateX(-50%);
}
body.fm-mobile #fmLib { top: var(--fm-top) !important; bottom: var(--fm-nav) !important; }
body.fm-mobile #fmLibWin { width: 100% !important; height: 100% !important; border: 0; }

/* ══ CALLS ON THE CHAT CRT (1.11.9.123) ═════════════════════════════════════
   chat-deck.js hands codec.js and voice.js the deck's line screen and call
   strip on phones too, so the directory, a DM, a faction call and a voice call
   sit on the chat screen instead of a modal over the page. The line screen
   takes the CRT's place while it is lit (data-deck="line"); the call strip
   sits above whichever screen is up and pushes it down while a call is on. */
body.fm-mobile[data-fmv="chat"] { --fm-dockh: 0px; }
body.fm-mobile[data-fmv="chat"] #rightPanel.fmd-call { --fm-dockh: 132px; }
body.fm-mobile[data-fmv="chat"] #chatBox { top: calc(10px + var(--fm-dockh)) !important; }
body.fm-mobile #rightPanel > #fmdLine, body.fm-mobile #rightPanel > #fmdDock { display: none; }
body.fm-mobile[data-fmv="chat"] #rightPanel[data-deck="line"] > #chatBox { display: none !important; }
body.fm-mobile[data-fmv="chat"] #rightPanel[data-deck="line"] > #fmdLine:not(.fm-hide) {
  display: block; position: absolute; left: 12px; right: 12px;
  top: calc(10px + var(--fm-dockh)); bottom: calc(var(--fm-deck) + 8px);
  overflow: hidden; border-radius: 10px/12px; color: var(--hs-ph);
  background: radial-gradient(ellipse at 50% 45%,#0a1a0e 0%,#05100a 65%,#020805 100%);
  box-shadow: inset 0 0 30px rgba(0,0,0,.9),0 0 0 2px #000,0 0 0 6px #121612,0 0 0 7px #2c332c;
}
body.fm-mobile[data-fmv="chat"] #rightPanel > #fmdLine::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(0deg,rgba(0,0,0,.22) 0 1px,transparent 1px 3px);
}
/* Touch sizes on the line screen. */
body.fm-mobile #fmdLine .fmc-card { padding: 10px 0; }
body.fm-mobile #fmdLine .fmv-row { padding: 9px 0; }
body.fm-mobile #fmdLine .fmv-btn, body.fm-mobile #fmdLine .fmc-callbtn { min-height: 34px; padding: 4px 10px; font-size: 12px; }
body.fm-mobile #fmdLine .fmc-x { min-height: 34px; padding: 0 8px; }
body.fm-mobile #fmdLine .fmv-add input, body.fm-mobile #fmdLine #fmvDmIn { font-size: 16px !important; }
body.fm-mobile #fmdLine .fmc-stage { grid-template-columns: 1fr 64px; }
body.fm-mobile #fmdLine .fmc-ctl button { min-height: 40px; }
body.fm-mobile #fmdLine .fmc-ctl button.fmc-opt { min-height: 40px; text-align: left; }
/* The call strip. */
body.fm-mobile[data-fmv="chat"] #rightPanel.fmd-call > #fmdDock:not(.fm-hide) {
  display: block; position: absolute; left: 12px; right: 12px; top: 6px; height: 128px; overflow: hidden;
}
body.fm-mobile #fmdDock .fmc-ctl button { height: 32px; font-size: 11px; }

/* The chat key pulses green while a call rings, whatever view is up. */
@keyframes fmRingKey { 0%,100% { box-shadow: 0 3px 0 #04100a,0 5px 5px rgba(0,0,0,.55),0 0 6px rgba(66,255,126,.25); }
                       50% { box-shadow: 0 3px 0 #04100a,0 5px 5px rgba(0,0,0,.55),0 0 18px rgba(66,255,126,.85); } }
body.fm-mobile #fmNav button[data-fmv="chat"].ring:not(.on) { animation: fmRingKey 1s ease-in-out infinite; color: #b8ffd0; }
/* The ring bar: off the chat view, under the top bar, one tap to the call. */
#fmRing { display: none; }
body.fm-mobile.fm-ringing #fmRing {
  display: flex; align-items: center; gap: 10px; position: fixed; z-index: 9993; left: 8px; right: 8px;
  top: calc(var(--fm-top) + 6px); height: 46px; padding: 0 8px 0 12px; border: 0; border-radius: 6px;
  background: linear-gradient(#1d3a26,#10241a); color: #b8ffd0; font-family: 'Share Tech Mono',ui-monospace,monospace;
  box-shadow: 0 0 0 1px #2a6a3e,0 6px 16px rgba(0,0,0,.7),0 0 18px rgba(66,255,126,.35); text-align: left;
}
body.fm-mobile.fm-ringing #fmRing .fmr-ic { display: flex; color: #42ff7e; animation: fmRingIc .5s steps(2) infinite; }
@keyframes fmRingIc { 50% { opacity: .35; } }
body.fm-mobile.fm-ringing #fmRing .fmr-t { flex: 1; min-width: 0; font-size: 13px; letter-spacing: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.fm-mobile.fm-ringing #fmRing .fmr-go {
  flex: 0 0 auto; height: 32px; line-height: 32px; padding: 0 12px; border-radius: 4px; font-size: 11px; letter-spacing: .12em;
  background: linear-gradient(#46e07a,#1f9a48); color: #021006; box-shadow: 0 2px 0 #0a3a1a;
}
@media (prefers-reduced-motion: reduce) {
  body.fm-mobile #fmNav button[data-fmv="chat"].ring:not(.on), body.fm-mobile.fm-ringing #fmRing .fmr-ic { animation: none; }
}

/* ── The casino chip (1.11.9.123): a game left running, one tap back. ───── */
#fmChip { display: none; }
body.fm-mobile.fm-chip #fmChip {
  display: flex; align-items: center; gap: 9px; position: fixed; z-index: 9990; left: 12px; right: 12px;
  bottom: calc(var(--fm-nav) + 8px + var(--fm-chip-lift, 0px)); height: 44px; padding: 0 6px 0 10px; box-sizing: border-box;
  border-radius: 22px; background: #010401; border: 1px solid #f0b454; font-family: 'Share Tech Mono',ui-monospace,monospace;
  box-shadow: 0 0 16px rgba(240,180,84,.28), 0 6px 14px rgba(0,0,0,.7);
}
body.fm-mobile.fm-chip.fm-kbd #fmChip, body.fm-mobile.fm-chip.fm-drawer #fmChip { display: none; }
body.fm-mobile #fmChip .fmn-reels { display: flex; gap: 2px; font-size: 11px; line-height: 17px; }
body.fm-mobile #fmChip .fmn-reels i {
  display: block; width: 11px; height: 17px; border-radius: 2px; background: #000; border: 1px solid #3a3020;
  color: #ffce4d; font-style: normal; text-align: center; font-family: 'Doto','Share Tech Mono',monospace; font-weight: 700;
}
body.fm-mobile #fmChip .fmcp-t {
  flex: 1; min-width: 0; font-family: 'Doto','Share Tech Mono',monospace; font-weight: 700; font-size: 13px; letter-spacing: .08em;
  color: var(--hs-amb); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.fm-mobile #fmChip .fmcp-go {
  height: 32px; padding: 0 12px; border: 0; border-radius: 16px; font-family: inherit; font-size: 11px; letter-spacing: .12em;
  background: var(--hs-lit); color: #1a0f02; box-shadow: 0 2px 0 #4a3010;
}
body.fm-mobile #fmChip .fmcp-x {
  width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #7d8f80; font-size: 14px;
}
