body { background-color: #faf6ef; }
.ma-shell {
  --ma-ink: #251f1a;
  --ma-muted: #685749;
  --ma-accent: #963b23;
  --ma-line: #ebddd1;
  --ma-white: #fffdf9;
  box-sizing: border-box;
  width: 100%;
  max-width: 744px;
  min-height: calc(100vh - 56px);
  min-height: calc(100svh - 56px);
  padding: 0 12px 20px;
  margin: 0 auto;
  background: #faf6ef;
  color: var(--ma-ink);
  font: 14px/1.45 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.ma-shell *, .ma-shell *::before, .ma-shell *::after { box-sizing: border-box; }
.ma-shell a:focus-visible, .ma-shell button:focus-visible, .ma-shell input:focus-visible {
  outline: 2px solid var(--ma-accent);
  outline-offset: 2px;
}
.ma-shell h1, .ma-shell h2 { font-weight: 800; }
.ma-shell #head-bar .ma-head {
  background-color: #fffaf5;
  color: var(--ma-ink);
}
.ma-shell .ma-head .head-bar-title,
.ma-shell .ma-head .head-tab-tb a,
.ma-shell .ma-head .head-tab-on a { color: var(--ma-ink); }
.ma-shell .ma-head .head-tab-on { border-bottom-color: var(--ma-accent); }
.ma-shell .ma-head .head-tab-on a { color: var(--ma-accent); }
.ma-shell .ma-head .ma-head-link {
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 46px;
  white-space: nowrap;
  color: var(--ma-accent);
  font-size: 12px;
  font-weight: 750;
}
.ma-shell ~ .foot-bar :is(.icon-my-on,.icon-cart-on,.icon-message-on) span { color: #963b23; }

.ma-account { padding-top: 12px; }
.ma-page-title { margin: 1px 2px 10px; font-size: 21px; }
.ma-profile {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 94px;
  padding: 12px;
  border: 1px solid #ecd3c4;
  border-radius: 16px;
  background: linear-gradient(135deg,#f3dfd2,#fff8f1);
}
.ma-avatar a, .ma-avatar img {
  display: block;
  width: 54px;
  height: 54px;
  border-radius: 50%;
}
.ma-avatar img { border: 2px solid #fffaf5; object-fit: cover; }
.ma-identity { min-width: 0; overflow-wrap: anywhere; }
.ma-identity a { color: var(--ma-ink); }
.ma-identity p { margin: 0; font-weight: 800; font-size: 18px; }
.ma-identity b { color: var(--ma-muted); font-weight: 620; font-size: 12px; }
.ma-setting a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: #fffaf5;
  color: var(--ma-accent);
  font-weight: 720;
  font-size: 12px;
}
.ma-metrics {
  margin: 9px 0 0;
  padding: 4px 2px;
  border: 1px solid var(--ma-line);
  border-radius: 14px;
  background: var(--ma-white);
}
.ma-metrics ul, .ma-tile-block ul {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.ma-metrics a {
  display: grid;
  place-content: center;
  min-height: 60px;
  padding: 4px 2px;
  text-align: center;
  color: var(--ma-muted);
  font-size: 11px;
}
.ma-metrics li + li { border-left: 1px solid #f2e8df; }
.ma-metrics b {
  color: var(--ma-accent);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.ma-tile-block { margin: 14px 0 0; }
.ma-tile-block h2 { margin: 0 2px 7px; font-size: 16px; }
.ma-tile-block ul {
  padding: 4px;
  gap: 3px;
  border: 1px solid var(--ma-line);
  border-radius: 14px;
  background: var(--ma-white);
}
.ma-tile-block li { min-width: 0; }
.ma-tile-block a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 65px;
  padding: 4px 1px;
  color: var(--ma-ink);
  font-size: 12px;
  font-weight: 650;
  border-radius: 9px;
}
.ma-tile-block img { width: 25px; height: 25px; object-fit: contain; }
.ma-quick li:first-child a { background: #f6e9df; color: var(--ma-accent); }
.ma-legal { margin-top: 14px; padding: 10px 1px 4px; color: var(--ma-muted); }
.ma-legal .blank-16 { height: 8px; }
.ma-legal a, .ma-legal .b { color: var(--ma-muted); }

.ma-state {
  display: grid;
  justify-items: center;
  gap: 7px;
  margin: 15px 0 12px;
  padding: 24px 12px 21px;
  border: 1px solid var(--ma-line);
  border-radius: 16px;
  text-align: center;
  background: var(--ma-white);
}
.ma-state-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 2px;
  border-radius: 16px;
  background: #f3e6dc;
}
.ma-state-icon img { width: 26px; height: 26px; object-fit: contain; }
.ma-state h2 { margin: 0; font-size: 17px; }
.ma-state p { margin: 0; color: var(--ma-muted); font-size: 13px; }
.ma-state-actions { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin: 5px 0 0; }
.ma-state-actions a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ma-accent);
  border: 1px solid #dcc1b3;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 730;
  white-space: nowrap;
}
.ma-state-actions .ma-primary {
  color: white;
  border-color: var(--ma-accent);
  background: var(--ma-accent);
}
.ma-state-actions .ma-secondary { background: #fffaf5; }

.ma-message .ma-inbox { padding-top: 11px; }
.ma-message .list-tab { width: 100%; margin: 0 0 10px; padding: 0; }
.ma-message .list-tab ul {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  height: auto;
  gap: 3px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--ma-line);
  border-radius: 11px;
  background: var(--ma-white);
}
.ma-message .list-tab li, .ma-message .list-tab li.on {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: auto;
  float: none;
  margin: 0;
  border: 0;
  background: transparent;
}
.ma-message .list-tab li a {
  display: grid;
  place-items: center;
  min-height: 40px;
  color: var(--ma-muted);
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
}
.ma-message .list-tab li.on a { color: var(--ma-accent); background: #f5e8dd; font-weight: 750; }
.ma-message .list-tab li span, .ma-message .list-tab li.on span {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
}
.ma-message #message { margin: 0 0 8px; background: var(--ma-white); }
.ma-message .ma-empty-mail { margin: 0; }
.ma-message .ma-capacity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 8px 1px 0;
  padding: 6px 0;
  color: var(--ma-muted);
  background: transparent;
  font-size: 12px;
}
.ma-message .ma-capacity b { color: var(--ma-accent); font-variant-numeric: tabular-nums; }
.ma-message .ma-capacity span { margin-left: auto; }
.ma-message #list .ui-list-mix,
.ma-message #chat-list .list-chat {
  margin: 0 0 7px;
  border: 1px solid var(--ma-line);
  border-radius: 12px;
  background: var(--ma-white);
}
.ma-message .chat-spin, .ma-message #chat-list > div:only-child:not(.chat-spin) {
  display: grid;
  place-items: center;
  height: auto;
  min-height: 108px;
  padding: 18px 10px !important;
  border: 1px solid var(--ma-line);
  border-radius: 14px;
  background: var(--ma-white);
  color: var(--ma-muted);
}
.ma-chat > .list-tab { margin-top: 12px; }

.ma-cart .nav { display: none; }
.ma-cart .m { width: 100%; margin: 0; }
.ma-cart .list-seller, .ma-cart .list-goods {
  border: 1px solid var(--ma-line);
  border-radius: 11px;
  background: var(--ma-white);
  margin: 7px 0;
}
.ma-cart .list-goods .c2 img { border-radius: 8px; object-fit: contain; }
.ma-cart .list-goods p { white-space: normal; overflow-wrap: anywhere; }
.ma-cart .list-goods em { color: var(--ma-accent); font-weight: 740; }
.ma-cart .ma-qty, .ma-cart .ma-remove {
  min-width: 30px;
  min-height: 34px;
  border: 1px solid var(--ma-line);
  color: var(--ma-ink);
  background: #f8eee5;
  border-radius: 6px;
  font: 720 14px/1 system-ui,sans-serif;
  cursor: pointer;
}
.ma-cart .ma-remove { padding: 0 8px; font-size: 12px; color: var(--ma-accent); }
.ma-cart .list-goods :is(.a1,.a2,.a3) { background: transparent; border: 0; }
.ma-cart .list-goods .a2 input, .ma-cart .ma-stock-product .cc_inp {
  width: 38px;
  height: 34px;
  border: 1px solid var(--ma-line);
  border-radius: 6px;
  text-align: center;
  font-size: 16px;
  color: var(--ma-ink);
  background: white;
}
.ma-cart .cart-foot input[type=submit],
.ma-cart :is(.ui-ok,.ui-ko) .btn-green {
  background: var(--ma-accent);
  color: white;
  border-color: var(--ma-accent);
  border-radius: 9px;
}
.ma-cart .cart-foot input[type=submit] { min-height: 44px; }
.ma-stock-cart .tb, .ma-stock-cart .tb tbody { display: block; width: 100%; }
.ma-stock-cart .ma-stock-titles { display: none; }
.ma-stock-cart tr.ma-stock-seller {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  background: #f6e8dd;
  border-radius: 10px;
  padding: 7px;
  margin: 9px 0 6px;
}
.ma-stock-cart .ma-stock-seller td { padding: 0; border: 0; vertical-align: middle; }
.ma-stock-cart .ma-stock-seller td:empty { display: none; }
.ma-stock-cart .ma-stock-seller td:nth-child(2) { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.ma-stock-cart tr.ma-stock-product {
  display: grid;
  grid-template-columns: 20px 60px minmax(0,1fr) minmax(0,auto);
  grid-template-areas: "check photo title title" ". photo stock stock" ". price price qty" ". total total remove";
  align-items: center;
  gap: 5px 7px;
  padding: 8px;
  margin-bottom: 7px;
  border: 1px solid var(--ma-line);
  border-radius: 12px;
  background: var(--ma-white);
  color: var(--ma-ink);
}
.ma-stock-cart .ma-stock-product td { padding: 0; min-width: 0; text-align: left; border: 0; }
.ma-stock-product td:nth-child(1) { grid-area: check; }
.ma-stock-product td:nth-child(2) { grid-area: photo; }
.ma-stock-product td:nth-child(3) { grid-area: title; overflow-wrap: anywhere; }
.ma-stock-product td:nth-child(4) { grid-area: stock; color: var(--ma-muted); font-size: 12px; }
.ma-stock-product td:nth-child(5) { grid-area: price; color: var(--ma-accent); font-weight: 750; }
.ma-stock-product td:nth-child(6) { grid-area: qty; white-space: nowrap; justify-self: end; }
.ma-stock-product td:nth-child(7) { grid-area: total; color: var(--ma-accent); font-weight: 750; }
.ma-stock-product td:nth-child(8) { grid-area: remove; justify-self: end; }
.ma-stock-product td:nth-child(2) img { width: 60px; height: 60px; object-fit: contain; border-radius: 7px; }
.ma-stock-product td:nth-child(3) > div { height: auto !important; line-height: 1.35 !important; }
.ma-cart-label { font-weight: 520; color: var(--ma-muted); font-size: 11px; }
.ma-stock-cart .cart-foot {
  position: sticky;
  inset: auto 0 0;
  height: auto;
  padding: 7px 8px max(7px, env(safe-area-inset-bottom));
  border: 1px solid var(--ma-line);
  border-radius: 12px 12px 0 0;
  background: var(--ma-white);
}
.ma-stock-cart .cart-foot :is(table,tbody) { display: block; width: 100%; }
.ma-stock-cart .cart-foot tr {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  grid-template-areas: "tools tools" "sum submit";
  align-items: center;
  gap: 4px;
}
.ma-stock-cart .cart-foot td:nth-child(1) { grid-area: tools; }
.ma-stock-cart .cart-foot td:nth-child(2) { grid-area: sum; }
.ma-stock-cart .cart-foot td:nth-child(3) { grid-area: submit; width: auto; }
.ma-stock-cart .cart-foot p { margin: 0; font-size: 12px; line-height: 1.45; }
.ma-stock-cart .cart-foot input[type=submit] { width: auto; padding: 0 13px; font-size: 14px; }
.ma-stock-cart .ma-cart-tools { display: flex; flex-wrap: wrap; gap: 4px 9px; font-size: 12px; }
.ma-stock-cart .ma-cart-tools a, .ma-stock-cart .ma-cart-tools label { display: inline-flex; align-items: center; min-height: 36px; gap: 3px; }
