/* Mobile shell — MARKETPLACE list + detail (see mshell/marketplace.js). */
@media (max-width: 979px) {
  html.web-shell .mwk { gap: 13px; }
  html.web-shell .mwk-intro { font-size: 12.5px; line-height: 1.5; color: var(--mws-ink-3); margin: 0 2px; }
  html.web-shell .mwk-search {
    display: flex; align-items: center; gap: 10px; min-height: 44px; box-sizing: border-box;
    background: var(--mws-card); border: 1px solid var(--mws-line); border-radius: 12px;
    padding: 0 14px; color: var(--mws-ink-3);
  }
  html.web-shell .mwk-search:focus-within { border-color: rgba(240, 185, 11, 0.45); }
  html.web-shell .mwk-search-in {
    flex: 1 1 auto; min-width: 0; height: 42px; border: 0; background: transparent; outline: none;
    font: inherit; font-size: 14px; color: var(--mws-ink); padding: 0; -webkit-appearance: none;
  }
  html.web-shell .mwk-search-in::placeholder { color: var(--mws-ink-3); }
  html.web-shell .mwk-sorts { gap: 6px; }
  html.web-shell .mwk-sorts .mws-chip { min-height: 34px; padding: 6px 13px; font-size: 11px; }
  html.web-shell .mwk-group { display: flex; flex-direction: column; gap: 12px; }
  html.web-shell .mwk-group[hidden], html.web-shell .mwk-card[hidden], html.web-shell .mwk [hidden] { display: none !important; }
  html.web-shell .mwk-secsub { letter-spacing: 0.08em; }

  html.web-shell .mwk-card { cursor: pointer; min-width: 0; }
  html.web-shell .mwk-card.featured {
    border-color: rgba(240, 185, 11, 0.22);
    background: linear-gradient(180deg, rgba(240, 185, 11, 0.05), rgba(240, 185, 11, 0) 60%), var(--mws-card);
  }
  html.web-shell .mwk-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
  html.web-shell .mwk-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
  html.web-shell .mwk-id .nm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
  html.web-shell .mwk-id .nm .c { font-weight: 800; font-size: 14.5px; }
  html.web-shell .mwk-id .ttl {
    font-size: 12.5px; font-weight: 600; color: var(--mws-ink-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  html.web-shell .mwk-id .by {
    font-size: 11px; color: var(--mws-ink-3);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  html.web-shell .mwk-roc {
    flex-shrink: 0; font-family: var(--mws-mono); font-size: 14px; font-weight: 600;
    white-space: nowrap; align-self: flex-start; margin-top: 4px;
  }
  html.web-shell .mwk-meta {
    display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 10px;
    border-top: 1px solid var(--mws-line-2);
    font-family: var(--mws-mono); font-size: 10.5px; color: var(--mws-ink-3);
  }
  html.web-shell .mwk-meta b { font-weight: 600; }
  html.web-shell .mwk-note {
    font-size: 12px; line-height: 1.45; color: var(--mws-ink-2);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  html.web-shell .mwk-filters {
    display: flex; gap: 8px; align-items: baseline; font-size: 11.5px; color: var(--mws-ink-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  html.web-shell .mwk-use { height: 42px; font-size: 13px; }
  html.web-shell .mwk-useline { color: var(--mws-gold); border-color: rgba(240, 185, 11, 0.4); }
  html.web-shell .mwk-emt { font-weight: 800; color: var(--mws-ink); margin-bottom: 4px; }

  /* _ccUse coin picker (legacy .card / .btn.secondary markup) */
  html.web-shell .mwk-usehost:empty { display: none; }
  html.web-shell .mwk-usehost > .muted { font-size: 12px; color: var(--mws-ink-3); }
  html.web-shell .mwk-usehost > .card {
    margin: 0 !important; padding: 12px; border-radius: 12px;
    background: var(--mws-well); border: 1px solid var(--mws-line); box-shadow: none;
  }
  html.web-shell .mwk-usehost .card > .muted { font-size: 12px; line-height: 1.45; color: var(--mws-ink-2); }
  html.web-shell .mwk-usehost .button-row { display: flex; flex-wrap: wrap; gap: 8px; }
  html.web-shell .mwk-usehost .btn {
    width: auto; min-height: 40px; padding: 0 16px; border-radius: 999px; margin: 0;
    background: transparent; border: 1px solid rgba(240, 185, 11, 0.4); color: var(--mws-gold);
    font-family: var(--mws-mono); font-size: 12px; font-weight: 600; box-shadow: none;
  }
  /* main create / apply buttons: same look as the "Use in my bot →" button above */
  html.web-shell .mwk-usehost .cc-use-btns .btn {
    width: 100%; min-height: 42px; border-radius: 12px; padding: 0 14px;
    font-family: var(--font); font-size: 13px; font-weight: 800; white-space: nowrap;
    background: transparent; color: var(--mws-ink-2); border: 1px solid var(--mws-line-strong);
  }
  html.web-shell .mwk-usehost .cc-use-btns .btn:not(.secondary) {
    background: rgba(240, 185, 11, 0.16); color: var(--mws-gold); border-color: rgba(240, 185, 11, 0.4);
  }

  /* ------------------------------------------------------ detail */
  html.web-shell .mwk .mws-stat .v.positive, html.web-shell .mwk .positive { color: var(--mws-up); }
  html.web-shell .mwk .mws-stat .v.negative, html.web-shell .mwk .negative { color: var(--mws-down); }
  html.web-shell .mwk-hname { font-weight: 800; }
  html.web-shell .mwk-hero.featured { border-color: rgba(240, 185, 11, 0.22); }
  html.web-shell .mwk-eyebrow { color: var(--mws-gold); }
  html.web-shell .mwk-htitle { font-size: 17px; font-weight: 800; line-height: 1.3; }
  html.web-shell .mwk-hby { font-size: 12px; color: var(--mws-ink-3); margin-top: -6px; }
  html.web-shell .mwk-track { font-size: 12.5px !important; }
  html.web-shell .mwk-hnote {
    font-size: 12.5px; line-height: 1.5; color: var(--mws-ink-2);
    padding-top: 12px; border-top: 1px solid var(--mws-line-2);
  }
  html.web-shell .mwk-actions { display: flex; flex-direction: column; gap: 10px; }
  html.web-shell .mwk-chead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  html.web-shell .mwk-fine { font-size: 11.5px; line-height: 1.45; color: var(--mws-ink-3); }
  html.web-shell .mwk-gates .mwk-chead { padding-bottom: 8px; }
  html.web-shell .mwk-changed {
    display: flex; gap: 7px; align-items: flex-start; font-size: 12px; line-height: 1.4;
    color: var(--mws-ink-2); padding: 0 0 10px;
  }
  html.web-shell .mwk-changed.warn { color: var(--mws-gold); }
  html.web-shell .mwk-changed svg { flex-shrink: 0; margin-top: 1px; }
  html.web-shell .mwk-gate {
    padding: 12px 0 12px 12px; border-top: 1px solid var(--mws-line-2); cursor: pointer;
    position: relative; display: flex; flex-direction: column; gap: 4px;
  }
  html.web-shell .mwk-gate::before {
    content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px;
    background: var(--mws-up);
  }
  html.web-shell .mwk-gate.risk::before { background: var(--mws-down); }
  html.web-shell .mwk-gate.sizing::before, html.web-shell .mwk-gate.target::before { background: var(--mws-gold); }
  html.web-shell .mwk-gate.exit::before { background: var(--mws-demo); }
  html.web-shell .mwk-ghead { display: flex; align-items: center; gap: 8px; min-height: 22px; }
  html.web-shell .mwk-ghead .n { font-weight: 800; font-size: 14px; }
  html.web-shell .mwk-ghead .chev {
    margin-left: auto; color: var(--mws-ink-3); font-size: 18px; line-height: 1; transition: transform .15s;
  }
  html.web-shell .mwk-gate.open .chev { transform: rotate(90deg); }
  html.web-shell .mwk-gsum { font-family: var(--mws-mono); font-size: 11px; color: var(--mws-ink-3); line-height: 1.5; }
  html.web-shell .mwk-gate.open .mwk-gsum { display: none; }
  html.web-shell .mwk-gbody { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
  html.web-shell .mwk-gbody .d { font-size: 12.5px; line-height: 1.5; color: var(--mws-ink-2); }
  html.web-shell .mwk-gbody .e { font-size: 12px; line-height: 1.45; color: var(--mws-gold); }
  html.web-shell .mwk-gparams { display: flex; flex-wrap: wrap; gap: 6px; }
  html.web-shell .mwk-gparams span {
    font-family: var(--mws-mono); font-size: 11px; color: var(--mws-ink-3);
    background: var(--mws-well); border: 1px solid var(--mws-line); border-radius: 8px; padding: 4px 8px;
  }
  html.web-shell .mwk-gparams b { color: var(--mws-ink); font-weight: 600; }
  html.web-shell .mwk-off {
    display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--mws-line-2);
    font-size: 12px; line-height: 1.5; color: var(--mws-ink-3);
  }
  html.web-shell .mwk-remove {
    align-self: center; display: inline-flex; align-items: center; gap: 6px;
    min-height: 40px; padding: 6px 12px; font-size: 12.5px;
  }

  /* legacy lazy cards (Strategy changes / Trade history / monthly) */
  html.web-shell .mwk .card.mwk-legacy {
    margin: 0; background: var(--mws-card); border: 1px solid var(--mws-line);
    border-radius: 16px; padding: 16px; box-shadow: none;
  }
  html.web-shell .mwk-legacy .cc-strat-head { margin-bottom: 10px; }
  html.web-shell .mwk-legacy .cc-strat-title {
    font-family: var(--mws-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--mws-ink-3);
  }
  html.web-shell .mwk-legacy .muted { color: var(--mws-ink-3); }
  html.web-shell .mwk-legacy .cc-th-head {
    display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px;
    font-family: var(--mws-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--mws-ink-3); padding-bottom: 6px;
  }
  html.web-shell .mwk-legacy .cc-th-row {
    display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px; align-items: center;
    padding: 10px 0; border-top: 1px solid var(--mws-line-2); font-family: var(--mws-mono); font-size: 11.5px;
  }
  html.web-shell .mwk-legacy .cc-th-date { display: flex; flex-direction: column; gap: 2px; }
  html.web-shell .mwk-legacy .cc-th-time { color: var(--mws-ink-3); font-size: 10.5px; }
  html.web-shell .mwk-legacy .cc-th-px { color: var(--mws-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.web-shell .mwk-legacy .cc-th-pnl { text-align: right; font-weight: 600; white-space: nowrap; }
  html.web-shell .mwk-legacy .cc-th-pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
  html.web-shell .mwk-legacy .cc-th-pg {
    min-width: 36px; height: 36px; border-radius: 10px; background: transparent;
    border: 1px solid var(--mws-line); color: var(--mws-ink-2); font-family: var(--mws-mono); font-size: 12px;
  }
  html.web-shell .mwk-legacy .cc-th-pg.active {
    background: rgba(240, 185, 11, 0.14); border-color: rgba(240, 185, 11, 0.35); color: var(--mws-gold);
  }
  html.web-shell .mwk-legacy .cc-th-pg:disabled { opacity: 0.4; }
  html.web-shell .mwk-legacy .cc-th-ellip { align-self: center; color: var(--mws-ink-3); }
  html.web-shell .mwk-legacy .cc-ver { padding: 10px 0; border-top: 1px solid var(--mws-line-2); }
  html.web-shell .mwk-legacy .cc-ver-head {
    display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
    font-size: 12px; font-weight: 700;
  }
  html.web-shell .mwk-legacy .cc-ver-pnl { font-family: var(--mws-mono); font-size: 11.5px; }
  html.web-shell .mwk-legacy .cc-ver-now {
    margin-left: 6px; font-family: var(--mws-mono); font-size: 9.5px; color: var(--mws-up);
    background: rgba(32, 199, 117, 0.12); padding: 1px 6px; border-radius: 6px;
  }
  html.web-shell .mwk-legacy .cc-ver-change,
  html.web-shell .mwk-legacy .cc-ver-base {
    display: flex; gap: 6px; flex-wrap: wrap; font-family: var(--mws-mono); font-size: 11px;
    color: var(--mws-ink-3); margin-top: 5px;
  }
  html.web-shell .mwk-legacy .cc-ver-to { color: var(--mws-ink); }
}
