/* Mobile shell — STRATEGY SETTINGS (see mshell/settings.js). */
@media (max-width: 979px) {
  html.web-shell .mwst { gap: 13px; padding-bottom: 8px; }
  html.web-shell .mwst-ht { overflow: hidden; text-overflow: ellipsis; }
  html.web-shell .mwst-form { display: flex; flex-direction: column; gap: 13px; margin: 0; }
  html.web-shell .mwst-card { padding: 4px 16px; gap: 0; }
  html.web-shell .mwst-cl { padding: 13px 0 4px; }
  html.web-shell .mwst-list { display: flex; flex-direction: column; }
  html.web-shell .mwst-list > * + * { border-top: 1px solid var(--mws-line-2); }

  /* numeric rows: label left, compact well right */
  html.web-shell .mwst .mwst-nrw { margin: 0; padding: 0; }
  html.web-shell .mwst-nr {
    display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 7px 0;
  }
  html.web-shell .mwst-nr.core { min-height: 56px; }
  html.web-shell .mwst-nrl {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--mws-ink-2);
  }
  html.web-shell .mwst-nrl .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.web-shell .mwst-nr.core .mwst-nrl { font-size: 14px; }
  html.web-shell .mwst-well {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px;
    height: 38px; box-sizing: border-box; padding: 0 12px;
    background: var(--mws-well); border: 1px solid var(--mws-line-strong); border-radius: 9px;
    font-family: var(--mws-mono); font-size: 14px; font-weight: 600; color: var(--mws-ink);
    max-width: 62%;
  }
  html.web-shell .mwst-well:focus-within { border-color: rgba(240, 185, 11, 0.55); }
  html.web-shell .mwst-well .u { color: var(--mws-ink-2); font-weight: 600; }
  html.web-shell .mwst-well .u:last-child { margin-left: 3px; }
  html.web-shell .mwst input.mwst-in {
    width: 5ch; max-width: 12ch; min-width: 0; height: auto; padding: 0; margin: 0;
    background: transparent; border: 0; border-radius: 0; box-shadow: none; outline: none;
    font-family: var(--mws-mono); font-size: 14px; font-weight: 600; color: var(--mws-ink);
    text-align: right; -moz-appearance: textfield;
  }
  html.web-shell .mwst input.mwst-in::-webkit-outer-spin-button,
  html.web-shell .mwst input.mwst-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  html.web-shell .mwst input.mwst-in:disabled { color: var(--mws-ink-3); }
  html.web-shell .mwst-well.sel { padding: 0 8px 0 10px; }
  html.web-shell .mwst select.mwst-sel {
    min-width: 0; max-width: 100%; height: 36px; margin: 0; padding: 0 18px 0 0;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2369727f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right center / 13px no-repeat;
    border: 0; box-shadow: none; -webkit-appearance: none; appearance: none;
    font-family: var(--mws-mono); font-size: 12.5px; font-weight: 600; color: var(--mws-ink);
    text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  }
  html.web-shell .mwst-hint,
  html.web-shell .mwst .mwst-hint {
    font-size: 11.5px; line-height: 1.5; color: var(--mws-ink-3); margin: -2px 0 10px;
  }
  html.web-shell .mwst-hint[hidden] { display: none; }
  html.web-shell .mwst-i {
    flex: 0 0 auto; width: 26px; height: 26px; margin: -4px 0; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 0; border-radius: 50%; color: var(--mws-ink-3); cursor: pointer;
  }
  html.web-shell .mwst-i.on { color: var(--mws-gold); }

  /* exposure readout under the core rows */
  html.web-shell .mwst .mwst-expo {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
    margin: 0; padding: 12px 0 14px; border: 0; border-top: 1px solid var(--mws-line-2);
    background: none; border-radius: 0; box-shadow: none;
  }
  html.web-shell .mwst-expo .label {
    font-family: var(--mws-mono); font-size: 10px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--mws-ink-3); margin-right: auto;
  }
  html.web-shell .mwst-expo .value { font-family: var(--mws-mono); font-size: 13px; font-weight: 600; color: var(--mws-ink); }
  html.web-shell .mwst-expo .cap { font-family: var(--mws-mono); font-size: 11.5px; color: var(--mws-ink-3); }
  html.web-shell .mwst-expo .cap[data-over="true"] { color: var(--mws-down); }

  /* toggle rows: name · tag · (i) · switch */
  html.web-shell .mwst-tr { display: flex; flex-direction: column; }
  html.web-shell .mwst-trh {
    display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 0;
    cursor: pointer; margin: 0;
  }
  html.web-shell .mwst-trh .txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  html.web-shell .mwst-trh .l1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  html.web-shell .mwst-trh .nm {
    font-size: 13.5px; font-weight: 700; color: var(--mws-ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  html.web-shell .mwst-trh .tag {
    font-family: var(--mws-mono); font-size: 9px; letter-spacing: 0.04em; color: var(--mws-ink-3);
    flex-shrink: 0;
  }
  html.web-shell .mwst-trh .sub {
    font-size: 11px; color: var(--mws-ink-3); line-height: 1.35;
  }
  html.web-shell .mwst-trh input.mws-switch { flex-shrink: 0; }
  html.web-shell .mwst-params {
    display: flex; flex-direction: column;
    margin: 0 0 12px; padding: 2px 12px; border-radius: 12px;
    background: var(--mws-bg); border: 1px solid var(--mws-line-2);
  }
  html.web-shell .mwst-params > * + *,
  html.web-shell .mwst-params .vortex-body > * + *,
  html.web-shell .mwst-flat > * + * { border-top: 1px solid var(--mws-line-2); }
  html.web-shell .mwst .mwst-params .vortex-body {
    display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; background: none;
  }
  html.web-shell .mwst .mwst-params .vortex-body[style*="none"] { display: none; }
  html.web-shell .mwst .mwst-flat { display: flex; flex-direction: column; gap: 0; margin: 0; }
  html.web-shell .mwst .mwst-params .field { margin: 0; }
  html.web-shell .mwst-params > div:not([class]) { font-size: 12px; color: var(--mws-ink-3); line-height: 1.5; padding: 8px 0; }

  /* nested switch rows (BUY / SELL half, USDT volume) */
  html.web-shell .mwst .mwst-subtog {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    min-height: 44px; padding: 6px 0; margin: 0; cursor: pointer;
    font-size: 13px; color: var(--mws-ink-2);
  }
  html.web-shell .mwst .mwst-subtogw .mwst-hint.shown { display: block; margin-top: -4px; }

  /* explanation panel (the legacy "i" panel, re-homed) */
  html.web-shell .mwst .mwst-explain {
    margin: 0 0 12px; padding: 12px; border-radius: 12px;
    background: var(--mws-well); border: 1px solid var(--mws-line);
    font-size: 12px; color: var(--mws-ink-2);
  }
  html.web-shell .mwst .mwst-explain[hidden] { display: none; }
  html.web-shell .mwst-explain-title {
    margin: 0 0 6px; font-family: var(--mws-mono); font-size: 10px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--mws-gold);
  }
  html.web-shell .mwst-explain-lead { margin: 0 0 8px; font-weight: 700; color: var(--mws-ink); line-height: 1.5; }

  /* live readouts */
  html.web-shell .mwst .mwst-live {
    margin: 8px 0; padding: 10px 12px; border-radius: 10px;
    background: var(--mws-well); border: 1px solid var(--mws-line);
    font-size: 11.5px; color: var(--mws-ink-2);
  }
  html.web-shell .mwst .mwst-live .label {
    font-family: var(--mws-mono); font-size: 9.5px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--mws-ink-3);
  }
  html.web-shell .mwst .mwst-live .stats { font-family: var(--mws-mono); font-size: 11px; margin-top: 4px; overflow-wrap: anywhere; }
  html.web-shell .mwst .mwst-live .verdict { margin-top: 4px; font-weight: 700; }
  html.web-shell .mwst .mwst-live.ok .verdict { color: var(--mws-up); }
  html.web-shell .mwst .mwst-live.blocked .verdict { color: var(--mws-down); }

  /* TP ladder + monthly progress */
  html.web-shell .mwst .tp-tiers-list { padding-top: 8px; }
  html.web-shell .mwst .tp-tiers-list > div {
    flex-wrap: wrap; gap: 6px !important; row-gap: 6px; font-size: 12.5px; color: var(--mws-ink-2);
    padding: 6px 0; border-bottom: 1px solid var(--mws-line-2);
  }
  html.web-shell .mwst .tp-tiers-list > div > span:first-child { min-width: 0 !important; font-family: var(--mws-mono); font-size: 11px; }
  html.web-shell .mwst .tp-tiers-list input {
    width: 58px !important; max-width: 58px !important; height: 34px; padding: 0 8px; margin: 0;
    border-radius: 8px; background: var(--mws-well); border: 1px solid var(--mws-line-strong); box-shadow: none;
    font-family: var(--mws-mono); font-size: 13px; font-weight: 600; color: var(--mws-ink); text-align: right;
  }
  html.web-shell .mwst .tp-tiers-list button {
    margin-left: auto; height: 30px; padding: 0 12px !important; border-radius: 999px; min-height: 0; width: auto;
    background: transparent; border: 1px solid rgba(234, 57, 67, 0.35); color: var(--mws-down);
    font-size: 11.5px; font-weight: 700; box-shadow: none;
  }
  html.web-shell .mwst .mwst-mini {
    height: 34px; padding: 0 14px; border-radius: 999px; min-height: 0;
    background: transparent; border: 1px solid var(--mws-line); color: var(--mws-ink-2);
    font-size: 12px; font-weight: 700; box-shadow: none; width: auto;
  }
  html.web-shell .mwst .mwst-mini:not(.ghost) { color: var(--mws-gold); border-color: rgba(240,185,11,0.35); }
  html.web-shell .mwst .mpt-progress { padding: 8px 0 10px; }

  /* folded "off" filters */
  html.web-shell .mwst-off { border-top: 1px solid var(--mws-line-2); }
  html.web-shell .mwst-card > .mwst-off:nth-child(2) { border-top: 0; }
  html.web-shell .mwst-offhead {
    width: 100%; display: flex; align-items: center; gap: 10px;
    min-height: 46px; padding: 10px 0; background: none; border: 0; cursor: pointer;
    font-family: var(--font); font-size: 12px; color: var(--mws-ink-3); text-align: left;
  }
  html.web-shell .mwst-offhead .t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.web-shell .mwst-offhead .chev { display: inline-flex; transition: transform .15s; }
  html.web-shell .mwst-off.open .mwst-offhead .chev { transform: rotate(180deg); }
  html.web-shell .mwst-offbody { border-top: 1px solid var(--mws-line-2); }
  html.web-shell .mwst-none { font-size: 12px; color: var(--mws-ink-3); padding: 10px 0 12px; }

  /* sticky save pill above the tab bar */
  html.web-shell .mwst-savebar {
    position: sticky; z-index: 5;
    bottom: calc(var(--nav-h, 56px) + env(safe-area-inset-bottom, 0px) + 10px);
    padding-top: 4px;
  }
  html.web-shell .mwst .mwst-save { height: 50px; width: 100%; font-size: 14.5px; }
  html.web-shell .mwst-tick { font-size: 11px; margin-top: -4px; }

  /* paper: banner + wallet card */
  html.web-shell .mwst .mwst-paper {
    display: flex; align-items: center; gap: 8px; margin: 0;
    padding: 10px 14px; border-radius: 12px;
    background: rgba(139, 123, 255, 0.08); border: 1px solid rgba(139, 123, 255, 0.3);
    font-size: 12px; color: var(--mws-ink-2);
  }
}
