.market {
  flex: 1; display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr); align-items: start;
  gap: 24px; padding: 24px clamp(16px, 4vw, 48px) 40px; max-width: 1400px; width: 100%; margin: 0 auto;
}
.market-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.side-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.side-card h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; }
.side-card h2 .ms { color: var(--accent); font-size: 20px; }

.market-head { padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.mh-text h1 { margin: 0 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.mh-text p { margin: 0; font-size: 14px; color: var(--muted); max-width: 52ch; }
.closed-note { display: flex; align-items: center; gap: 8px; width: 100%; order: 3; background: rgba(246, 196, 83, .1); border: 1px solid rgba(246, 196, 83, .3); border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--gold); }
.closed-note .ms { font-size: 18px; }
.mh-meta { display: flex; gap: 10px; }
.meta-box { background: var(--inner); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 110px; }
.meta-box .k { font-size: 12px; color: var(--muted-2); font-weight: 600; }
.meta-box .v { font-size: 16px; font-weight: 700; }

.stock-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.stock { padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; animation: hjCardIn .35s ease both; }
.stock-head { display: flex; align-items: flex-start; gap: 12px; }
.stock-tile { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--inner); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.stock-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.stock-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; }
.stock-name .ticker { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted-2); background: var(--inner); border-radius: 6px; padding: 2px 6px; }
.stock-desc { font-size: 12px; color: var(--muted-2); line-height: 1.45; }
.stock-quote { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.stock-price { font-size: 19px; font-weight: 800; }
.chip { font-family: var(--mono); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: var(--inner); color: var(--muted); }
.chip.up, .mono.up, .up { color: var(--green); }
.chip.down, .mono.down, .down { color: var(--red); }
.chip.up { background: rgba(143, 227, 168, .12); }
.chip.down { background: rgba(243, 154, 154, .12); }

.spark { width: 100%; height: 72px; display: block; color: var(--muted-2); }
.spark.up { color: var(--green); }
.spark.down { color: var(--red); }
.spark-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: currentColor; opacity: .1; stroke: none; }

.stock-foot { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--muted-2); }
.stock-foot > span:first-child { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stock-foot b { color: var(--text-2); font-weight: 700; }
.dot { color: var(--dim); }
.stock-own { display: flex; align-items: center; gap: 10px; background: var(--inner); border-radius: 10px; padding: 8px 12px; }
.stock-own .own-k { font-size: 12px; font-weight: 700; color: var(--text-2); flex: 1; }
.stock-own .own-v { font-size: 13px; font-weight: 700; }
.stock-own .own-pl { font-size: 12px; font-weight: 700; }

.trade { display: flex; flex-direction: column; gap: 8px; }
.trade-row { display: flex; gap: 8px; }
.trade-input {
  flex: 1; min-width: 0; background: var(--inner); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px; color: var(--text); font-size: 15px; font-weight: 700;
}
.trade-input:focus { outline: none; border-color: var(--accent); }
.trade-presets { display: flex; gap: 4px; background: var(--inner); border-radius: 10px; padding: 4px; }
.trade-presets button { border: none; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 7px; cursor: pointer; }
.trade-presets button:hover { background: var(--raised); color: var(--text); }
.trade-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trade-btns .btn { justify-content: center; }
.trade-btns .btn[disabled] { opacity: .45; cursor: default; }
.trade-note { font-size: 12px; color: var(--muted-2); display: flex; flex-wrap: wrap; gap: 6px; }
.trade-note b { color: var(--text-2); font-family: var(--mono); }

.depot-sum { display: flex; flex-direction: column; gap: 8px; }
.depot-sum > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; background: var(--inner); border-radius: 10px; padding: 9px 12px; }
.depot-sum .k { font-size: 12px; font-weight: 600; color: var(--muted-2); }
.depot-sum .v { font-size: 15px; font-weight: 800; }
.depot-list { display: flex; flex-direction: column; gap: 6px; }
.depot-list .empty { font-size: 13px; color: var(--muted-2); }
.depot-row { display: grid; grid-template-columns: 20px 44px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; font-size: 12px; padding: 4px 2px; }
.depot-row .ms { color: var(--muted); font-size: 18px; }
.depot-row .d-name { font-family: var(--mono); font-weight: 700; color: var(--text-2); }
.depot-row .d-n { color: var(--muted-2); }
.depot-row .d-v { font-weight: 700; }
.depot-row .d-pl { font-weight: 700; }

.info-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.info-list li { display: flex; gap: 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.info-list .ms { color: var(--accent); font-size: 18px; flex: none; margin-top: 1px; }
.info-list b { color: var(--text-2); }

@media (max-width: 1000px) {
  .market { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .market-head { padding: 18px; }
  .mh-meta { width: 100%; }
  .meta-box { flex: 1; min-width: 0; }
  .trade-btns { grid-template-columns: 1fr; }
}
