/* ==========================================================================
   confetti_  —  simple.css
   Confetti Simple: the phone view built by simple.js (the owner, 2026-11-11:
   "much simpler and easier to get going"). Since 2026-11-12 a desktop gets
   the same phone screen, centred (block at the end); nothing here reaches
   the Pro view: every rule hangs on data-mode="simple" or an .sm- class. Simple has one look,
   the cream paper of the owner's mockups ("i wanted it to look like that"):
   set below, once, for Simple and for every sheet opened from it. One
   spacing scale: 4 8 12 16 24 32.
   ========================================================================== */

@media screen {

  /* ---- which view shows --------------------------------------------------
     <html data-mode="simple"> (simple-boot.js, then simple.js): the Simple
     shell, and the Pro page out of the way. Without the attribute the page
     is exactly Pro. */
  html[data-mode="simple"] #smRoot { display: flex !important; }
  html[data-mode="simple"] body.trade > #siteHeader,
  html[data-mode="simple"] body.trade > .pts-bar,
  html[data-mode="simple"] body.trade > .demo-bar,
  html[data-mode="simple"] body.trade > main,
  html[data-mode="simple"] body.trade > #mobileBar,
  html[data-mode="simple"] body.trade > #sheetScrim,
  html[data-mode="simple"] body.trade > .setup-ph,
  html[data-mode="simple"] body.trade > .setup-card,
  html[data-mode="simple"] body.trade > .setup-dim,
  html[data-mode="simple"] body.trade > .setup-ring { display: none !important; }
  html[data-mode="simple"] body.trade { overflow: hidden; }
  /* a Pro sheet opened from Simple (a trade's auto-close): its fields and buttons are 44 px tall like Simple's own */
  html[data-mode="simple"] dialog.ph-sheet .input, html[data-mode="simple"] dialog.ph-sheet .ph-btn { min-height: 44px; }
  /* Pro's points toasts say things in Pro's words: not over Simple */
  html[data-mode="simple"] .pts-toasts { display: none !important; }
  /* the old three-column desktop body (still in the page, not used): hidden */
  .sm-body { display: none !important; }

  /* ---- the one look -------------------------------------------------------
     While Simple is on screen the page wears the paper theme, whatever theme
     the Pro page is in and whatever the phone's own light / dark setting is.
     The tokens are set on <body>, not on <html>: everything drawn (Simple,
     its sheets, the Pro sheets it opens, toasts) takes them, while the
     page's scripts, which read the tokens from <html>, keep drawing Pro in
     Pro's own colours, so "Pro view" is exactly today's page. */
  html[data-mode="simple"] body {
    --page: #f4ecd8; --panel: #f4ecd8; --raised: #faf6ed; --sunken: #e8dec8;
    --ink: #2a2520; --ink-muted: #5f564b; --ink-faint: #7a7060;
    --rule: #d4cbba; --rule-strong: #b8ad92;
    --pos: #2e7a4c; --neg: #b44855; --accent: #8b2020;
    --pos-soft: rgba(46, 122, 76, 0.12); --neg-soft: rgba(180, 72, 85, 0.12); --accent-soft: rgba(139, 32, 32, 0.10);
    --dot: rgba(42, 37, 32, 0.09);
    --warn: #9a6400; --warn-soft: rgba(154, 100, 0, 0.12);
    --close: #2a2520; --close-ink: #faf6ed;      /* a Pro sheet's Close is a main button here: black, like Simple's own */
    --field-line: initial;
    --slider-track: linear-gradient(90deg, var(--pos), var(--ink-muted), var(--neg));
    --focus: 0 0 0 2px var(--page), 0 0 0 4px var(--accent);
    color-scheme: light;
  }
  /* every sheet over Simple dims the page the same way (Pro's own: the modals, the phone sheets, the wallet chooser) */
  html[data-mode="simple"] .modal::backdrop, html[data-mode="simple"] dialog.ph-sheet::backdrop,
  html[data-mode="simple"] dialog[aria-label="Choose a wallet"]::backdrop { background: rgba(42, 37, 32, 0.45); }

  /* ---- tokens --------------------------------------------------------------- */
  .sm-root, .sm-sheet {
    --sm-up-bg: #9fd9bc; --sm-up-ink: #123b26;
    --sm-dn-bg: #f1aab8; --sm-dn-ink: #4a1520;
    --sm-go-ink: #fff;
    --sm-pos-t: #27693f; --sm-neg-t: #a33d4a;      /* --pos / --neg as small text: 4.5:1 on the paper surfaces */
    --sm-edge: #8a7f66;                            /* a control's edge: 3:1 on page and raised */
    --sm-pad: 16px;
    font-family: var(--font-ui); font-size: 17px; line-height: 1.4; color: var(--ink);
    font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent;
  }
  .sm-root *, .sm-sheet * { box-sizing: border-box; }
  .sm-root [hidden], .sm-sheet [hidden] { display: none !important; }
  .sm-root button, .sm-sheet button, .sm-root a, .sm-sheet a { touch-action: manipulation; }
  :where(.sm-root, .sm-sheet) button {
    -webkit-appearance: none; appearance: none; margin: 0; border-radius: 0; font: inherit; color: inherit;
    background: none; border: 0; padding: 0; cursor: pointer; -webkit-user-select: none; user-select: none;
  }
  .sm-root :focus-visible, .sm-sheet :focus-visible { outline: none; box-shadow: var(--focus); }
  .sm-sheet h2:focus, .sm-sheet h2:focus-visible { outline: none; box-shadow: none; }
  .sm-up { color: var(--sm-pos-t); } .sm-dn { color: var(--sm-neg-t); } .sm-mute { color: var(--ink-muted); }

  /* ---- the shell ------------------------------------------------------------ */
  .sm-root {
    display: none; position: fixed; inset: 0; z-index: 40; flex-direction: column;      /* inset alone: the visible height, also where 100dvh is unknown */
    background-color: var(--page);
    background-image: radial-gradient(var(--dot) 1px, transparent 1.3px); background-size: 14px 14px;
  }
  .sm-top {
    flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--sm-pad) 0;
    border-bottom: 1px solid var(--rule);
  }
  .sm-logo { font-family: var(--font-brand); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
  .sm-logo i { font-style: normal; }
  .sm-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-left: -12px; padding-right: 8px; font-size: 17px; font-weight: 600; }
  .sm-back .sm-arr { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; line-height: 1; }
  .sm-top-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .sm-chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px; font-size: 14px; font-weight: 500; white-space: nowrap;
  }
  .sm-chip > span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--sm-edge); background: var(--raised); }
  .sm-chip:active > span { background: var(--sunken); }
  .sm-chip .sm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); flex: none; }
  .sm-chip.is-off .sm-dot { background: var(--ink-faint); }
  .sm-chip b { font-weight: 600; }
  /* House chip: green border, links to house.html */
  .sm-house {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; color: var(--ink);
  }
  .sm-house > span {
    display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; border: 1px solid var(--pos); background: var(--raised);
  }
  .sm-house:active > span { background: var(--sunken); }
  .sm-house b { font-weight: 600; color: var(--sm-pos-t); }
  .sm-house i { font-style: normal; font-size: 12px; color: var(--ink-muted); }
  .sm-house i:not(:empty)::before { content: '· '; }
  .sm-house i:empty { display: none; }
  /* phones: the 24h volume sits under the house LP, so the front page shows both (owner 11/13: "im not seeing the
     24 hour volume house LP or any of that on the front page") */
  @media (max-width: 480px) {
    .sm-house > span { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; height: auto; min-height: 34px; padding: 2px 8px; line-height: 1.15; }
    .sm-house i { font-size: 10.5px; }
    .sm-house i:not(:empty)::before { content: none; }
  }

  .sm-main { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 20px var(--sm-pad) 32px; }
  .sm-root.no-cta .sm-main { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }      /* no bar: room above the home bar */
  .sm-main.is-fit { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 12px; }
  .sm-cta { flex: none; position: relative; z-index: 1; padding: 12px var(--sm-pad) calc(12px + env(safe-area-inset-bottom)); display: grid; gap: 10px; background-color: var(--page); transition: box-shadow 150ms ease-out; }
  /* more of the list below: the bar shows its edge */
  .sm-root.is-more .sm-cta { box-shadow: 0 -1px 0 var(--rule), 0 -12px 16px -12px rgba(42, 37, 32, 0.28); }
  .sm-cta:empty { display: none; }
  .sm-cta.is-two { grid-template-columns: 1fr 1fr; }

  /* ---- type ------------------------------------------------------------------- */
  .sm-label { font-size: 13px; line-height: 1.3; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
  .sm-big { font-family: var(--font-brand); font-weight: 700; font-size: 52px; line-height: 1.05; letter-spacing: -0.02em; margin: 6px 0 4px; min-height: 55px; }
  .sm-big.is-mid { font-size: 44px; min-height: 47px; }
  .sm-big.is-long { font-size: 40px; } .sm-big.is-longer { font-size: 32px; }
  .sm-mid { font-size: 17px; line-height: 1.45; color: var(--ink-muted); margin: 8px 0 0; }
  .sm-mid b { color: var(--ink); font-weight: 600; }
  .sm-fine { font-size: 14px; line-height: 1.4; color: var(--ink-muted); margin: 12px 0 0; }
  .sm-main > .sm-fine:first-child { margin: 0 0 12px; }
  .sm-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-strong); }
  .sm-links { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 2px; min-height: 44px; }
  .sm-quiet { display: flex; justify-content: center; width: 100%; min-height: 44px; align-items: center; margin-top: 8px; font-size: 14px; color: var(--ink-muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-strong); }

  /* ---- buttons: the site's square corners and brackets --------------------------- */
  .sm-btn {
    display: flex; align-items: center; justify-content: center; width: 100%; height: 56px; padding: 0 12px;
    border: 1px solid var(--ink); font-size: 18px; font-weight: 600; line-height: 1.15; text-align: center;
    transition: transform 80ms ease-out, filter 80ms ease-out;
  }
  .sm-btn::before { content: "[\00a0"; opacity: 0.55; } .sm-btn::after { content: "\00a0]"; opacity: 0.55; }
  .sm-btn:active { transform: translateY(1px); filter: brightness(0.9); }
  .sm-btn.is-primary { background: var(--ink); color: var(--page); }
  .sm-btn.is-ghost { height: 48px; border-color: var(--sm-edge); font-size: 16px; }
  .sm-btn.is-up { background: var(--pos); border-color: var(--pos); color: var(--sm-go-ink); }
  .sm-btn.is-dn { background: var(--neg); border-color: var(--neg); color: var(--sm-go-ink); }
  .sm-btn[disabled] { opacity: 0.5; cursor: default; }
  .sm-btn.is-busy { opacity: 1; background: var(--ink-muted); border-color: var(--ink-muted); color: var(--page); }
  .sm-btn.is-up.is-busy { background: var(--pos); border-color: var(--pos); color: var(--sm-go-ink); filter: saturate(0.55); }
  .sm-btn.is-dn.is-busy { background: var(--neg); border-color: var(--neg); color: var(--sm-go-ink); filter: saturate(0.55); }
  .sm-btn[disabled]:active, .sm-btn.is-busy:active { transform: none; }
  /* Apple Pay: the words in a plain black button (MoonPay's checkout; no Apple artwork) */
  .sm-btn.is-apple { background: #000; color: #fff; border-color: #000; border-radius: 8px; font: 500 19px/1 -apple-system, "SF Pro Text", system-ui, sans-serif; }
  .sm-btn.is-apple::before, .sm-btn.is-apple::after { content: none; }
  /* Place trade: always green, two-line text */
  .sm-btn.is-go { flex-direction: column; height: 64px; background: var(--pos); border-color: var(--pos); color: var(--sm-go-ink); }
  .sm-btn.is-go::before, .sm-btn.is-go::after { content: none; }
  .sm-btn.is-go i { font-style: normal; font-size: 13px; font-weight: 500; opacity: 0.85; margin-top: 2px; }
  .sm-btn.is-go.is-busy { filter: saturate(0.55); }
  /* Up / Down: two 64 px buttons side by side */
  .sm-dir { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 64px; font-size: 20px; font-weight: 700; line-height: 1.1; transition: transform 80ms ease-out, filter 80ms ease-out; }
  .sm-dir i { font-style: normal; font-size: 13px; font-weight: 500; opacity: 0.85; margin-top: 3px; }
  .sm-dir:active { transform: translateY(1px); filter: brightness(0.92); }
  .sm-dir.is-up { background: var(--sm-up-bg); color: var(--sm-up-ink); }
  .sm-dir.is-dn { background: var(--sm-dn-bg); color: var(--sm-dn-ink); }

  /* ---- Home ----------------------------------------------------------------------- */
  .sm-sec { margin-top: 24px; }
  .sm-rows { margin-top: 4px; }
  .sm-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 50px; padding: 4px 0; border-bottom: 1px solid var(--rule); text-align: left; }
  .sm-row:active { background: var(--raised); }
  .sm-row .sm-tk { flex: 0 0 68px; min-width: 0; }
  .sm-row .sm-tk b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
  .sm-row .sm-tk i { display: block; font-style: normal; font-size: 11px; line-height: 1.2; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Long tickers (8+ chars) get smaller font */
  .sm-row .sm-tk b.is-long { font-size: 12px; }
  .sm-spk { flex: 0 0 40px; width: 40px; height: 24px; }
  .sm-spk polyline { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
  .sm-row .sm-pr { flex: 1 1 auto; min-width: 0; text-align: right; }
  .sm-row .sm-pr b { display: block; font-size: 13px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
  .sm-row .sm-pr i { display: block; font-style: normal; font-size: 11px; font-weight: 500; line-height: 1.2; white-space: nowrap; min-height: 14px; }
  /* Green "Place trade" button in coin rows - fixed width for alignment */
  .sm-trade {
    flex: 0 0 76px; width: 76px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: var(--pos); color: var(--sm-go-ink);
    font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
    border-radius: 16px; transition: transform 80ms ease-out, filter 80ms ease-out;
  }
  .sm-trade:active { transform: scale(0.97); filter: brightness(0.92); }
  .sm-trade .sm-trade-long { display: none; }
  .sm-trade .sm-trade-short { display: inline; }
  /* Narrow phones (below 375px): tighter layout */
  @media (max-width: 374px) {
    .sm-row .sm-tk { flex: 0 0 60px; }
    .sm-row .sm-tk b { font-size: 13px; }
    .sm-row .sm-tk b.is-long { font-size: 11px; }
    .sm-spk { flex: 0 0 36px; width: 36px; }
    .sm-row .sm-pr b { font-size: 12px; }
    .sm-row .sm-pr i { font-size: 10px; }
    .sm-trade { flex: 0 0 68px; width: 68px; font-size: 11px; }
  }
  /* Wide phones (430px+): roomier layout */
  @media (min-width: 430px) {
    .sm-row { min-height: 56px; gap: 10px; }
    .sm-row .sm-tk { flex: 0 0 80px; }
    .sm-spk { flex: 0 0 56px; width: 56px; }
    .sm-trade { flex: 0 0 90px; width: 90px; height: 36px; font-size: 13px; border-radius: 18px; }
  }
  .sm-row.is-pos .sm-tk { flex: 1 1 auto; }
  .sm-row.is-pos .sm-tk b { flex-wrap: wrap; row-gap: 3px; }   /* a long name never cuts the Up / Down badge: it drops under the name */
  .sm-row.is-pos .sm-pr { flex: 0 0 auto; }
  .sm-row.is-pos .sm-pr b { font-weight: 600; }
  .sm-tick-up { animation: sm-tick-up 500ms ease-out; } .sm-tick-dn { animation: sm-tick-dn 500ms ease-out; }
  @keyframes sm-tick-up { from { color: var(--sm-pos-t); } } @keyframes sm-tick-dn { from { color: var(--sm-neg-t); } }
  .sm-skel i { display: block; height: 44px; border-bottom: 1px solid var(--rule); }
  .sm-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
  .sm-pill.is-up { background: var(--pos-soft); color: var(--sm-pos-t); } .sm-pill.is-dn { background: var(--neg-soft); color: var(--sm-neg-t); }
  /* a card on Home: money on its way, a result */
  .sm-note { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; margin-top: 16px; padding: 10px 14px; border: 1px solid var(--rule-strong); background: var(--raised); text-align: left; }
  .sm-note .sm-t { flex: 1; min-width: 0; } .sm-note b { display: block; font-size: 16px; font-weight: 600; } .sm-note i { display: block; font-style: normal; font-size: 14px; color: var(--ink-muted); }
  .sm-note .sm-chev { font-size: 22px; color: var(--ink-faint); }
  .sm-spin { display: block; width: 22px; height: 22px; flex: none; border: 2px solid var(--rule); border-top-color: var(--ink); border-radius: 50%; animation: sm-spin 900ms linear infinite; }
  .sm-spin.is-big { width: 44px; height: 44px; border-width: 3px; }
  @keyframes sm-spin { to { transform: rotate(360deg); } }

  /* ---- the coin --------------------------------------------------------------------- */
  .sm-cname { font-size: 15px; color: var(--ink-muted); line-height: 1.3; min-height: 20px; }
  .sm-cbar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-height: 46px; }
  .sm-price { font-family: var(--font-brand); font-weight: 700; font-size: 40px; line-height: 1.12; letter-spacing: -0.02em; white-space: nowrap; }
  .sm-price.is-long { font-size: 33px; }
  .sm-chg { font-size: 16px; font-weight: 600; white-space: nowrap; min-height: 22px; }
  .sm-stats { font-size: 13px; line-height: 1.4; color: var(--ink-muted); margin: 4px 0 2px; min-height: 18px; }
  .sm-chart { flex: 1 1 auto; min-height: 200px; margin: 14px 0 10px; border: 1px solid var(--rule-strong); background: var(--raised); position: relative; box-shadow: inset 0 1px 3px rgba(0,0,0,0.04); }
  .sm-chart svg { position: absolute; inset: 10px 0; width: 100%; height: calc(100% - 20px); }
  .sm-chart polyline { fill: none; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .sm-chart .sm-chart-say { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; color: var(--ink-muted); pointer-events: none; z-index: 1; }
  /* LightweightCharts container: fills the chart box, cream paper background */
  .sm-chart-lw { position: absolute; inset: 0; width: 100%; height: 100%; }
  .sm-chart-lw table { font-family: var(--font-mono) !important; }
  /* hover P&L box: shows position worth at the crosshair price */
  .sm-hover { position: absolute; z-index: 10; padding: 8px 10px; background: var(--raised); border: 1px solid var(--rule-strong); box-shadow: 0 2px 8px rgba(0,0,0,0.15); font-size: 13px; line-height: 1.4; white-space: nowrap; pointer-events: none; }
  .sm-hover.is-hidden { display: none; }
  .sm-hover span { display: block; color: var(--ink-muted); }
  .sm-hover b { display: block; font-weight: 600; }
  .sm-hover b.sm-up { color: var(--sm-pos-t); }
  .sm-hover b.sm-dn { color: var(--sm-neg-t); }
  .sm-tf { flex: none; display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sm-tf button { flex: 0 0 auto; min-width: 40px; height: 44px; padding: 0 10px; border: 1px solid var(--rule); font-size: 14px; font-weight: 500; color: var(--ink-muted); background: transparent; }
  .sm-tf button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: var(--raised); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5); }
  .sm-tf button:active { background: var(--sunken); }
  .sm-tf-sep { flex: 0 0 8px; width: 8px; }

  /* a coin with trades open: the same chart at a set height (the page scrolls), the trades drawn on it, their cards under it */
  .sm-chart.is-set { flex: none; height: clamp(180px, calc(100dvh - 480px), 340px); }
  .sm-marks { position: absolute; inset: 10px 0; pointer-events: none; }
  .sm-mk { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed currentColor; }
  .sm-mk.is-liq { border-top-style: solid; }
  .sm-mk.is-edge { border-top: 0; }
  .sm-mk span { position: absolute; left: 6px; transform: translateY(-50%); max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; padding: 0 5px; border: 1px solid currentColor; background: var(--raised); font-size: 12px; font-weight: 600; line-height: 15px; white-space: nowrap; }
  .sm-mk.is-entry { color: var(--ink); } .sm-mk.is-liq { color: var(--accent); }
  .sm-mk.is-tp { color: var(--sm-pos-t); } .sm-mk.is-sl { color: var(--sm-neg-t); }
  .sm-trades { margin-top: 20px; }
  .sm-trades > .sm-pos:first-of-type { margin-top: 8px; }
  .sm-pnlrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-top: 6px; }
  .sm-pnlrow .sm-pnl { margin: 0; font-size: 36px; min-height: 40px; }
  .sm-pos > .sm-say { margin-top: 6px; }
  .sm-pos > .sm-btn { margin-top: 12px; }
  :where(.sm-root) .sm-kv.is-btn { width: 100%; min-height: 44px; text-align: left; }
  .sm-kv.is-btn:active { background: var(--sunken); }
  .sm-kv.is-btn[disabled] { opacity: 0.55; cursor: default; }
  .sm-kv-v { display: inline-flex; align-items: center; gap: 8px; text-align: right; }
  .sm-kv-v .sm-chev { font-style: normal; font-size: 20px; line-height: 1; color: var(--ink-faint); }

  /* the position card */
  .sm-pos { border: 2px solid var(--ink); background: var(--raised); padding: 14px 16px 8px; margin-top: 16px; }
  .sm-pos + .sm-pos { margin-top: 12px; }
  .sm-pos.is-quiet { border: 1px solid var(--rule-strong); padding: 15px 17px 9px; }
  .sm-pos-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; min-height: 28px; }
  .sm-pos-h > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
  .sm-pos-h .sm-in { color: var(--ink-muted); font-weight: 500; white-space: nowrap; }
  .sm-pnl { font-family: var(--font-brand); font-weight: 700; font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; margin: 10px 0 0; min-height: 49px; white-space: nowrap; }
  .sm-pnlp { font-size: 16px; font-weight: 600; min-height: 23px; }
  .sm-pnl.sm-mute { color: var(--ink-muted); }
  .sm-kvs { margin-top: 12px; }
  .sm-kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 38px; padding: 7px 0; border-top: 1px solid var(--rule); font-size: 15px; }
  .sm-kv > span:first-child { color: var(--ink-muted); flex: none; }
  .sm-kv > span:last-child { text-align: right; }
  .sm-say { font-size: 15px; line-height: 1.4; min-height: 21px; margin: 0; color: var(--ink-muted); }
  .sm-say.is-bad { color: var(--sm-neg-t); } .sm-say.is-warn { color: var(--ink); font-weight: 500; }
  .sm-pos.is-lim { border-color: var(--ink-muted); }
  /* (cf_LIQ) room before a trade closes itself: one line and a slim flat bar under the P&L. The bar is the share of the full move
     to the closing price that is left; it and the figure are green, amber under half, red under a fifth. Fixed heights: a tick
     changes the figure and the bar's width, never the card's. */
  .sm-room { margin-top: 10px; color: var(--sm-pos-t); }
  .sm-room-l { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; height: 22px; font-size: 15px; line-height: 22px; white-space: nowrap; }
  .sm-room-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-muted); }
  .sm-room-v { flex: none; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .sm-room-bar { height: 6px; margin-top: 5px; background: var(--rule); }
  .sm-room-bar i { display: block; height: 100%; min-width: 2px; background: currentColor; transition: width 240ms ease-out, background-color 240ms ease-out; }
  .sm-room.is-amber { color: var(--warn); } .sm-room.is-red { color: var(--sm-neg-t); }
  .sm-room.is-late { color: var(--ink-muted); } .sm-room.is-late .sm-room-bar i { min-width: 0; }
  .sm-room-s { font-style: normal; font-variant-numeric: tabular-nums; color: var(--ink-muted); }
  .sm-room-s.is-amber { color: var(--warn); font-weight: 600; } .sm-room-s.is-red { color: var(--sm-neg-t); font-weight: 600; }
  .sm-wait-tag { font-style: normal; font-size: 12px; font-weight: 500; padding: 2px 6px; background: var(--ink-muted); color: var(--page); margin-left: 4px; }
  .sm-cta .sm-say { text-align: center; }
  /* All open trades section (phone): goes in main area after chart */
  .sm-all-trades-ph { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rule); }
  .sm-all-trades-ph .sm-label { margin-bottom: 6px; }
  .sm-all-trades-ph .sm-pos-h .sm-all-link { text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

  /* the result */
  .sm-ok { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; font-weight: 700; margin: 24px 0 22px; background: var(--pos); color: var(--page); }
  .sm-ok.is-loss { background: var(--neg); } .sm-ok.is-flat { background: var(--ink-muted); }

  /* ---- sheets ------------------------------------------------------------------------ */
  dialog.sm-sheet {
    position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 90vh; max-height: 90dvh;
    padding: 0; border: 0; border-top: 1px solid var(--rule-strong); background: var(--raised); color: var(--ink);
    overflow: hidden; transform: translateY(var(--sm-drag, 0px));
  }
  dialog.sm-sheet[open] { display: flex; flex-direction: column; animation: sm-in 220ms ease-out; }
  dialog.sm-sheet.is-out { animation: sm-out 180ms ease-in forwards; }
  /* closed: the slide away is no longer modal (simple.js marks it is-gone) and takes no taps; its shade goes with it */
  dialog.sm-sheet.is-out.is-gone { z-index: 45; pointer-events: none; animation: sm-out 180ms ease-in forwards, sm-shade 180ms ease-in forwards; }
  dialog.sm-sheet.is-gone * { pointer-events: none; }
  @keyframes sm-shade { from { box-shadow: 0 0 0 100vmax rgba(42, 37, 32, 0.45); } to { box-shadow: 0 0 0 100vmax rgba(42, 37, 32, 0); } }
  dialog.sm-sheet::backdrop { background: rgba(42, 37, 32, 0.45); }
  dialog.sm-sheet[open]::backdrop { animation: sm-fade 220ms ease-out; }
  dialog.sm-sheet.is-out::backdrop { animation: sm-fade 180ms ease-in reverse forwards; }
  dialog.sm-sheet.is-tall { height: 90vh; height: 90dvh; }
  @keyframes sm-in { from { transform: translateY(100%); } } @keyframes sm-out { to { transform: translateY(100%); } }
  @keyframes sm-fade { from { opacity: 0; } }
  .sm-sh-head { flex: none; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; padding: 16px 4px 0 var(--sm-pad); touch-action: none; }
  .sm-sh-head::before { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--rule-strong); }
  .sm-sh-head h2 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.2; display: flex; align-items: center; gap: 8px; min-width: 0; outline: none; box-shadow: none; }
  .sm-x { width: 44px; height: 44px; display: grid; place-items: center; font-size: 20px; color: var(--ink-muted); flex: none; }
  .sm-x:active { color: var(--ink); background: var(--sunken); }
  .sm-sh-body { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px var(--sm-pad) 16px; }
  .sm-sh-foot { flex: none; display: grid; gap: 8px; padding: 8px var(--sm-pad) calc(12px + env(safe-area-inset-bottom) + var(--sm-kb, 0px)); background: var(--raised); }
  .sm-sh-foot .sm-say { text-align: left; }

  /* the amount: a real field, 16 px or larger so iPhones do not zoom */
  .sm-amt { display: flex; align-items: baseline; margin: 6px 0 4px; min-height: 55px; font-family: var(--font-brand); font-weight: 700; font-size: 52px; line-height: 1.05; letter-spacing: -0.02em; }
  .sm-amt.is-mid { font-size: 44px; min-height: 47px; }
  .sm-amt span { flex: none; }
  .sm-amt input {
    flex: 1 1 auto; min-width: 0; width: 100%; height: 1.05em; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit;
    font: inherit; letter-spacing: inherit; -moz-appearance: textfield; appearance: textfield; caret-color: var(--accent);
  }
  #smAddAmount, #smOrdAmount { font-size: inherit !important; }
  .sm-amt input { min-height: 44px; }
  .sm-amt input:focus { outline: none; box-shadow: 0 2px 0 var(--ink); }
  .sm-amt input::-webkit-outer-spin-button, .sm-amt input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  .sm-amt input::placeholder { color: var(--ink-faint); }
  .sm-chips { display: flex; gap: 8px; margin: 12px 0 20px; }
  .sm-chips button { flex: 1; height: 44px; border: 1px solid var(--sm-edge); background: var(--raised); font-size: 16px; font-weight: 500; }
  .sm-sheet .sm-chips button { background: var(--page); }
  .sm-chips button[aria-pressed="true"] { background: var(--ink); color: var(--page); border-color: var(--ink); }
  .sm-chips button:active { filter: brightness(0.92); }
  .sm-chips button[disabled] { opacity: 0.45; }

  /* pay with: radio rows, the chosen one in a 2 px ink border */
  .sm-pick { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 16px; margin-top: 8px; border: 1px solid var(--sm-edge); background: var(--page); text-align: left; }
  .sm-pick[aria-checked="true"] { border: 2px solid var(--ink); padding: 9px 15px; }
  .sm-pick:active { background: var(--sunken); }
  .sm-pick .sm-t { flex: 1; min-width: 0; }
  .sm-pick .sm-t b { display: block; font-size: 17px; font-weight: 600; line-height: 1.3; }
  .sm-pick .sm-t i { display: block; font-style: normal; font-size: 15px; color: var(--ink-muted); line-height: 1.35; min-height: 20px; }
  .sm-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--sm-edge); flex: none; }
  .sm-pick[aria-checked="true"] .sm-radio { border-color: var(--ink); box-shadow: inset 0 0 0 4px var(--page), inset 0 0 0 12px var(--ink); }
  .sm-more { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -12px -8px 0; font-size: 22px; color: var(--ink-faint); }
  .sm-more:active { background: var(--sunken); }
  .sm-opts { margin: 0 0 4px; border: 1px solid var(--sm-edge); border-top: 0; background: var(--page); }
  .sm-opts button { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 48px; padding: 0 16px; font-size: 16px; border-top: 1px solid var(--rule); }
  .sm-opts button:first-child { border-top: 0; }
  .sm-opts button[aria-pressed="true"] { font-weight: 600; }
  .sm-opts button[disabled] { color: var(--ink-faint); }
  .sm-opts button:active { background: var(--sunken); }
  /* more ways to pay (2026-11-20): the rows a wallet can pay with come first; the rest wait behind one key */
  .sm-ways { display: flex; flex-direction: column; }
  .sm-seg2 { display: flex; gap: 8px; margin: 8px 0 4px; }
  .sm-seg2 button { flex: 1; min-height: 48px; padding: 0 6px; font-size: 16px; border: 1px solid var(--sm-edge); background: var(--page); }
  .sm-seg2 button[aria-pressed="true"] { background: var(--ink); color: var(--page); font-weight: 600; }
  .sm-seg2 button:active { filter: brightness(0.92); }
  .sm-seg2.is-net { margin-top: 4px; }
  .sm-seg2.is-net button { min-height: 44px; font-size: 15px; }
  .sm-morekey { order: 3; display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 16px; margin-top: 8px; border: 1px dashed var(--sm-edge); background: transparent; text-align: left; }
  .sm-morekey b { font-size: 16px; font-weight: 600; flex: none; }
  .sm-morekey span { font-size: 14px; color: var(--ink-muted); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sm-morekey:active { background: var(--sunken); }
  .sm-morekey[disabled], .sm-seg2 button[disabled], .sm-field[disabled] { opacity: 0.45; }
  .sm-opts.is-more { order: 3; border-top: 0; margin: 0; }
  .sm-opts.is-more button span:first-child { font-weight: 600; }
  .sm-opts.is-more button span:last-child { font-size: 14px; color: var(--ink-muted); text-align: right; }
  .sm-ways .sm-links { margin: 0 0 4px; }
  .sm-refbox { margin: 8px 0 4px; padding: 10px 16px 12px; border: 1px solid var(--sm-edge); background: var(--page); }
  .sm-refbox .sm-fine { margin: 0 0 8px; }
  .sm-field { display: block; width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid var(--rule-strong); border-radius: 0; background: var(--raised); color: var(--ink); font-family: var(--font-mono); font-size: 16px; }
  .sm-field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
  .sm-field::placeholder { color: var(--ink-faint); }
  /* pay to an address: the amount, the address, its QR code */
  .sm-payrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
  .sm-big.sm-payamt { margin: 4px 0 0; min-height: 0; font-size: 32px; white-space: nowrap; }
  .sm-big.sm-payamt small { font-size: 19px; font-weight: 600; letter-spacing: 0; }
  .sm-refkey { font-size: 15px; margin: 0 0 2px; }
  .sm-copy { flex: none; min-height: 44px; padding: 0 14px; border: 1px solid var(--sm-edge); background: var(--page); font-size: 16px; font-weight: 500; }
  .sm-copy:active { background: var(--sunken); }
  .sm-addr { margin-top: 6px; padding: 10px 12px; border: 1px solid var(--rule-strong); background: var(--page); font-family: var(--font-mono); font-size: 15px; line-height: 1.45; word-break: break-all; user-select: all; -webkit-user-select: all; }
  .sm-qr { display: block; width: 168px; height: 168px; margin: 14px auto 0; image-rendering: pixelated; }
  .sm-steps.is-tight { margin-top: 18px; }
  .sm-steps.is-tight .sm-st { min-height: 64px; padding-bottom: 14px; }
  .sm-steps.is-tight .sm-st b { font-size: 17px; }

  /* the summary: three 44 px rows */
  .sm-sum { margin-top: 16px; border: 1px solid var(--rule-strong); background: var(--page); padding: 4px 16px; }
  .sm-sumrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 44px; font-size: 17px; text-align: left; }
  .sm-sumrow + .sm-sumrow { border-top: 1px solid var(--rule); }
  .sm-sumrow > span:first-child { color: var(--ink-muted); }
  .sm-sumrow > span:last-child { font-weight: 500; text-align: right; }
  .sm-sumrow .is-go { color: var(--sm-pos-t); font-weight: 600; }

  /* boost: a segmented control */
  .sm-seg { display: flex; border: 1px solid var(--sm-edge); margin-top: 8px; }
  .sm-seg button { flex: 1; height: 44px; font-size: 16px; font-weight: 500; background: var(--page); }
  .sm-seg button + button { border-left: 1px solid var(--sm-edge); }
  .sm-seg button[aria-pressed="true"] { background: var(--ink); color: var(--page); }
  /* boosts in two rows of three (five set boosts + Custom) */
  .sm-seg.is-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
  .sm-seg.is-grid button + button { border-left: 0; }
  .sm-seg.is-grid button { border-right: 1px solid var(--sm-edge); }
  .sm-seg.is-grid button:nth-child(3n) { border-right: 0; }
  .sm-seg.is-grid button:nth-child(n+4) { border-top: 1px solid var(--sm-edge); }
  .sm-levc { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 16px; }
  .sm-levc[hidden] { display: none; }
  .sm-levc > span:first-child { color: var(--ink-muted); }
  .sm-levc-in { display: inline-flex; align-items: center; border: 1px solid var(--sm-edge); background: var(--page); height: 44px; padding: 0 12px; }
  .sm-levc-in input { width: 64px; border: 0; background: transparent; font: inherit; font-size: 18px; font-weight: 600; color: var(--ink); outline: none; }
  .sm-levc-in b { font-weight: 600; }
  .sm-levc i { font-style: normal; color: var(--ink-muted); font-size: 14px; margin-left: auto; }
  .sm-now { font-family: var(--font-brand); font-weight: 700; font-size: 26px; line-height: 1.15; letter-spacing: 0.01em; margin: 18px 0 0; color: var(--ink); }
  .sm-seg button:active { filter: brightness(0.92); }
  .sm-seg button[disabled], .sm-opt[disabled], .sm-amt input[disabled], .sm-auto input[disabled], .sm-quiet[disabled] { opacity: 0.45; }
  .sm-risk { font-size: 15px; line-height: 1.4; color: var(--ink-muted); margin: 8px 0 0; min-height: 42px; }
  .sm-out { display: flex; gap: 8px; margin-top: 12px; }
  .sm-out div { flex: 1; min-width: 0; border: 1px solid var(--rule); padding: 10px 12px; font-size: 14px; line-height: 1.35; color: var(--ink-muted); background: var(--page); }
  .sm-out b { display: block; font-size: 20px; margin-top: 2px; white-space: nowrap; }
  .sm-opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 48px; margin-top: 12px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 16px; text-align: left; }
  .sm-opt i { font-style: normal; color: var(--ink-muted); white-space: nowrap; }
  .sm-auto { padding: 4px 0 8px; border-bottom: 1px solid var(--rule); }
  .sm-auto label { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; font-size: 16px; }
  .sm-auto input { width: 150px; height: 44px; padding: 0 10px; border: 1px solid var(--sm-edge); border-radius: 0; background: var(--page); color: var(--ink); font: inherit; font-size: 16px; text-align: right; }
  .sm-auto input:focus, .sm-auto input:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
  .sm-lim { padding: 4px 0 8px; border-bottom: 1px solid var(--rule); }
  .sm-lim[hidden] { display: none; }
  .sm-lim label { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; font-size: 16px; }
  .sm-lim input { width: 150px; height: 44px; padding: 0 10px; border: 1px solid var(--sm-edge); border-radius: 0; background: var(--page); color: var(--ink); font: inherit; font-size: 16px; text-align: right; }
  .sm-lim input:focus, .sm-lim input:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
  .sm-fine { margin: 4px 0 0; font-size: 13px; color: var(--ink-muted); line-height: 1.35; }

  /* wallet confirm, over the form: nothing is sent until the wallet says yes */
  .sm-wait { position: absolute; inset: 60px 0 0 0; z-index: 3; display: flex; flex-direction: column; justify-content: flex-end; background: rgba(42, 37, 32, 0.45); animation: sm-fade 180ms ease-out; }
  .sm-wait > div { background: var(--raised); border-top: 1px solid var(--rule-strong); padding: 24px var(--sm-pad) calc(16px + env(safe-area-inset-bottom)); animation: sm-in 220ms ease-out; }
  .sm-wait h3 { margin: 16px 0 8px; font-size: 24px; font-weight: 600; line-height: 1.2; }
  .sm-wait p { margin: 0 0 20px; font-size: 17px; line-height: 1.45; color: var(--ink-muted); }
  .sm-wait p b { color: var(--ink); font-weight: 600; }

  /* money on its way: three steps that tick */
  .sm-steps { margin: 24px 0 0; }
  .sm-st { display: flex; gap: 14px; align-items: flex-start; padding: 0 0 26px; position: relative; min-height: 78px; }
  .sm-st:last-child { padding-bottom: 0; min-height: 52px; }
  .sm-st:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--rule-strong); }
  .sm-st .sm-m { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--rule-strong); background: var(--raised); flex: none; display: grid; place-items: center; font-size: 15px; font-weight: 700; color: transparent; transition: background-color 200ms ease-out, border-color 200ms ease-out; }
  .sm-st.is-done .sm-m { background: var(--pos); border-color: var(--pos); color: var(--page); }
  .sm-st.is-now .sm-m { border-color: var(--ink); box-shadow: inset 0 0 0 5px var(--raised), inset 0 0 0 14px var(--ink); }
  .sm-st.is-bad .sm-m { background: var(--neg); border-color: var(--neg); color: var(--page); }
  .sm-st b { display: block; font-size: 18px; font-weight: 600; line-height: 1.5; } .sm-st i { display: block; font-style: normal; font-size: 15px; color: var(--ink-muted); line-height: 1.4; }
  .sm-st.is-later b { color: var(--ink-muted); }

  /* the menu */
  .sm-who { padding: 4px 0 12px; border-bottom: 1px solid var(--rule); }
  .sm-who b { display: block; font-size: 18px; font-weight: 600; } .sm-who i { display: block; font-style: normal; font-size: 15px; color: var(--ink-muted); word-break: break-all; text-wrap: balance; }
  .sm-who .sm-links { margin-top: 4px; }
  .sm-menu button, .sm-menu a { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 56px; border-bottom: 1px solid var(--rule); font-size: 17px; font-weight: 500; color: var(--ink); text-decoration: none; text-align: left; }
  .sm-menu i { font-style: normal; font-size: 14px; color: var(--ink-muted); font-weight: 400; text-align: right; }
  .sm-menu button:active, .sm-menu a:active { background: var(--sunken); }
  .sm-menu-sub { display: flex; gap: 0; }
  .sm-menu-sub a, .sm-menu-sub button { flex: 1; justify-content: center; min-height: 48px; font-size: 15px; border-bottom: none; border-right: 1px solid var(--rule); }
  .sm-menu-sub a:last-child, .sm-menu-sub button:last-child { border-right: none; }

  /* a message that needs no tap: bottom, above the action, one at a time */
  .sm-snack { flex: none; margin: 0 var(--sm-pad); padding: 12px 14px; border: 1px solid var(--neg); background: var(--raised); font-size: 15px; line-height: 1.4; animation: sm-fade 180ms ease-out; }

  @media (max-height: 700px) {
    .sm-main { padding-top: 16px; }
    .sm-big, .sm-amt { font-size: 44px; min-height: 47px; }
    .sm-sheet .sm-amt.is-mid { font-size: 38px; min-height: 40px; }
    .sm-chips { margin: 10px 0 16px; }
    .sm-pick { min-height: 60px; }
    .sm-pnl { font-size: 38px; min-height: 42px; }
    .sm-ok { margin: 12px 0 16px; }
    .sm-risk { min-height: 0; }
  }
  @media (max-width: 374px) {
    .sm-price { font-size: 36px; } .sm-price.is-long { font-size: 30px; }
    .sm-seg button { font-size: 15px; }
  }
  @media (prefers-reduced-motion: reduce) {
    dialog.sm-sheet[open], dialog.sm-sheet.is-out, dialog.sm-sheet.is-out.is-gone, dialog.sm-sheet[open]::backdrop, dialog.sm-sheet.is-out::backdrop, .sm-wait, .sm-wait > div, .sm-snack, .sm-tick-up, .sm-tick-dn { animation: none; }
    .sm-spin { animation-duration: 2400ms; }
    .sm-btn, .sm-dir, .sm-st .sm-m, .sm-room-bar i { transition: none; }
  }
}

/* ==========================================================================
   Desktop (641 px and up, with a mouse or trackpad): three-column layout.
   LEFT: coin list and balance. CENTER: selected coin chart and trades.
   RIGHT: order / add money panel (instead of sheets that slide up).
   Same cream paper look, same flow, wider layout.
   ========================================================================== */

@media (min-width: 641px) {
  /* hide phone-only elements on desktop */
  .sm-root > .sm-main, .sm-root > .sm-cta { display: none !important; }
  /* show the three-column body */
  .sm-root > .sm-body { display: flex !important; flex: 1 1 auto; min-height: 0; overflow: hidden; max-width: 1600px; margin: 0 auto; width: 100%; }

  /* top bar: spans full width, 64px tall */
  .sm-root > .sm-top { width: 100%; max-width: 1600px; margin: 0 auto; padding-left: 24px; padding-right: 24px; border-bottom: 1px solid var(--rule); height: 64px; }

  /* Connect button for visitors in header */
  .sm-top .sm-connect { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; background: var(--ink); color: var(--page); font-size: 15px; font-weight: 600; border: none; }
  .sm-top .sm-connect::before { content: "[\00a0"; opacity: 0.55; } .sm-top .sm-connect::after { content: "\00a0]"; opacity: 0.55; }
  .sm-top .sm-connect:active { filter: brightness(0.9); }

  /* LEFT column: coin list - wider for long prices */
  .sm-left { flex: 0 0 400px; width: 400px; display: flex; flex-direction: column; border-right: 1px solid var(--rule); background: var(--page); }
  .sm-left-head { flex: none; padding: 20px 20px 16px; border-bottom: 1px solid var(--rule); }
  .sm-left-head .sm-big { margin-top: 4px; margin-bottom: 8px; }
  .sm-left-head .sm-links { margin-top: 4px; }
  .sm-left-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 20px 24px; }
  .sm-left-scroll .sm-sec { margin-top: 20px; }
  .sm-left-scroll .sm-sec:first-child { margin-top: 16px; }
  .sm-left .sm-row.is-sel { background: var(--raised); }

  /* desktop rows: show sparkline in compact layout - name | chart | trade | price */
  .sm-left .sm-row { gap: 6px; height: 44px; }
  .sm-left .sm-row .sm-tk { flex: 0 0 70px; max-width: 70px; }
  .sm-left .sm-row .sm-tk i { display: none; }      /* hide subtitle to fit chart */
  .sm-left .sm-row .sm-spk { display: block; flex: 0 0 56px; width: 56px; height: 22px; }
  .sm-left .sm-row .sm-pr { flex: 0 0 auto; min-width: 68px; }
  .sm-left .sm-row .sm-pr b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
  .sm-left .sm-row .sm-pr i { font-size: 11px; }
  /* Your trades rows have no chart and no Place trade button: the name and its Up / Down badge get the whole row, the
     amount in shows under it, and the result sits at the right edge (owner 11/13: the FARTCOIN badge was cut off) */
  .sm-left .sm-row.is-pos { height: auto; min-height: 52px; }
  .sm-left .sm-row.is-pos .sm-tk { flex: 1 1 auto; max-width: none; }
  .sm-left .sm-row.is-pos .sm-tk i { display: block; }
  .sm-left .sm-row.is-pos .sm-pr { flex: 0 0 auto; min-width: 0; }
  /* Desktop left sidebar: compact trade button with short text */
  .sm-left .sm-trade { padding: 0 8px; font-size: 12px; height: 28px; border-radius: 14px; }
  .sm-left .sm-trade .sm-trade-long { display: none; }
  .sm-left .sm-trade .sm-trade-short { display: inline; }

  /* CENTER column: coin details and chart - flex layout for tall chart */
  .sm-center { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; background-color: var(--page); }
  .sm-center-inner { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 20px 24px 0; }
  .sm-center-inner > .sm-cname { flex: none; }
  .sm-center-inner > .sm-cbar { flex: none; }
  /* chart fills available space, respecting trades below */
  .sm-center-inner .sm-chart { flex: 1 1 auto; min-height: 280px; max-height: none; margin-bottom: 12px; }
  .sm-center-inner .sm-chart.is-set { min-height: 200px; max-height: 320px; flex: none; }
  .sm-center-inner .sm-tf { flex: none; margin-top: 0; margin-bottom: 12px; }
  .sm-center-inner .sm-trades { flex: none; margin-top: 8px; margin-bottom: 24px; }
  .sm-center-inner .sm-pos { max-width: 520px; }
  /* welcome message when no coin selected */
  .sm-center-inner .sm-welcome { padding-top: 40px; }

  /* Up/Down bar at the bottom of center */
  .sm-dirbar { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--rule); background: var(--page); }
  .sm-dirbar .sm-dir { height: 64px; }
  /* All open trades section below Up/Down bar */
  .sm-all-trades { flex: none; max-height: 40vh; overflow-y: auto; padding: 12px 24px 16px; border-top: 1px solid var(--rule); background: var(--raised); }
  .sm-all-trades .sm-label { margin-bottom: 8px; }
  .sm-all-trades .sm-all-card { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .sm-all-trades .sm-all-card:last-child { border-bottom: none; }
  .sm-all-trades .sm-all-coin { font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
  .sm-all-trades .sm-all-coin:hover { color: var(--pos); }
  .sm-all-trades .sm-all-pill { flex: 0 0 auto; }
  .sm-all-trades .sm-all-in { flex: 0 0 auto; font-size: 14px; color: var(--ink-muted); }
  .sm-all-trades .sm-room-s { flex: 0 0 auto; font-size: 14px; white-space: nowrap; }
  .sm-all-trades .sm-all-pnl { flex: 1 1 auto; min-width: 0; text-align: right; font-size: 15px; font-weight: 600; }
  .sm-all-trades .sm-all-close { flex: 0 0 auto; padding: 6px 10px; font-size: 13px; font-weight: 600; background: var(--ink); color: var(--page); border: none; cursor: pointer; }
  .sm-all-trades .sm-all-close:active { filter: brightness(0.85); }
  .sm-all-trades .sm-all-auto { flex-basis: 100%; font-size: 13px; color: var(--ink-muted); }

  /* RIGHT column: panel for order / add money */
  .sm-right { flex: 0 0 380px; width: 380px; display: none; flex-direction: column; border-left: 1px solid var(--rule); background: var(--raised); }
  .sm-root.has-panel .sm-right { display: flex; }
  .sm-panel-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 20px 12px; border-bottom: 1px solid var(--rule); }
  .sm-panel-head h2 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.2; display: flex; align-items: center; gap: 8px; }
  .sm-panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 16px 20px; }
  .sm-panel-body .sm-amt { margin-top: 4px; }
  .sm-panel-body .sm-chips { margin: 10px 0 16px; }
  .sm-panel-body .sm-out { margin-top: 10px; }
  .sm-panel-body .sm-risk { margin-top: 6px; min-height: 0; }
  .sm-panel-body .sm-sum { margin-top: 12px; }
  .sm-panel-body .sm-fine { margin-top: 10px; }
  .sm-panel-foot { flex: none; padding: 12px 20px 16px; border-top: 1px solid var(--rule); background: var(--raised); }
  .sm-panel-foot .sm-say { margin-bottom: 8px; text-align: left; }
  .sm-panel-foot .sm-btn { margin-top: 4px; }

  /* sheets: still modal dialogs for menu, but styled for desktop */
  dialog.sm-sheet { left: auto; right: 0; margin: 0; max-width: 400px; border-left: 1px solid var(--rule-strong); border-radius: 0; }
  dialog.sm-sheet[open] { animation: sm-slide-in 200ms ease-out; }
  dialog.sm-sheet.is-out { animation: sm-slide-out 160ms ease-in forwards; }
  @keyframes sm-slide-in { from { transform: translateX(100%); } }
  @keyframes sm-slide-out { to { transform: translateX(100%); } }

  /* hide snack on desktop: messages show in the panel or as inline text */
  .sm-snack { display: none !important; }
}

/* Wider screens: more breathing room */
@media (min-width: 1280px) {
  .sm-left { flex-basis: 460px; width: 460px; }
  .sm-left .sm-row .sm-tk { flex: 0 0 90px; max-width: 90px; }
  .sm-left .sm-row .sm-spk { flex: 0 0 64px; width: 64px; }
  .sm-left .sm-row .sm-pr { min-width: 80px; }
  .sm-left .sm-row .sm-pr b { font-size: 14px; }
  .sm-left .sm-trade { padding: 0 10px; font-size: 13px; height: 30px; border-radius: 15px; }
  .sm-right { flex-basis: 400px; width: 400px; }
  .sm-panel-body { padding: 20px 24px; }
  .sm-panel-foot { padding: 16px 24px 20px; }
  .sm-center-inner { padding: 24px 32px 0; }
  .sm-center-inner .sm-chart { min-height: 360px; }
}

/* Very wide screens */
@media (min-width: 1600px) {
  .sm-center-inner .sm-chart { min-height: 420px; }
}

/* Narrower desktop: squeeze columns but keep sparkline */
@media (min-width: 641px) and (max-width: 1023px) {
  .sm-left { flex-basis: 340px; width: 340px; }
  .sm-left .sm-row .sm-tk { flex: 0 0 55px; max-width: 55px; }
  .sm-left .sm-row .sm-spk { flex: 0 0 48px; width: 48px; }
  .sm-left .sm-row .sm-pr { min-width: 60px; }
  .sm-left .sm-row .sm-pr b { font-size: 12px; }
  .sm-left .sm-row .sm-pr i { font-size: 10px; }
  .sm-left .sm-trade { padding: 0 6px; font-size: 11px; }
  .sm-right { flex-basis: 340px; width: 340px; }
  .sm-left-head { padding: 16px 16px 12px; }
  .sm-left-scroll { padding: 0 16px 20px; }
}

@media (min-width: 641px) and (prefers-reduced-motion: reduce) {
  dialog.sm-sheet[open], dialog.sm-sheet.is-out { animation: none; }

}

/* =========================================================================
   Cream page styling for non-trade pages (portfolio, leaderboard, house, etc.)
   These pages include simple.css and set body.cream-page to get the paper look.
   ========================================================================= */

body.cream-page {
  --page: #f4ecd8; --panel: #f4ecd8; --raised: #faf6ed; --sunken: #e8dec8;
  --ink: #2a2520; --ink-muted: #5f564b; --ink-faint: #7a7060;
  --rule: #d4cbba; --rule-strong: #b8ad92;
  --pos: #2e7a4c; --neg: #b44855; --accent: #8b2020;
  --pos-soft: rgba(46, 122, 76, 0.12); --neg-soft: rgba(180, 72, 85, 0.12); --accent-soft: rgba(139, 32, 32, 0.10);
  --dot: rgba(42, 37, 32, 0.09);
  --warn: #9a6400; --warn-soft: rgba(154, 100, 0, 0.12);
  background: var(--page); color: var(--ink);
  color-scheme: light;
}
body.cream-page .header { background: var(--page); border-bottom: 1px solid var(--rule); }
body.cream-page .wordmark { color: var(--ink); }
body.cream-page .nav-main a { color: var(--ink-muted); }
body.cream-page .nav-main a[aria-current="page"] { color: var(--ink); }
body.cream-page .btn { border-color: var(--rule-strong); color: var(--ink); }
body.cream-page .btn-accent { background: var(--ink); color: var(--raised); border-color: var(--ink); }
body.cream-page .panel { background: var(--raised); border-color: var(--rule); }
body.cream-page .panel-head { border-color: var(--rule); }
body.cream-page h1, body.cream-page h2, body.cream-page h3, body.cream-page h4 { color: var(--ink); }
body.cream-page .kv-key { color: var(--ink-muted); }
body.cream-page .kv-val { color: var(--ink); }
body.cream-page .empty { color: var(--ink-muted); }
body.cream-page a { color: var(--ink); }
body.cream-page .dk-head { background: var(--sunken); color: var(--ink-muted); }
body.cream-page .dk-table > div:not(.dk-head) { border-color: var(--rule); }
body.cream-page input, body.cream-page select { background: var(--raised); border-color: var(--rule-strong); color: var(--ink); }
/* Phone menu sheet cream style */
body.cream-page dialog.ph-sheet { background: var(--raised); color: var(--ink); }
body.cream-page .ph-menu-list a { color: var(--ink); }
body.cream-page .ph-acct, body.cream-page .ph-pts { color: var(--ink); }

/* =========================================================================
   New header for cream pages (matches trading page Simple header)
   ========================================================================= */
body.cream-page .sm-page-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0;
  border-bottom: 1px solid var(--rule); background: var(--page);
  font-family: var(--font-ui); font-size: 17px;
}
body.cream-page .sm-page-top .sm-logo {
  font-family: var(--font-brand); font-weight: 700; font-size: 20px; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px;
}
body.cream-page .sm-page-top .sm-logo i { font-style: normal; }
body.cream-page .sm-page-top-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
body.cream-page .sm-page-top .sm-house {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
  font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; color: var(--ink);
}
body.cream-page .sm-page-top .sm-house > span {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px;
  border: 1px solid var(--pos); background: var(--raised);
}
body.cream-page .sm-page-top .sm-house b { font-weight: 600; }
body.cream-page .sm-page-top .sm-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px;
  font-size: 14px; font-weight: 500; white-space: nowrap; border: none; background: none; cursor: pointer;
}
body.cream-page .sm-page-top .sm-chip > span {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px;
  border: 1px solid var(--rule-strong); background: var(--raised);
}
body.cream-page .sm-page-top .sm-chip:active > span { background: var(--sunken); }
body.cream-page .sm-page-top .sm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); flex: none; }
body.cream-page .sm-page-top .sm-chip.is-off .sm-dot { background: var(--ink-faint); }
body.cream-page .sm-page-top .sm-chip[hidden] { display: none; }
body.cream-page .sm-page-top .sm-connect {
  display: inline-flex; align-items: center; height: 44px; padding: 0 16px;
  background: var(--ink); color: var(--raised); font-size: 15px; font-weight: 600; border: none; cursor: pointer;
}
body.cream-page .sm-page-top .sm-connect::before { content: "[\00a0"; opacity: 0.55; }
body.cream-page .sm-page-top .sm-connect::after { content: "\00a0]"; opacity: 0.55; }
body.cream-page .sm-page-top .sm-connect:active { filter: brightness(0.9); }
/* Hide old header elements */
body.cream-page .header { display: none; }
body.cream-page .pts-bar { display: none; }
/* Desktop: wider header with padding */
@media (min-width: 641px) {
  body.cream-page .sm-page-top { height: 64px; padding-left: 24px; padding-right: 24px; }
}
/* Phone: hide nav inside header, show menu */
@media (max-width: 640px) {
  body.cream-page .sm-page-top .sm-house i { display: none; }  /* hide volume on phone */
}

/* ---- buttons that look like buttons -------------------------------------------
   The owner, 2026-11-14: "the place trade and the up an down buttons on confetti should look more like buttons".
   Place trade and Up / Down become keys: the same fill, a rounded edge, a darker rim, a solid lip under them and a
   soft shadow on the paper. Pressing sinks the key onto its lip within one frame. Text and sizes stay as they were. */
@media screen {
  .sm-root, .sm-sheet { --sm-up-rim: #2f6e4e; --sm-dn-rim: #8f3a4b; --sm-go-rim: #1c4a2e; }
  .sm-dir {
    border-radius: 12px; border: 2px solid var(--sm-rim, transparent);
    box-shadow: 0 4px 0 var(--sm-rim, transparent), 0 8px 14px -6px rgba(42, 37, 32, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: transform 80ms ease-out, box-shadow 80ms ease-out, filter 80ms ease-out;
    -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
  }
  .sm-dir.is-up { --sm-rim: var(--sm-up-rim); }
  .sm-dir.is-dn { --sm-rim: var(--sm-dn-rim); }
  .sm-dir:active {
    transform: translateY(3px); filter: none;
    box-shadow: 0 1px 0 var(--sm-rim, transparent), 0 2px 4px -2px rgba(42, 37, 32, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }
  .sm-trade, .sm-left .sm-trade {
    border-radius: 10px; border: 1px solid var(--sm-go-rim); font-weight: 700;
    box-shadow: 0 3px 0 var(--sm-go-rim), 0 6px 10px -5px rgba(42, 37, 32, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 80ms ease-out, box-shadow 80ms ease-out, filter 80ms ease-out;
  }
  .sm-trade { height: 34px; }
  .sm-row:active .sm-trade, .sm-trade:active {
    transform: translateY(2px); filter: none;
    box-shadow: 0 1px 0 var(--sm-go-rim), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }
}
/* desktop: the Up / Down bar holds two keys with room around them */
@media (min-width: 641px) {
  .sm-dirbar { gap: 12px; padding: 12px 24px 16px; }
  .sm-dirbar .sm-dir { height: 60px; }
}
@media (hover: hover) and (min-width: 641px) {
  .sm-dir:hover { filter: brightness(1.04); }
  .sm-row:hover .sm-trade { filter: brightness(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .sm-dir, .sm-trade { transition: none; }
}

/* ---- every clickable thing a button --------------------------------------------
   The owner, 2026-11-14: "make every clickable thing on confetti a button'".
   Everything that does something when tapped is a key, in the build of the keys above (Place trade, Up / Down):
   a rounded edge, a darker rim, a solid lip under it, a soft shadow on the paper, and a press that sinks it onto
   the lip in 80 ms. One family, three weights:
     primary    one filled key per screen: black for the main step, green / red for money direction (4 px lip)
     secondary  everything else that acts: a paper key (3 px lip; 2 px for the small ones in the top bar)
     selected   the chosen one of a group: pressed in (no lip, sunken fill, ink rim), not colour alone
   plus small inline keys for links inside text. Plain information stays flat. Text, sizes and what each tap
   does are unchanged; the lip is a box-shadow, so it pushes nothing.
   How it is built: one rule draws every key from a few variables (--k-face, --k-rim, --k-lip, --k-r); the
   rules after it only set those variables and the room a key needs. Every key is listed in KEYS_INVENTORY.md. */
@media screen {
  html[data-mode="simple"] body, body.cream-page {
    --key-rim: #8a7f66;                              /* the paper key's rim and lip: 3:1 on the page and on raised */
    --key-ink-rim: #0f0d0b;                          /* the black key's rim and lip */
    --key-go-rim: #1c4a2e; --key-no-rim: #7a2b37;    /* the green / red key's rim and lip */
    --key-shade: rgba(42, 37, 32, 0.42);
    --key-hi: rgba(255, 255, 255, 0.9);              /* the light from above, on paper */
    --key-hi-dark: rgba(255, 255, 255, 0.24);        /* the same light on a filled key */
  }

  /* -- the key: every button and link Simple draws, the small boxes in the top bar, and the Pro / cream-page controls */
  :is(.sm-root, .sm-sheet) :is(button, a):not(.sm-logo, .sm-chip, .sm-house, .sm-dir, .sm-row:not(.is-pos), .sm-chart *),
  :is(.sm-root, .sm-page-top) :is(.sm-chip, .sm-house) > span, .sm-pick .sm-more,
  body.cream-page .sm-page-top .sm-connect,
  :is(html[data-mode="simple"], body.cream-page) :is(.btn, .ph-btn, .ph-quiet, .ph-x, .seg-item, .cf-seg-item, .cf-chip, .cf-cta, .ph-menu-list a, .pf-fetti):not(.pv *, .dk-pv *) {
    background: var(--k-face, var(--raised)); color: var(--k-ink, var(--ink));
    border: 1px solid var(--k-rim, var(--key-rim)); border-radius: var(--k-r, 10px);
    box-shadow: 0 var(--k-now, var(--k-lip, 3px)) 0 var(--k-rim, var(--key-rim)),
                0 calc(var(--k-now, var(--k-lip, 3px)) + 5px) var(--k-blur, 10px) -5px var(--k-shade, var(--key-shade)),
                inset 0 1px 0 var(--k-hi, var(--key-hi)), inset 0 -1px 0 var(--k-lo, transparent);
    text-decoration: none;
    transition: transform 80ms ease-out, box-shadow 80ms ease-out, background-color 80ms ease-out;
    -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
  }
  /* pressed: the key sinks onto its lip */
  :is(.sm-root, .sm-sheet) :is(button, a):not(.sm-logo, .sm-chip, .sm-house, .sm-dir, .sm-row:not(.is-pos), .sm-chart *):active,
  :is(.sm-root, .sm-page-top) :is(.sm-chip, .sm-house):active > span, .sm-pick .sm-more:active,
  body.cream-page .sm-page-top .sm-connect:active,
  :is(html[data-mode="simple"], body.cream-page) :is(.btn, .ph-btn, .ph-quiet, .ph-x, .seg-item, .cf-seg-item, .cf-chip, .cf-cta, .ph-menu-list a, .pf-fetti):not(.pv *, .dk-pv *):active {
    --k-now: 1px; transform: translateY(calc(var(--k-lip, 3px) - 1px)); filter: none;
    background: var(--k-face, var(--raised)); color: var(--k-ink, var(--ink));
  }
  /* keyboard focus: the ring, and the key under it */
  :is(.sm-root, .sm-sheet) :is(button, a):not(.sm-logo, .sm-chip, .sm-house, .sm-dir, .sm-row:not(.is-pos), .sm-chart *):focus-visible,
  :is(html[data-mode="simple"], body.cream-page) :is(.btn, .ph-btn, .ph-quiet, .ph-x, .seg-item, .cf-seg-item, .cf-chip, .cf-cta, .ph-menu-list a, .pf-fetti, .sm-connect):not(.pv *, .dk-pv *):focus-visible {
    outline: none;
    box-shadow: var(--focus), 0 var(--k-now, var(--k-lip, 3px)) 0 var(--k-rim, var(--key-rim)), inset 0 1px 0 var(--k-hi, var(--key-hi));
  }
  /* selected: pressed in and staying in. The lip is gone, the face is sunken, the rim is ink */
  :is(.sm-root, .sm-sheet) :is(button, a):not(.sm-logo, .sm-chip, .sm-house, .sm-dir, .sm-row:not(.is-pos), .sm-chart *):is([aria-pressed="true"], [aria-checked="true"]),
  :is(html[data-mode="simple"], body.cream-page) :is(.seg-item, .cf-seg-item, .cf-chip, .ph-menu-list a):not(.pv *, .dk-pv *):is([aria-pressed="true"], [aria-current="page"], .is-active) {
    background: var(--k-face-in, var(--sunken)); color: var(--k-ink, var(--ink)); border-color: var(--k-rim-in, var(--ink));
    box-shadow: inset 0 0 0 1px var(--k-rim-in, var(--ink)), inset 0 3px 4px rgba(42, 37, 32, 0.22), 0 1px 0 var(--key-hi);
    transform: translateY(var(--k-lip, 3px));
  }
  :is(.sm-root, .sm-sheet) :is(button, a):is([aria-pressed="true"], [aria-checked="true"]):focus-visible,
  :is(html[data-mode="simple"], body.cream-page) :is(.seg-item, .cf-seg-item, .cf-chip, .ph-menu-list a):is([aria-pressed="true"], [aria-current="page"], .is-active):focus-visible {
    box-shadow: var(--focus), inset 0 0 0 1px var(--k-rim-in, var(--ink)), inset 0 3px 4px rgba(42, 37, 32, 0.22);
  }
  /* disabled and busy: today's muted look, no lip, no shadow: nothing looks pressable that is not */
  :is(.sm-root, .sm-sheet) :is(button, a):not(.sm-logo, .sm-chip, .sm-house, .sm-dir, .sm-row:not(.is-pos), .sm-chart *):is([disabled], .is-busy),
  :is(html[data-mode="simple"], body.cream-page) :is(.btn, .ph-btn, .ph-quiet, .ph-x, .seg-item, .cf-seg-item, .cf-chip, .cf-cta):not(.pv *, .dk-pv *):is([disabled], [aria-disabled="true"]) {
    box-shadow: none; transform: none; cursor: default;
  }
  /* a busy key stays down until it is done */
  :is(.sm-root, .sm-sheet) :is(button, a):not(.sm-logo, .sm-chip, .sm-house, .sm-dir, .sm-row:not(.is-pos), .sm-chart *).is-busy { transform: translateY(var(--k-lip, 3px)); }
  :is(.sm-root, .sm-sheet) .sm-opts button[disabled] { opacity: 0.5; }

  /* -- primary keys: filled, 4 px lip ------------------------------------------------ */
  .sm-btn { --k-r: 12px; }
  .sm-btn.is-primary, .sm-btn.is-apple, .sm-btn.is-up, .sm-btn.is-dn, .sm-connect, .sm-all-close,
  :is(html[data-mode="simple"], body.cream-page) :is(.btn-primary, .close-btn, .ph-ps-close, .ph-ps-act, .cf-cta), body.cream-page :is(.btn-accent, .hero-actions .btn:first-child) {
    --k-lip: 4px; --k-hi: var(--key-hi-dark);
  }
  .sm-btn.is-primary, .sm-connect, .sm-all-close,
  :is(html[data-mode="simple"], body.cream-page) :is(.btn-primary, .close-btn, .ph-ps-close, .ph-ps-act, .cf-cta), body.cream-page :is(.btn-accent, .hero-actions .btn:first-child) {
    --k-face: var(--ink); --k-rim: var(--key-ink-rim); --k-ink: var(--page);
  }
  .sm-btn.is-apple { --k-face: #000; --k-rim: #000; --k-ink: #fff; }
  .sm-btn.is-up { --k-face: var(--pos); --k-rim: var(--key-go-rim); --k-ink: #fff; }
  .sm-btn.is-dn { --k-face: var(--neg); --k-rim: var(--key-no-rim); --k-ink: #fff; }
  .sm-btn.is-busy { --k-face: var(--ink-muted); --k-rim: var(--ink-muted); --k-ink: var(--page); }
  .sm-btn.is-up.is-busy { --k-face: var(--pos); --k-rim: var(--pos); --k-ink: #fff; }
  .sm-btn.is-dn.is-busy { --k-face: var(--neg); --k-rim: var(--neg); --k-ink: #fff; }
  /* the black keys (the owner, 2026-11-15: "all the black bars should be buttons on confetti too"): the main step of
     their screen, so the strongest key on it. A near-black lip, a faint light on the top edge, a hair of light where
     the face ends so the lip shows against the black face, and the deepest shadow on the paper */
  .sm-btn.is-primary, .sm-connect, .sm-all-close,
  :is(html[data-mode="simple"], body.cream-page) :is(.btn-primary, .close-btn, .ph-ps-close, .ph-ps-act, .cf-cta), body.cream-page :is(.btn-accent, .hero-actions .btn:first-child) { --k-lo: rgba(255, 255, 255, 0.16); --k-hi: rgba(255, 255, 255, 0.16); --k-shade: rgba(20, 17, 14, 0.62); --k-blur: 14px; }
  body.cream-page .sm-page-top .sm-connect::before, body.cream-page .sm-page-top .sm-connect::after { color: inherit; }      /* its brackets show, as on the trade page */
  body.cream-page .hero-actions .btn:first-child:is(:hover, :active, :focus) { border-color: var(--key-ink-rim); }
  /* small black keys (top bar Connect, a trade's Close on desktop): 3 px lip */
  .sm-connect, .sm-all-close { --k-lip: 3px; }
  .sm-top .sm-connect, body.cream-page .sm-page-top .sm-connect { height: 40px; }
  .sm-root .sm-all-trades .sm-all-close { --k-r: 8px; min-height: 30px; padding: 0 12px; }
  /* room under a primary key for its lip */
  .sm-pos { padding-bottom: 12px; }
  .sm-sh-foot { gap: 12px; }

  /* -- secondary keys: paper ----------------------------------------------------------- */
  /* the top bar: Menu, the wallet, the House, Back */
  :is(.sm-root, .sm-page-top) :is(.sm-chip, .sm-house) > span { --k-lip: 2px; --k-r: 9px; font-weight: 600; }
  :is(.sm-root, .sm-page-top) .sm-house > span { --k-rim: var(--pos); }
  :is(.sm-root, .sm-page-top) :is(.sm-chip, .sm-house):focus-visible { border-radius: 10px; }
  .sm-root .sm-back { --k-lip: 2px; --k-r: 9px; min-height: 36px; height: 36px; margin-left: 0; padding: 0 12px 0 2px; gap: 0; position: relative; }
  .sm-root .sm-back .sm-arr { width: 32px; height: 32px; font-size: 20px; }
  .sm-root .sm-back::after { content: ""; position: absolute; inset: -5px -4px; }      /* the 44 px target around the 36 px key */
  /* phones, wallet connected: a Menu key ends the bar, as on desktop (owner 11/18: "it doesnt have a menu button at the top").
     Four keys in one row: the keys close up (8 px between them, 6 px under 385 px), the wallet key shows its dot and
     last 4 (simple.js topFit), and Back's coin name steps down a size when it is a long one. Nothing wraps or clips from 360 px up. */
  .sm-root .sm-menu-key .sm-bars { display: none; width: 16px; height: 12px; flex: none;
    background: linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 2px no-repeat, linear-gradient(var(--ink), var(--ink)) 0 5px / 100% 2px no-repeat, linear-gradient(var(--ink), var(--ink)) 0 10px / 100% 2px no-repeat; }
  @media (max-width: 519px) {
    .sm-root > .sm-top.has-menu { gap: 6px; }
    .sm-root > .sm-top.has-menu .sm-top-r { gap: 8px; flex: none; }
    .sm-root > .sm-top.has-menu :is(.sm-chip, .sm-house) { padding: 0; }
    .sm-root > .sm-top.has-menu .sm-chip > span { padding: 0 8px; }
    .sm-root > .sm-top.has-menu .sm-back { padding-right: 10px; }
    .sm-root > .sm-top.has-menu .sm-back .sm-arr { width: 28px; }
  }
  @media (max-width: 399px) {
    .sm-root > .sm-top.has-menu .sm-back.is-long { font-size: 15px; }
  }
  @media (max-width: 384px) {
    .sm-root > .sm-top.has-menu .sm-top-r { gap: 6px; }
    .sm-root > .sm-top.has-menu .sm-back.is-mid { font-size: 15px; }
    .sm-root > .sm-top.has-menu .sm-back.is-long { font-size: 13px; }
  }
  @media (max-width: 369px) {
    .sm-root > .sm-top.has-menu .sm-menu-key .sm-menu-w { display: none; }
    .sm-root > .sm-top.has-menu .sm-menu-key .sm-bars { display: block; }
    .sm-root > .sm-top.has-menu .sm-menu-key > span { padding: 0 9px; }
    .sm-root > .sm-top.has-menu .sm-menu-key { position: relative; }
    .sm-root > .sm-top.has-menu .sm-menu-key::after { content: ""; position: absolute; inset: 0 -7px 0 -3px; }      /* the 44 px target around the 36 px key */
  }
  /* text links that act: Add money, Withdraw, Just looking?, Cancel, Not now, Other ways to add ... */
  :is(.sm-root, .sm-sheet) .sm-link { padding: 0 16px; font-weight: 600; }
  :is(.sm-root, .sm-sheet) .sm-links { gap: 10px 10px; margin-top: 8px; padding-bottom: 3px; }
  :is(.sm-root, .sm-sheet) .sm-quiet { margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--ink); }
  .sm-sh-foot .sm-link { width: 100%; }
  /* the ghost button: a full-width paper key (its brackets stay) */
  .sm-btn.is-ghost { --k-lip: 3px; }
  /* the chart's timeframes and Line / Candles: a row of keys, the chosen one pressed in. The row scrolls sideways,
     so it keeps room inside itself for the lips and gives the same room back with a margin */
  :is(.sm-root) .sm-tf { padding: 4px 4px 12px; margin: -4px -4px -12px; }
  :is(.sm-root) .sm-tf button { --k-r: 9px; height: 44px; min-width: 44px; font-weight: 600; color: var(--ink); }
  :is(.sm-root) .sm-tf-sep { flex-basis: 0; width: 0; }      /* the keys grew to 44 px wide: the spacer gives that room back */
  /* amounts and boosts: separate keys in the same grid */
  :is(.sm-root, .sm-sheet) .sm-chips button { font-weight: 600; }
  :is(.sm-root, .sm-sheet) .sm-seg { border: 0; gap: 11px 8px; margin-bottom: 3px; }
  :is(.sm-root, .sm-sheet) :is(.sm-chips, .sm-seg) button:is([aria-pressed="true"]) { font-weight: 700; }
  :is(.sm-root, .sm-sheet) .sm-seg button { font-weight: 600; }
  /* rows that toggle or open something inside a sheet or a card */
  :is(.sm-root, .sm-sheet) .sm-opt { padding: 0 14px; margin-bottom: 3px; }
  :is(.sm-root, .sm-sheet) .sm-kv.is-btn { --k-lip: 2px; --k-r: 9px; margin: 8px 0 4px; padding: 0 12px; }
  /* close: a square key */
  :is(.sm-root, .sm-sheet) .sm-x { --k-lip: 2px; width: 40px; height: 40px; font-size: 17px; font-weight: 600; color: var(--ink); position: relative; }
  :is(.sm-root, .sm-sheet) .sm-x::after { content: ""; position: absolute; inset: -3px; }
  .sm-sh-head .sm-x { margin-right: 12px; }
  :is(.sm-root, .sm-sheet) .sm-more { --k-lip: 2px; --k-r: 9px; color: var(--ink); }

  /* -- rows: a whole row that opens something is a raised paper card ----------------------- */
  :is(.sm-root, .sm-sheet) :is(.sm-note, .sm-pick) { --k-r: 12px; }
  .sm-root .sm-row.is-pos { padding: 4px 12px; margin-top: 8px; }
  .sm-root .sm-rows:has(> .sm-row.is-pos) { padding-bottom: 3px; }
  .sm-sheet .sm-pick, .sm-root .sm-pick { margin-top: 11px; }
  :is(.sm-root, .sm-sheet) .sm-opts { border: 0; background: none; margin: 8px 0 4px; display: grid; gap: 9px; }
  :is(.sm-root, .sm-sheet) .sm-opts button { --k-lip: 2px; --k-r: 9px; }
  /* the menu: every line is a row key (48 + 8 = the old 56 px pitch) */
  :is(.sm-root, .sm-sheet) .sm-menu { padding-top: 10px; }
  :is(.sm-root, .sm-sheet) .sm-menu :is(button, a) { min-height: 48px; margin-bottom: 8px; padding: 0 14px; }
  :is(.sm-root, .sm-sheet) .sm-menu-sub { gap: 8px; }
  :is(.sm-root, .sm-sheet) .sm-menu-sub :is(button, a) { min-height: 48px; }

  /* -- inline keys: a link inside a line of text, like a key cap in a sentence ------------- */
  .sm-root :is(.sm-all-link, .sm-all-coin),
  body.cream-page :is(p, li, dd, td, .fineprint, .sub, .c-src, .pos-line, .cf-ca-row) > a:not(.btn, .sm-logo, .wordmark, .pf-fetti),
  body.cream-page :is(.trade-foot, .docs-foot, .site-foot, .landing-foot) > a:not(.wordmark) {
    --k-lip: 2px; --k-r: 6px;
    background: var(--raised); color: var(--ink); border: 1px solid var(--key-rim); border-radius: 6px;
    box-shadow: 0 1.5px 0 var(--key-rim), inset 0 1px 0 var(--key-hi);
    padding: 0 5px; text-decoration: none; -webkit-box-decoration-break: clone; box-decoration-break: clone;
    transition: transform 80ms ease-out, box-shadow 80ms ease-out;
  }
  body.cream-page :is(p, li, dd, td, .fineprint, .sub, .c-src, .pos-line, .cf-ca-row) > a:not(.btn, .sm-logo, .wordmark, .pf-fetti):active,
  body.cream-page :is(.trade-foot, .docs-foot, .site-foot, .landing-foot) > a:not(.wordmark):active {
    transform: translateY(1px); box-shadow: 0 0.5px 0 var(--key-rim), inset 0 1px 0 var(--key-hi);
  }
  .sm-root :is(.sm-all-link, .sm-all-coin):active { transform: translateY(1px); box-shadow: 0 0.5px 0 var(--key-rim), inset 0 1px 0 var(--key-hi); }
  .sm-root :is(.sm-all-link, .sm-all-coin) { display: inline-block; padding: 1px 8px; text-decoration: none; position: relative; font-weight: 600; }
  .sm-root :is(.sm-all-link, .sm-all-coin)::after { content: ""; position: absolute; inset: -10px -6px; }
  /* footers: each link is a small key with a real target */
  body.cream-page :is(.trade-foot, .docs-foot, .site-foot, .landing-foot) > a:not(.wordmark) {
    display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 8px;
    box-shadow: 0 2px 0 var(--key-rim), inset 0 1px 0 var(--key-hi);
  }
  body.cream-page :is(.trade-foot, .docs-foot, .site-foot, .landing-foot) { gap: 10px 8px; }
  /* the landing page's one-line banner link: a row key, not a wrapped inline one */
  body.cream-page.landing p > a:not(.btn) { display: inline-block; padding: 8px 14px; border-radius: 10px; box-shadow: 0 3px 0 var(--key-rim), 0 7px 10px -5px var(--key-shade), inset 0 1px 0 var(--key-hi); }

  /* -- Pro sheets opened from Simple, and the cream pages' own controls ---------------------- */
  :is(html[data-mode="simple"], body.cream-page) :is(.btn, .ph-btn):not(.pv *, .dk-pv *)::before,
  :is(html[data-mode="simple"], body.cream-page) :is(.btn, .ph-btn):not(.pv *, .dk-pv *)::after { color: var(--k-br, var(--ink-faint)); }
  :is(html[data-mode="simple"], body.cream-page) :is(.btn-primary, .close-btn, .ph-ps-close, .ph-ps-act), body.cream-page :is(.btn-accent, .hero-actions .btn:first-child) { --k-br: rgba(250, 246, 237, 0.55); }
  :is(html[data-mode="simple"], body.cream-page) .btn-sm:not(.pv *, .dk-pv *) { --k-lip: 2px; --k-r: 8px; }
  :is(html[data-mode="simple"], body.cream-page) .btn-plain { --k-lip: 2px; --k-r: 9px; min-width: 40px; }
  :is(html[data-mode="simple"], body.cream-page) .panel-head > .btn-plain { width: 40px; min-height: 40px; height: 40px; margin-right: 6px; }
  body.cream-page .cf-ca-row { gap: 10px 8px; }
  :is(html[data-mode="simple"], body.cream-page) .ph-quiet { --k-lip: 2px; --k-r: 9px; padding: 0 12px; }
  :is(html[data-mode="simple"], body.cream-page) .ph-x { --k-lip: 2px; --k-r: 9px; width: 40px; height: 40px; margin: 2px 8px 2px 2px; color: var(--ink); }
  body.cream-page .cf-ca-copy.is-done { --k-face: var(--pos); --k-rim: var(--key-go-rim); }
  /* segmented controls: separate keys, the chosen one pressed in */
  :is(html[data-mode="simple"], body.cream-page) :is(.seg, .cf-seg):not(.pv *, .dk-pv *) { border: 0; gap: 8px; margin-bottom: 3px; }
  :is(html[data-mode="simple"], body.cream-page) .cf-seg { display: grid; }
  :is(html[data-mode="simple"], body.cream-page) :is(.seg-long, .seg-short):is([aria-pressed="true"], .is-active) { --k-ink: #fff; }
  :is(html[data-mode="simple"], body.cream-page) .seg-long:is([aria-pressed="true"], .is-active) { --k-face-in: var(--pos); --k-rim-in: var(--key-go-rim); }
  :is(html[data-mode="simple"], body.cream-page) .seg-short:is([aria-pressed="true"], .is-active) { --k-face-in: var(--neg); --k-rim-in: var(--key-no-rim); }
  /* the phone menu on the cream pages: row keys, the page you are on pressed in */
  :is(html[data-mode="simple"], body.cream-page) .ph-menu-list { padding: 10px 16px 8px; gap: 8px; }
  :is(html[data-mode="simple"], body.cream-page) .ph-menu-list a { min-height: 48px; padding: 0 14px; }
  :is(html[data-mode="simple"], body.cream-page) .ph-menu-list a[aria-current="page"]::before { content: none; }
  :is(html[data-mode="simple"], body.cream-page) .ph-menu-list a:not(.ph-menu-sub) + .ph-menu-sub { margin-top: 0; }
  body.cream-page .pos-lines .pos-line > a { justify-self: start; width: fit-content; }
  body.cream-page .pf-fetti { --k-lip: 2px; --k-r: 9px; padding: 0 12px; margin-bottom: 4px; }
  /* cream pages on a phone: the top bar holds the logo, House, Connect and Menu without cutting Menu off
     (before this, Menu ran off the right edge at 390 px when no wallet was connected) */
  @media (max-width: 480px) {
    body.cream-page .sm-page-top { padding-left: 12px; padding-right: 12px; gap: 4px; }
    body.cream-page .sm-page-top-r { gap: 4px; }
    body.cream-page .sm-page-top .sm-logo { font-size: 18px; }
    body.cream-page .sm-page-top .sm-connect { padding: 0 9px; font-size: 14px; }
    body.cream-page .sm-page-top :is(.sm-chip, .sm-house) { padding: 0; }
    body.cream-page .sm-page-top :is(.sm-chip, .sm-house) > span { padding: 0 8px; }
    body.cream-page .sm-page-top .sm-house { font-size: 12.5px; }
  }
  /* the wallet chooser's box keeps its paper edge, without the hard offset shadow fighting the keys */
  html[data-mode="simple"] dialog[aria-label="Choose a wallet"], body.cream-page dialog[aria-label="Choose a wallet"] { border-radius: 14px; }
}

/* desktop */
@media (min-width: 641px) {
  .sm-center-inner .sm-tf { margin-top: -4px; margin-bottom: 0; }
  .sm-left .sm-row.is-pos { padding: 4px 12px; }
}
/* a mouse over a key lifts it a hair (desktop only: on a touch screen hover sticks) */
@media (hover: hover) and (min-width: 641px) {
  :is(.sm-root, .sm-sheet) :is(button, a):not(.sm-logo, .sm-chip, .sm-house, .sm-dir, .sm-row:not(.is-pos), .sm-chart *, [disabled], .is-busy, [aria-pressed="true"], [aria-checked="true"]):hover:not(:active),
  :is(.sm-root, .sm-page-top) :is(.sm-chip, .sm-house):hover:not(:active) > span,
  body.cream-page .sm-page-top .sm-connect:hover:not(:active),
  :is(html[data-mode="simple"], body.cream-page) :is(.btn, .ph-btn, .ph-quiet, .ph-x, .seg-item, .cf-seg-item, .cf-chip, .cf-cta, .ph-menu-list a, .pf-fetti):not(.pv *, .dk-pv *, [disabled], [aria-disabled="true"], [aria-pressed="true"], [aria-current="page"], .is-active):hover:not(:active) {
    --k-now: calc(var(--k-lip, 3px) + 1px); transform: translateY(-1px);
    background: var(--k-face, var(--raised)); color: var(--k-ink, var(--ink));
  }
  :is(html[data-mode="simple"], body.cream-page) :is(.btn, .ph-btn):not(.pv *, .dk-pv *):hover::before,
  :is(html[data-mode="simple"], body.cream-page) :is(.btn, .ph-btn):not(.pv *, .dk-pv *):hover::after { color: var(--k-br, var(--ink-faint)); }
  body.cream-page :is(p, li, dd, td, .fineprint, .sub, .c-src, .pos-line, .cf-ca-row) > a:not(.btn, .sm-logo, .wordmark, .pf-fetti):hover,
  body.cream-page :is(.trade-foot, .docs-foot, .site-foot, .landing-foot) > a:not(.wordmark):hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 2.5px 0 var(--key-rim), inset 0 1px 0 var(--key-hi); }
}
@media (prefers-reduced-motion: reduce) {
  :is(.sm-root, .sm-sheet) :is(button, a), :is(.sm-root, .sm-page-top) :is(.sm-chip, .sm-house) > span,
  :is(html[data-mode="simple"], body.cream-page) :is(.btn, .ph-btn, .ph-quiet, .ph-x, .seg-item, .cf-seg-item, .cf-chip, .cf-cta, .ph-menu-list a, .pf-fetti, .sm-connect),
  body.cream-page a { transition: none; }
}

/* ---- Amounts you can type (the owner, 2026-11-16: "we need to make it so people can type in custom amoounts on the
   add money", then "and on the amount of the trade").
   The amount was already a real field, but it showed as a bare big number, so nothing said you could type in it. Now
   it sits in a box sunk into the paper (keys stand up, fields sink in), its label says "Type any amount", and a tap
   anywhere in the box (the $ too) opens the number keypad with the amount selected, so typing replaces it. The preset
   keys ($25 $50 $100 Max, $5 $10 $25 All) are unchanged. Covers Add money, the trade sheet and the desktop order panel. */
@media screen {
  .sm-amt {
    margin: 8px 0 4px; padding: 6px 14px; gap: 2px; cursor: text;
    background: var(--raised); border-radius: 12px;
    box-shadow: inset 0 0 0 1px var(--key-rim, #8a7f66), inset 0 3px 5px rgba(42, 37, 32, 0.16);
  }
  .sm-amt:focus-within { box-shadow: inset 0 0 0 2px var(--ink), inset 0 3px 5px rgba(42, 37, 32, 0.16); }
  .sm-amt input:focus { box-shadow: none; }
  .sm-label.is-amt { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .sm-label.is-amt .sm-hint { font-size: 14px; letter-spacing: normal; text-transform: none; font-weight: 500; color: var(--ink-muted); }
}

/* ---- Take profit and stop loss on screen (the owner, 2026-11-19: "we need to bring back stop loss and take profit", "just
   make it visible on screen", "on the card").
   On every trade card, under "You opened at" and "Closes itself at": one key holding two lines in the card's own key /
   value style, Take profit and Stop loss with their prices or "Not set". The flat lines above are facts about the trade;
   the key is the trader's own choice, one tap from its sheet. The sheet and the order sheet ask for both prices in boxes
   sunk into the paper (as the amount box), each named above its box, with what that price does under it. */
@media screen {
  :is(.sm-root, .sm-sheet) .sm-kv.is-btn.sm-ak { align-items: stretch; gap: 6px; padding: 0 8px 0 12px; margin-top: 10px; }
  .sm-kv.sm-ak > .sm-ak-rows { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; color: var(--ink); }
  .sm-ak-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 42px; }
  .sm-ak-row + .sm-ak-row { border-top: 1px solid var(--rule); }
  .sm-ak-row > span { color: var(--ink-muted); white-space: nowrap; }
  .sm-ak-row > b { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .sm-ak-row > b.is-off { font-weight: 400; color: var(--ink-faint); }
  .sm-kv.sm-ak > .sm-chev { flex: none; align-self: center; width: 16px; font-style: normal; font-size: 24px; line-height: 1; text-align: center; color: var(--ink-muted); }

  /* a price box: the name above it, the box ($ and the number) sunk into the paper, what it does under it */
  .sm-ak-f { min-width: 0; }
  .sm-ak-f > .sm-label { display: block; margin-bottom: 8px; }
  .sm-ak-in {
    display: flex; align-items: center; gap: 2px; height: 50px; padding: 0 12px; cursor: text;
    background: var(--raised); border-radius: 10px; font-size: 19px; font-weight: 600;
    box-shadow: inset 0 0 0 1px var(--key-rim, #8a7f66), inset 0 3px 5px rgba(42, 37, 32, 0.16);
  }
  .sm-ak-in > span { flex: none; color: var(--ink-muted); }
  .sm-ak-in:has(input:placeholder-shown) > span { color: var(--ink-faint); font-weight: 400; }      /* empty: "$ Not set" reads as one quiet hint */
  .sm-ak-in input {
    flex: 1 1 auto; min-width: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0;
    background: transparent; color: var(--ink); font: inherit; font-size: 19px; font-variant-numeric: tabular-nums; outline: none; box-shadow: none; caret-color: var(--accent);
  }
  .sm-ak-in input::placeholder { color: var(--ink-faint); font-weight: 400; }
  .sm-ak-in input:focus, .sm-ak-in input:focus-visible { outline: none; box-shadow: none; }      /* the box shows the focus, not the field in it */
  .sm-ak-in:focus-within { box-shadow: inset 0 0 0 2px var(--ink), inset 0 3px 5px rgba(42, 37, 32, 0.16); }
  .sm-ak-f.is-bad .sm-ak-in { box-shadow: inset 0 0 0 2px var(--sm-neg-t), inset 0 3px 5px rgba(42, 37, 32, 0.16); }
  .sm-ak-in input[disabled] { opacity: 0.45; }
  .sm-ak-read { min-height: 40px; margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
  .sm-ak-read > span, .sm-ak-read > b { display: block; }
  .sm-ak-read > b { font-weight: 600; }
  .sm-ak-read > .sm-ak-hint { color: var(--ink-faint); }
  :is(.sm-root, .sm-sheet) .sm-ak-fin { --k-lip: 2px; --k-r: 8px; display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; font-size: 14px; font-weight: 600; }
  /* (v6) the card sheet's quick picks: three keys under a price box, each a price to take (take profit +25% / +50% /
     +100% of what went in; stop loss -25% / -50% / the furthest it can go) */
  .sm-ak-picks { display: flex; gap: 8px; margin-top: 10px; }
  .sm-ak-picks[hidden] { display: none; }
  :is(.sm-root, .sm-sheet) .sm-ak-pick { --k-lip: 2px; --k-r: 8px; flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 6px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
  :is(.sm-root, .sm-sheet) .sm-ak-pick[disabled] { opacity: 0.4; }
  /* (v6) under a result's card on a desktop: the link to the transaction that closed the trade */
  .sm-res-link { margin-top: 10px; }

  /* the order sheet and the desktop order panel: the two boxes side by side, under the two outcomes */
  .sm-ak-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
  .sm-ak-two.is-off { opacity: 0.55; }
  .sm-ak-fine { margin: 8px 0 0; }
  .sm-label.sm-when { margin-top: 20px; }

  /* the card's sheet: the trade's prices, then the boxes under each other */
  .sm-ak-top { margin-top: 0; }
  .sm-ak-top > .sm-kv:first-child { border-top: 0; }
  .sm-ak-fields { display: grid; gap: 14px; margin-top: 18px; }
  .sm-sh-foot .sm-quiet { margin-top: 0; }
}
/* ---- HYPE in your wallet (the owner, 2026-11-19: "for add money can we make it so hype can be bridged automatically like eth can").
   Add money's third way to pay is a row like the others. When what the wallet can spare is under the smallest add, the row is
   greyed in the look every disabled choice here already has (half strength, no lip, no press) and stays focusable, so a tap or
   the keyboard can still reach it and hear why. */
@media screen {
  :is(.sm-root, .sm-sheet) :is(button, a):not(.sm-logo, .sm-chip, .sm-house, .sm-dir, .sm-row:not(.is-pos), .sm-chart *).sm-pick[aria-disabled="true"] {
    opacity: 0.5; box-shadow: none; transform: none; cursor: default; background: var(--k-face, var(--raised));
  }
  :is(.sm-root, .sm-sheet) :is(button, a):not(.sm-logo, .sm-chip, .sm-house, .sm-dir, .sm-row:not(.is-pos), .sm-chart *).sm-pick[aria-disabled="true"]:focus-visible { box-shadow: var(--focus); }
}
/* ---- the trade card at the end (the owner, 2026-11-19: two mock-ups and "can you use those at the end"). The card share.js
   draws, as wide as the column and 16:9 like the PNG, sits under the end screen's words; it is a key like everything here that
   does something (a tap opens its sheet), so it gets the paper key's rim and lip, its corners only just rounded. The sheet
   it opens (the card's choices, Share) is share.js's own, with its own styles: every Share on every page opens that one. ---- */
@media screen {
  :is(.sm-root, .sm-sheet) .sm-card { --k-r: 8px; --k-lip: 3px; --k-face: #f9edcf; display: block; width: 100%; margin: 22px 0 8px; padding: 0; overflow: hidden; }
  .sm-card canvas { display: block; width: 100%; height: auto; aspect-ratio: 1672 / 941; opacity: 0; transition: opacity 160ms ease-out; }
  .sm-card.is-in canvas { opacity: 1; }
  .sm-panel-body .sm-ok { margin: 4px 0 18px; }
  .sm-panel-foot .sm-card-go { margin-top: 12px; }
  @media (prefers-reduced-motion: reduce) { .sm-card canvas { transition: none; } }
}
/* ---- the History rows' Share on the cream pages (portfolio.html on a phone): the key that opens that sheet. It was the one
   flat box on a page of keys; now a paper key like the rest (the same place and size, 44 px, its words unchanged). ---- */
@media screen {
  body.cream-page .ph-hist-share {
    border: 1px solid var(--key-rim); border-radius: 10px; background: var(--raised);
    box-shadow: 0 3px 0 var(--key-rim), 0 8px 10px -5px var(--key-shade), inset 0 1px 0 var(--key-hi);
    transition: transform 80ms ease-out, box-shadow 80ms ease-out; -webkit-user-select: none; user-select: none; touch-action: manipulation;
  }
  body.cream-page .ph-hist-share:active { background: var(--raised); transform: translateY(2px); box-shadow: 0 1px 0 var(--key-rim), 0 6px 10px -5px var(--key-shade), inset 0 1px 0 var(--key-hi); }
  body.cream-page .ph-hist-share:focus-visible { box-shadow: var(--focus), 0 3px 0 var(--key-rim), inset 0 1px 0 var(--key-hi); }
}
/* ---- Close part and Add to this trade (v5; the owner, 2026-11-04: "can we make it so that you can close a % of your position",
   2026-11-19: "we are still doing top ups and partial closes right").
   On every trade card, under its take profit and stop loss: two paper keys of one size, side by side. Their sheets are made of
   what the order sheet already has: the box sunk into the paper for what is typed (a percent here, with its sign right after the
   number), the row of keys under it, the two outcome boxes with the figures that change, one black key, and a quiet line under
   that key only when the wallet has to confirm. ---- */
@media screen {
  .sm-pks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 4px; }      /* 10 px: the gap between Up and Down, and between Add money and Withdraw */
  /* what the last part gave back, or what was added: said under the keys, as the end screen says such things (quiet, the money in ink) */
  .sm-pkb > .sm-pt-did { margin: 10px 0 2px; color: var(--ink-muted); }
  .sm-pt-did b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
  .sm-pt-did b.sm-up { color: var(--sm-pos-t); } .sm-pt-did b.sm-dn { color: var(--sm-neg-t); }
  :is(.sm-root, .sm-sheet) .sm-pk { --k-lip: 2px; --k-r: 9px; min-height: 46px; padding: 0 6px; font-size: 15px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--ink); }
  :is(.sm-root, .sm-sheet) .sm-pk[disabled] { opacity: 0.55; }

  /* the percent box: the field is as wide as its number (simple.js pctFit), so the sign sits right after it */
  #smPartAmt, #smPartPct { font-size: inherit !important; }
  .sm-amt.is-pct { position: relative; cursor: text; }
  .sm-amt.is-pct input { flex: none; width: 2ch; min-width: 0.7em; max-width: calc(100% - 1.2em); }
  .sm-amt.is-pct > .sm-pct-m { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; white-space: pre; }

  /* the two boxes: the order sheet's own outcome boxes, their figures a size up; a figure still on its way is a quiet word
     of the same height, never a zero */
  .sm-pt-out > div { padding: 10px 12px 11px; }
  .sm-pt-out b { font-size: 22px; line-height: 28px; font-variant-numeric: tabular-nums; color: var(--ink); }
  .sm-pt-out b.is-off { font-size: 15px; font-weight: 400; color: var(--ink-faint); }
  .sm-pt-out.is-ba > div:first-child b { color: var(--ink-muted); }      /* now and after: the eye goes to after */
  .sm-pt-out i { display: block; min-height: 19px; font-style: normal; font-size: 14px; line-height: 19px; font-variant-numeric: tabular-nums; }
  .sm-pt-lab { margin-top: 18px; }
  .sm-pt-lab + .sm-pt-out { margin-top: 8px; }
  .sm-fine.sm-pt-from, .sm-fine.sm-pt-note { margin: -10px 0 0; font-size: 14px; }
  .sm-fine.sm-pt-note + .sm-pt-out { margin-top: 14px; }
  .sm-kvs.sm-pt-kv { margin-top: 8px; }
  .sm-pt-kv > .sm-kv:first-child { border-top: 0; border-bottom: 1px solid var(--rule); }
  .sm-pt-kv > .sm-kv > span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
  .sm-fine.sm-pt-fine { margin-top: 12px; font-size: 14px; }
  .sm-sh-foot .sm-fine.sm-pt-wal { margin: 0; font-size: 14px; text-align: center; }
}

/* ---- FETTI levels and money back (fetti.js; the owner, 2026-11-19 "i want fetti to be an exchange token", "yes on all";
   PLAN.md 3.5): the Home key, the level sheet, the result's line, the wallet's steps. The paper and the keys are the page's
   own: a row that opens something is a raised paper card, the one black key is the sheet's, the level picked is pressed in.
   Nothing here names what a trade costs. ---- */
@media screen {
  /* the Home key: the note card with a round mark, green once money is coming back */
  .sm-fx-note .sm-fx-ic { flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%; justify-content: center; font-size: 15px; font-weight: 700;
    background: var(--pos-soft); color: var(--sm-pos-t); border: 1px solid color-mix(in srgb, var(--pos) 35%, transparent); font-variant-numeric: tabular-nums; }
  .sm-fx-note .sm-t b { font-variant-numeric: tabular-nums; }
  .sm-left .sm-fx-note { margin-top: 0; }

  /* the level sheet: four level keys, each a raised row; the level and its share on one line, the FETTI and its price under it */
  .sm-fx-lead { margin: 0 0 4px; }
  .sm-fx-levels { margin: 4px 0 2px; }
  .sm-fx-lv .sm-t b { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .sm-fx-pct { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 14px; font-weight: 700; line-height: 1.5;
    background: var(--pos-soft); color: var(--sm-pos-t); }
  .sm-fx-lv .sm-t i { font-variant-numeric: tabular-nums; }
  .sm-fx-tag { flex: none; font-style: normal; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sm-pos-t); }
  .sm-fx-tag[hidden] { display: none; }
  .sm-fx-would { margin: 16px 0 0; padding: 10px 12px; border-left: 4px solid var(--pos); background: var(--pos-soft); font-size: 16px; line-height: 1.4; color: var(--ink); }
  .sm-fx-would[hidden] { display: none; }
  .sm-sheet .sm-fx-would + .sm-sum, .sm-sheet .sm-fx-levels + .sm-fx-would + .sm-sum { margin-top: 14px; }
  .sm-sum .is-go { font-variant-numeric: tabular-nums; }
  .sm-wait p .sm-fx-of { color: var(--ink); }

  /* the result: one quiet line, and for a wallet with no level a small key to the levels */
  .sm-fx-line { margin: 4px 0 14px; }
  p.sm-fx-line, .sm-fx-line .sm-fine { color: var(--ink-muted); font-size: 15px; line-height: 1.45; }
  .sm-fx-line .sm-fine { margin: 0 0 6px; }
  :is(.sm-root, .sm-sheet, .sm-panel-body) .sm-fx-go { min-height: 44px; }

  /* the cream pages' own top bar: a key the page hides stays hidden (the $FETTI page's Connect key showed beside the wallet
     key and pushed the bar wider than a phone) */
  body.cream-page .sm-page-top [hidden] { display: none !important; }
}

/* ---- (cf_POS_CARD) the open trade's card fits the phone (the owner, 2026-11-21: "make it so the open posistion card isnt cut off
   at the bottom making it so you have to scroll").
   With a trade open, the trades sit right under the coin's price, and the stats, the chart and its timeframes come under them
   (simple.js buildCoin; on a screen too short for the price and the card together, fitTrades puts the trades first and the price
   right under them). The card keeps every line and key it had, in less height: where it opened and where it closes itself side
   by side in one ruled line, each name above its price; the take profit / stop loss key holds its two the same way; Close 52 px
   (a primary key: 48 to 56), Close part and Add to this trade 44 px, every key 8 px clear of the next; the gaps one step tighter.
   A long result steps down a size instead of pushing its percent to a second line, so the card never grows when a figure
   crosses a digit. The smallest type on the card is still the boost badge's 13 px. Phone only (.sm-main): the desktop card and
   the sheets are as they were. ---- */
@media screen {
  /* the screen: the price, the trades, then the stats, the chart and its timeframes (fitTrades picks one of three tops) */
  .sm-root > .sm-main.is-trade > .sm-trades { margin-top: 14px; }
  .sm-root > .sm-main.is-trade:not(.is-tfirst) > .sm-stats { margin-top: 18px; }
  .sm-root > .sm-main .sm-trades > .sm-label + .sm-pos { margin-top: 8px; }
  /* 1 and 2: the price in one line (its name, the price a size down, the day's move), and no "Your trade on" over the cards:
     the line above them, the top bar's key and each card's own top line already name the coin */
  .sm-root > .sm-main.is-trade:is(.is-tsmall, .is-tfirst) > .sm-cname { display: inline-block; margin-right: 10px; vertical-align: baseline; }
  .sm-root > .sm-main.is-trade:is(.is-tsmall, .is-tfirst) > .sm-cbar { display: inline-flex; min-height: 0; vertical-align: baseline; }
  .sm-root > .sm-main.is-trade:is(.is-tsmall, .is-tfirst) .sm-price { font-size: 28px; }
  .sm-root > .sm-main.is-trade:is(.is-tsmall, .is-tfirst) > .sm-trades > .sm-label { display: none; }
  .sm-root > .sm-main.is-trade:is(.is-tsmall, .is-tfirst) .sm-trades > .sm-label + .sm-pos { margin-top: 0; }
  .sm-root > .sm-main.is-trade.is-tsmall > .sm-trades { margin-top: 10px; }
  /* 2: the cards first, the price line under them */
  .sm-root > .sm-main.is-trade.is-tfirst > .sm-trades { margin: 0 0 18px; }

  /* the card */
  .sm-root > .sm-main .sm-pos { padding: 12px 16px 8px; }
  .sm-root > .sm-main .sm-pos-h { min-height: 24px; }
  .sm-root > .sm-main .sm-pos > .sm-pnlrow { margin-top: 3px; }
  /* the result a size down while it is long, so it and its percent stay on one line (simple.js pnlFit) */
  .sm-root > .sm-main .sm-pnlrow .sm-pnl.is-long { font-size: 30px; }
  .sm-root > .sm-main .sm-pnlrow .sm-pnl.is-longer { font-size: 26px; }
  .sm-root > .sm-main .sm-pnlrow .sm-pnl.is-longest { font-size: 22px; }
  .sm-root > .sm-main .sm-pos > .sm-room { margin-top: 7px; }
  .sm-root > .sm-main .sm-pos > .sm-btn { height: 52px; margin-top: 10px; }
  .sm-root > .sm-main .sm-pos > .sm-kvs { margin-top: 10px; }
  /* where it opened and where it closes itself: one ruled line, each name above its price */
  .sm-facts { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 10px; border-top: 1px solid var(--rule); }
  .sm-fact { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 4px 0 3px; }
  .sm-fact > span:first-child { font-size: 14px; line-height: 17px; color: var(--ink-muted); }
  .sm-fact > span:last-child { font-size: 15px; line-height: 19px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .sm-fact + .sm-fact { align-items: flex-end; text-align: right; }
  .sm-facts .sm-fact.sm-fact-now { align-items: center; text-align: center; }      /* (owner 11/21) the price now, in the middle of the card's facts */
  /* the take profit / stop loss key: its two side by side, each name above its price (44 px with its rim). Between it, Close part
     and Add to this trade, and the Blockfront key under them: 10 px, 8 px clear of each 2 px lip */
  .sm-root > .sm-main .sm-pos .sm-kv.is-btn.sm-ak { margin: 8px 0 0; }
  .sm-root > .sm-main .sm-pos .sm-ak-rows { flex-direction: row; gap: 12px; }
  .sm-root > .sm-main .sm-pos .sm-ak-row { flex: 1 1 0; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; min-height: 42px; padding: 3px 0; }
  .sm-root > .sm-main .sm-pos .sm-ak-row + .sm-ak-row { border-top: 0; align-items: flex-end; text-align: right; }
  .sm-root > .sm-main .sm-pos .sm-ak-row > span { font-size: 14px; line-height: 17px; }
  .sm-root > .sm-main .sm-pos .sm-ak-row > b { line-height: 19px; }
  /* Close part and Add to this trade */
  .sm-root > .sm-main .sm-pos .sm-pks { margin: 10px 0 0; }
  .sm-root > .sm-main .sm-pos .sm-pk { min-height: 44px; }
  /* Powered by Blockfront */
  .sm-root > .sm-main .sm-pos .sm-kv.sm-pb { min-height: 29px; margin-top: 4px; padding: 5px 0 0; }
}

/* ---- (cf_BFNEWS) the Blockfront article's two small marks in Simple (the owner, 2026-11-19: "a little announcment somwhere", then
   "powered by block front", "on the position cards actually").
   .sm-news: one slim paper card under the coins on Home: the sentence, the article's link as a small key, and a close that hides
   it for this browser. Flat paper, like everything here that only informs; its two keys are the small paper keys of the top bar.
   .sm-pb: the last line of a trade card, in the card's own key / value style: "Powered by", and the article's link as an inline
   key (the build of the coin names on "Your other open trades"). simple.js shows it only while the page reads through Blockfront. ---- */
@media screen {
  .sm-news { position: relative; margin-top: 24px; padding: 12px 54px 14px 14px; border: 1px solid var(--rule-strong); background: var(--raised); }
  .sm-news p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-muted); text-wrap: pretty; }
  .sm-news p b { font-weight: 600; color: var(--ink); }
  .sm-root .sm-news .sm-news-go { --k-lip: 2px; --k-r: 9px; position: relative; display: inline-flex; align-items: center; min-height: 36px; margin-top: 10px; padding: 0 12px; font-size: 14px; font-weight: 600; }
  .sm-root .sm-news .sm-news-go::after { content: ""; position: absolute; inset: -4px 0; }      /* the 44 px target around the 36 px key */
  .sm-root .sm-news .sm-news-x { --k-lip: 2px; --k-r: 8px; --k-ink: var(--ink-muted); position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; font-size: 13px; font-weight: 600; }
  .sm-root .sm-news .sm-news-x::after { content: ""; position: absolute; inset: -6px; }          /* the 44 px target around the 32 px key */
  .sm-left-scroll .sm-news { margin-top: 20px; }

  .sm-kv.sm-pb { min-height: 36px; margin-top: 6px; padding: 6px 0 2px; font-size: 14px; }
  .sm-root .sm-kv.sm-pb > a { --k-lip: 2px; --k-r: 6px; position: relative; display: inline-block; padding: 1px 8px; font-weight: 600; box-shadow: 0 1.5px 0 var(--key-rim), inset 0 1px 0 var(--key-hi); }
  .sm-root .sm-kv.sm-pb > a:active { transform: translateY(1px); box-shadow: 0 0.5px 0 var(--key-rim), inset 0 1px 0 var(--key-hi); }
  .sm-root .sm-kv.sm-pb > a::after { content: ""; position: absolute; inset: -10px -6px; }       /* a real target around the small key */
}

/* ---- (cf_FILLFEEL) the trade looks filled from the press (the owner, 2026-11-21: "make the site look like it fills faster", then
   "skip this and just make it look filled"). An order on its way is drawn with the open trade's own card and rows (simple.js
   posCard, ffLook), so there is nothing of its own to style: no wait state, no line, no burst. What is here:
   .is-handing, the slide away of a sheet that gives way to the card its press is on (the order sheet, Close part): the slide it
   always had, quick off the mark, so the card is in view sooner; a sheet closed by its ✕ or a swipe slides as it did.
   .is-over, the card of an order that did not open: its top, "Not opened", what happened and its key.
   .is-ff-wait, the trade's picture on a result's screen shown from the press on Close: its place is kept, the picture itself
   comes with the real figures. ---- */
@media screen {
  dialog.sm-sheet.is-out.is-gone.is-handing { animation-timing-function: cubic-bezier(0.3, 0.7, 0.4, 1), ease-in; }
  .sm-pos.is-over > .sm-btn { margin-bottom: 4px; }
  .sm-root .sm-card.is-ff-wait canvas, .sm-panel-body .sm-card.is-ff-wait canvas { opacity: 0; }
}

/* ---- Refer friends (the owner, 2026-11-21: "switch the refer site to the new layout"). The menu's Refer friends opens a
   sheet of Simple's own (simple.js openRefer), where it used to throw the page into Pro.
   .sm-rf-pass: the card. The paper itself (the page colour and its dots) inside the ink line of a trade card, so the link
   reads as a thing to hand over. One shape in every wallet state: a label, the link block (the address small, the code
   large in the mono face; or the same block sunk into the paper as the box that makes it), a row of keys, and under a
   dashed line the QR code with one sentence beside it. Under the card everything is flat: what it earned, how it works,
   who referred this wallet, and the extra codes behind one quiet key.
   The code's size follows the card's own width and the code's length (--n, set by simple.js), so 16 characters fit on
   one line at 320 px and a short code is as large as the card allows. ---- */
@media screen {
  .sm-rf-pass {
    container-type: inline-size; margin-top: 4px; padding: 12px 16px 16px; border: 2px solid var(--ink);
    background-color: var(--page); background-image: radial-gradient(var(--dot) 1px, transparent 1.3px); background-size: 14px 14px;
  }
  /* the card's first line, as a trade card's: what it is on the left, what it does on the right ("earns 15%", the chain's number) */
  .sm-rf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
  .sm-rf-link { display: flex; flex-direction: column; justify-content: center; height: 72px; margin-top: 6px; }
  .sm-rf-pre { display: block; font-family: var(--font-mono); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
  .sm-rf-code {
    display: block; font-family: var(--font-mono); font-weight: 600; font-size: 22px; line-height: 44px; letter-spacing: -0.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-user-select: all; user-select: all;
  }
  @supports (width: 1cqw) { .sm-rf-code { font-size: min(40px, calc(100cqw / (var(--n, 8) * 0.62))); } }
  /* not read yet: a quiet bar where the code will stand (no shimmer) */
  .sm-rf-code.is-wait { width: 58%; height: 24px; margin: 10px 0; background: var(--rule); border-radius: 4px; }
  /* no code yet: the same block is the box that makes it (fields sink in), the address above the typing line */
  .sm-rf-link.is-make {
    padding: 0 14px; cursor: text; background: var(--raised); border-radius: 12px;
    box-shadow: inset 0 0 0 1px var(--key-rim, #8a7f66), inset 0 3px 5px rgba(42, 37, 32, 0.16);
  }
  .sm-rf-link.is-make:focus-within { box-shadow: inset 0 0 0 2px var(--ink), inset 0 3px 5px rgba(42, 37, 32, 0.16); }
  .sm-rf-link.is-make.is-bad { box-shadow: inset 0 0 0 2px var(--sm-neg-t), inset 0 3px 5px rgba(42, 37, 32, 0.16); }
  .sm-rf-link input, .sm-rf-box input {
    display: block; width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink);
    font-family: var(--font-mono); font-weight: 600; letter-spacing: -0.01em; outline: none; box-shadow: none; caret-color: var(--accent);
  }
  .sm-rf-link input { height: 40px; }
  #smRefCode { font-size: 22px !important; } #smRefMore { font-size: 17px !important; }      /* over paper.css's 16 px for every field; both stay 16 px or more, so an iPhone does not zoom */
  .sm-rf-link input::placeholder, .sm-rf-box input::placeholder { color: var(--ink-faint); font-weight: 400; }
  .sm-rf-link input:focus, .sm-rf-box input:focus, .sm-rf-link input:focus-visible, .sm-rf-box input:focus-visible { outline: none; box-shadow: none; }      /* the box shows the focus */
  .sm-rf-link input[disabled], .sm-rf-box input[disabled] { opacity: 0.45; }
  /* the keys right under the link: Copy on paper, Share in ink (alone, a key takes the whole row) */
  .sm-rf-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; padding-bottom: 4px; }
  .sm-rf-keys .sm-btn { height: 52px; padding: 0 8px; font-size: 17px; }
  .sm-rf-keys .sm-btn.is-wide { grid-column: 1 / -1; }
  .sm-rf-keys .sm-btn.is-ghost[disabled], .sm-rf-keys .sm-btn.is-primary[disabled]:not(.is-busy) { opacity: 0.45; }
  /* the QR code, to show a friend in person */
  .sm-rf-show { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding-top: 14px; border-top: 1px dashed var(--rule-strong); }
  .sm-rf-qr { flex: none; display: block; width: 105px; height: 105px; box-shadow: 0 0 0 1px var(--rule-strong); image-rendering: pixelated; }      /* 35 modules at 3 px; simple.js sets the size from the code drawn */
  /* no code yet: the square where it will stand, with a QR code's three corner marks drawn faint */
  .sm-rf-qr.is-off { position: relative; box-shadow: none; outline: 1px dashed var(--sm-edge); background: var(--raised); }
  .sm-rf-qr.is-off i { position: absolute; width: 30px; height: 30px; border: 5px solid var(--rule); }
  .sm-rf-qr.is-off i::after { content: ""; position: absolute; inset: 5px; background: var(--rule); }
  .sm-rf-qr.is-off i:nth-child(1) { left: 12px; top: 12px; } .sm-rf-qr.is-off i:nth-child(2) { right: 12px; top: 12px; } .sm-rf-qr.is-off i:nth-child(3) { left: 12px; bottom: 12px; }
  .sm-rf-tip { min-width: 0; margin: 0; font-size: 15px; line-height: 1.4; color: var(--ink-muted); text-wrap: pretty; }
  .sm-rf-tip b { display: block; margin-bottom: 2px; font-size: 16px; font-weight: 600; color: var(--ink); }
  /* a visitor: what it brings, in the card */
  .sm-rf-pitch { margin-top: 6px; }
  .sm-rf-pitch b { display: block; font-family: var(--font-brand); font-weight: 700; font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; }
  .sm-rf-pitch span { display: block; margin-top: 8px; font-size: 17px; line-height: 1.45; color: var(--ink-muted); text-wrap: pretty; }
  .sm-rf-pitch span + span { margin-top: 0; }

  /* earned so far: the figure, where it lands, and the extra codes' money when some waits */
  .sm-rf-earn { margin-top: 20px; }
  .sm-rf-earn .sm-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-height: 0; margin: 2px 0 4px; font-size: 34px; line-height: 1.15; white-space: nowrap; }      /* a figure in the millions on a narrow phone: USDC goes under it */
  .sm-rf-earn .sm-big small { font-family: var(--font-ui); font-size: 17px; font-weight: 600; letter-spacing: 0; color: var(--ink-muted); }
  .sm-rf-earn > .sm-fine { margin: 0; font-size: 15px; text-wrap: pretty; }
  .sm-rf-claim { display: grid; gap: 10px; margin-top: 14px; padding: 12px 14px 15px; border: 1px solid var(--rule-strong); background: var(--page); font-size: 15px; line-height: 1.35; }
  .sm-rf-claim .sm-btn { height: 48px; padding: 0 8px; font-size: 16px; white-space: nowrap; }

  /* how it works: three numbered lines; who referred this wallet closes the list */
  .sm-rf-how { margin-top: 20px; }
  .sm-rf-how ol { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: rf; border-bottom: 1px solid var(--rule); }
  .sm-rf-how li { counter-increment: rf; display: flex; align-items: baseline; gap: 12px; min-height: 44px; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 16px; line-height: 1.4; text-wrap: pretty; }
  .sm-rf-how li::before { content: counter(rf); flex: none; width: 16px; font-family: var(--font-brand); font-weight: 700; font-size: 15px; }
  .sm-rf-how .sm-kv { min-height: 44px; border-top: 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
  .sm-rf-how .sm-kv > span:last-child { font-weight: 600; overflow-wrap: anywhere; }

  /* more codes: one quiet key, and behind it the list, the box for another code and its key */
  :is(.sm-root, .sm-sheet) .sm-rf-more { --k-lip: 2px; --k-r: 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; margin: 20px 0 6px; padding: 7px 14px; text-align: left; }
  .sm-rf-more .sm-t { min-width: 0; }
  .sm-rf-more b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
  .sm-rf-more .sm-t > span { display: block; font-size: 14px; line-height: 1.35; color: var(--ink-muted); }
  .sm-rf-more .sm-t > span:empty { display: none; }
  .sm-rf-more i { flex: none; font-style: normal; font-size: 20px; line-height: 1; color: var(--ink-muted); transition: transform 150ms ease-out; }
  .sm-rf-more[aria-expanded="true"] i { transform: rotate(90deg); }
  .sm-rf-codes { padding: 6px 0 4px; }
  .sm-rf-codes > .sm-fine { margin: 4px 0 10px; font-size: 14px; }
  .sm-rf-codes > .sm-label { margin-top: 14px; }
  .sm-rf-list:not(:empty) { border-bottom: 1px solid var(--rule); }
  .sm-rf-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 8px 0 11px; border-top: 1px solid var(--rule); }
  .sm-rf-row .sm-t { min-width: 0; }
  .sm-rf-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 16px; font-weight: 600; }
  .sm-rf-row i { display: block; font-style: normal; font-size: 14px; color: var(--ink-muted); }
  .sm-rf-new { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 8px; padding-bottom: 4px; }
  .sm-rf-box { display: flex; align-items: center; height: 48px; padding: 0 12px; cursor: text; background: var(--raised); border-radius: 10px; box-shadow: inset 0 0 0 1px var(--key-rim, #8a7f66), inset 0 3px 5px rgba(42, 37, 32, 0.16); }
  .sm-rf-box:focus-within { box-shadow: inset 0 0 0 2px var(--ink), inset 0 3px 5px rgba(42, 37, 32, 0.16); }
  .sm-rf-box.is-bad { box-shadow: inset 0 0 0 2px var(--sm-neg-t), inset 0 3px 5px rgba(42, 37, 32, 0.16); }
  .sm-rf-box input { height: 100%; }
  .sm-rf-new .sm-btn { width: auto; height: 48px; padding: 0 12px; font-size: 16px; white-space: nowrap; }

  @media (max-width: 374px) {
    .sm-rf-pass { padding: 12px 12px 14px; }
    .sm-rf-keys .sm-btn { font-size: 16px; padding: 0 4px; }
    .sm-rf-show { gap: 12px; }
    .sm-rf-tip { font-size: 14px; } .sm-rf-tip b { font-size: 15px; }
    .sm-rf-pitch b { font-size: 38px; }
  }
  /* more of the sheet below: its foot shows an edge, as Home's bar does over the list */
  .sm-sheet.is-rf .sm-sh-foot { position: relative; z-index: 1; transition: box-shadow 150ms ease-out; }
  .sm-sheet.is-rf.is-more .sm-sh-foot { box-shadow: 0 -1px 0 var(--rule), 0 -12px 16px -12px rgba(42, 37, 32, 0.28); }
  @media (prefers-reduced-motion: reduce) { .sm-rf-more i, .sm-sheet.is-rf .sm-sh-foot { transition: none; } }
}

/* ---- One-tap trading (the owner, 2026-11-21: "when iu click on one tap trading from the menu it brings up the old layout",
   "make one tap the default for all users make them all use it"). The menu's One-tap trading opens a sheet of Simple's own
   (simple.js openOneTap), where it used to throw the page into Pro.
   The card is the Refer friends card (.sm-rf-pass: the paper and its dots inside the ink line of a trade card) holding what a
   trade card holds, in the trade card's own parts: a first line (what it is, how long it lasts), the state large in the brand
   face (as a trade's result), one sentence, a line and a slim bar (the trade card's .sm-room: the trades its HYPE is good for)
   and three facts on one ruled line (.sm-facts). One shape in every state, so nothing moves when the state changes; the state
   word is one size for all of them, set from the card's own width so "Not set up yet" fits a 320 px phone on one line.
   Under the card everything is flat, as in Refer friends. The keys are in the sheet's foot, by the thumb. ---- */
@media screen {
  .sm-ot-pass { margin-top: 4px; padding-bottom: 8px; }
  .sm-ot-pass .sm-pill.is-warn { background: var(--warn-soft); color: var(--warn); }
  .sm-ot-pass .sm-pill.is-plain { background: var(--sunken); color: var(--ink-muted); }
  .sm-ot-word { display: block; height: 48px; margin-top: 6px; font-family: var(--font-brand); font-weight: 700; font-size: 27px; line-height: 48px; letter-spacing: -0.02em; white-space: nowrap; }
  @supports (width: 1cqw) { .sm-ot-word { font-size: min(44px, calc(100cqw / (var(--n, 14) * 0.69))); } }
  .sm-ot-word.is-on { color: var(--sm-pos-t); } .sm-ot-word.is-warn { color: var(--warn); } .sm-ot-word.is-bad { color: var(--sm-neg-t); }
  /* not read yet: a quiet bar where the word will stand (no shimmer) */
  .sm-ot-word.is-wait { width: 46%; height: 24px; margin: 18px 0 10px; background: var(--rule); border-radius: 4px; }
  .sm-ot-sub { min-height: 46px; margin: 4px 0 0; font-size: 16px; line-height: 23px; color: var(--ink-muted); text-wrap: pretty; }
  .sm-ot-meter { margin-top: 12px; }
  .sm-ot-meter .sm-room-l { height: 24px; line-height: 24px; font-size: 16px; }
  .sm-ot-meter .sm-room-v { font-size: 17px; }
  .sm-ot-meter .sm-room-bar { height: 8px; margin-top: 6px; }
  .sm-ot-meter.is-late .sm-room-v { color: var(--ink); }
  /* not set up: the track where its HYPE will show, drawn empty (as the square where a QR code will stand in Refer friends) */
  .sm-ot-meter.is-off .sm-room-bar { background: var(--raised); outline: 1px dashed var(--sm-edge); outline-offset: -1px; }
  .sm-ot-meter.is-off .sm-room-bar i { display: none; }
  .sm-ot-facts { margin-top: 14px; }
  .sm-ot-facts .sm-fact { min-height: 48px; padding: 6px 0 4px; }
  .sm-ot-know { margin: 14px 0 0; font-size: 14px; line-height: 1.45; text-wrap: pretty; }
  /* the keys: one, or Top up and Renew side by side near its end */
  .sm-ot-keys { display: grid; grid-template-columns: 1fr; gap: 10px; padding-bottom: 4px; }
  .sm-ot-keys.is-two { grid-template-columns: 1fr 1.6fr; }
  .sm-ot-keys .sm-btn { height: 52px; padding: 0 8px; font-size: 17px; white-space: nowrap; }
  .sm-ot-keys .sm-btn[hidden] { display: none; }
  /* the foot: one line over the keys (two lines kept, so the keys never move for it), the HYPE the wallet sends in ink, as
     the amount in Add money's wallet line; a hairline parts it from the sheet, with a shade while more is below, as in
     Refer friends */
  .sm-sheet.is-ot .sm-sh-foot .sm-say { min-height: 42px; text-wrap: balance; }
  .sm-sheet.is-ot .sm-sh-foot .sm-say b { font-weight: 600; color: var(--ink); white-space: nowrap; }
  .sm-sheet.is-ot .sm-sh-foot { position: relative; z-index: 1; padding-top: 12px; box-shadow: 0 -1px 0 var(--rule); transition: box-shadow 150ms ease-out; }
  .sm-sheet.is-ot .sm-sh-body { padding-bottom: 10px; }
  .sm-sheet.is-ot.is-more .sm-sh-foot { box-shadow: 0 -1px 0 var(--rule), 0 -12px 16px -12px rgba(42, 37, 32, 0.28); }
  @media (max-width: 374px) {
    .sm-ot-pass { padding: 12px 12px 6px; }
    .sm-ot-sub { font-size: 15px; line-height: 21px; min-height: 63px; }
    .sm-ot-keys .sm-btn { font-size: 16px; padding: 0 4px; }
  }
  @media (prefers-reduced-motion: reduce) { .sm-sheet.is-ot .sm-sh-foot { transition: none; } }
}

  .sm-flip-note .sm-flip-coin { flex: none; display: inline-flex; width: 44px; height: 44px; }
  .sm-flip-note b { letter-spacing: 0.04em; }
