/* Khu CTV (khách): danh sách, trang người bán, sản phẩm, đơn, chat. Chỉ dùng biến ui-core.css (.ai/rules/ui/shop.md). */
.mk-ava { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--primary-soft); color: var(--primary-strong); font-size: var(--fs-md); font-weight: 800; overflow: hidden; }
.mk-ava.is-lg { width: 64px; height: 64px; font-size: var(--fs-xl); box-shadow: 0 0 0 2px color-mix(in srgb, var(--photo-ink) 80%, transparent); }
.mk-land { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "path" "title" "stats" "search" "games"; margin: var(--sp-3) 0 var(--sp-5); padding: var(--sp-4); border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border)); border-radius: var(--radius-lg); background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--primary) 20%, transparent), transparent 55%), linear-gradient(165deg, color-mix(in srgb, var(--primary) 8%, var(--card)), var(--card) 70%); box-shadow: var(--shadow-card); overflow: hidden; }
.mk-land h1 { grid-area: title; display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-2) 0; color: var(--ink-strong); font-size: var(--fs-xl); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.mk-land-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--grad); color: var(--paper); font-size: var(--fs-xl); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--primary) 70%, transparent); }
.mk-land .mk-hero-path { grid-area: path; margin: 0; }
.mk-search { grid-area: search; }
.mk-land-stats { grid-area: stats; display: flex; flex-wrap: wrap; margin: 0 0 var(--sp-3); padding: 0; list-style: none; }
.mk-land-stats li { display: flex; align-items: baseline; gap: var(--sp-1); min-width: 0; padding: 0 var(--sp-3); }
.mk-land-stats li:first-child { padding-left: 0; }
.mk-land-stats li + li { border-left: 1px solid var(--border); }
.mk-land-stats b { color: var(--primary); font-size: var(--fs-md); font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.mk-land-stats small { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }

.mk-games { grid-area: games; display: flex; gap: var(--sp-2); margin: var(--sp-3) calc(var(--sp-4) * -1) calc(var(--sp-1) * -1); padding: var(--sp-1) var(--sp-4); overflow-x: auto; scrollbar-width: none; }
.mk-games::-webkit-scrollbar { display: none; }
.mk-games a { flex: none; display: flex; align-items: center; gap: var(--sp-2); min-height: var(--control-h); padding: 3px var(--sp-3) 3px 3px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: color-mix(in srgb, var(--card) 80%, transparent); color: var(--text); font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; white-space: nowrap; transition: border-color .15s, background-color .15s; }
.mk-games a > span:last-child { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.mk-game-img { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: var(--card); }
.mk-game-img img { width: 100%; height: 100%; object-fit: cover; }
.mk-game-img .media-placeholder { --ph: var(--primary); --ph-to: var(--duo, color-mix(in srgb, var(--primary) 60%, var(--star))); padding: 0; font-size: var(--fs-2xs); }
.mk-game-img.is-all { background: var(--primary-soft); color: var(--primary); font-size: var(--fs-md); }
.mk-games a:hover { border-color: var(--primary); }
.mk-games a.is-active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.mk-games a.is-active .mk-game-img.is-all { background: var(--grad); color: var(--paper); }

.mk-shops { display: flex; gap: var(--sp-3); margin: var(--sp-3) calc(var(--sp-3) * -1) 0; padding: var(--sp-1) var(--sp-3) var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--sp-3); scrollbar-width: none; }
.mk-shops::-webkit-scrollbar { display: none; }
/* A CTV's stall (sạp) card: their cover, or the pictures of what they sell side by side, their picture, numbers, three best-selling categories with prices and the way in; the same shop-colour-to-gold ring as their items. */
.mk-shop-card { flex: none; display: flex; flex-direction: column; width: min(280px, 82vw); border: 1px solid transparent; border-radius: var(--radius); background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, color-mix(in srgb, var(--primary) 80%, transparent), color-mix(in srgb, var(--star) 70%, transparent)) border-box; box-shadow: var(--shadow-card); color: inherit; overflow: hidden; scroll-snap-align: start; transition: transform .2s, box-shadow .2s; }
.mk-shop-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.mk-shop-cover { position: relative; display: block; height: 96px; background: linear-gradient(135deg, var(--primary), var(--duo, color-mix(in srgb, var(--primary) 72%, var(--shade)))); overflow: hidden; }
.mk-shop-cover::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, color-mix(in srgb, var(--shade) 50%, transparent)); pointer-events: none; }
.mk-shop-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.mk-shop-card:hover .mk-shop-cover img { transform: scale(1.04); }
.mk-shop-cover.is-collage { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 2px; }
.mk-shop-cover.is-collage > span { position: relative; overflow: hidden; }
.mk-shop-cover.is-collage .media-placeholder, .mk-shop-stall-img .media-placeholder { padding: 0; font-size: var(--fs-2xs); }
/* A seller's name keeps the blue tick of an approved seller in view while a long name is cut short. */
.mk-name { display: inline-flex; align-items: center; gap: var(--sp-1); max-width: 100%; min-width: 0; vertical-align: bottom; }
.mk-name > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-verified { flex: none; color: var(--info); }
.mk-store-name .mk-name > span { white-space: normal; }
.mk-shop-info { position: relative; display: grid; justify-items: start; gap: 2px; min-width: 0; margin-top: -26px; padding: 0 var(--sp-3); }
.mk-shop-info .mk-ava { width: 52px; height: 52px; margin-bottom: var(--sp-1); box-shadow: 0 0 0 3px var(--card), 0 0 0 4px color-mix(in srgb, var(--star) 60%, transparent); }
.mk-shop-info b { max-width: 100%; color: var(--ink-strong); font-size: var(--fs-md); font-weight: 800; }
.mk-shop-info small { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--sp-2); color: var(--muted); font-size: var(--fs-sm); }
.mk-shop-info small > span + span::before { content: "\00B7"; margin-right: var(--sp-2); }
.mk-shop-star { color: var(--warn-ink); font-weight: 700; }
.mk-shop-star i { margin-right: 2px; color: var(--star); }
.mk-shop-star em { margin-left: 2px; color: var(--muted); font-style: normal; font-weight: 500; }
.mk-shop-stalls { flex: 1; display: grid; align-content: start; gap: var(--sp-2); margin: var(--sp-3) var(--sp-3) 0; padding-top: var(--sp-3); border-top: 1px dashed var(--border); }
.mk-shop-stall { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-2); min-width: 0; }
.mk-shop-card:has(.is-collage) .mk-shop-stall { grid-template-columns: minmax(0, 1fr) auto; }
.mk-shop-card:has(.is-collage) .mk-shop-stall-img { display: none; }
.mk-shop-stall-img { position: relative; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; }
.mk-shop-stall-img img { width: 100%; height: 100%; object-fit: cover; }
.mk-shop-stall-name { color: var(--text); font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-shop-stall-price { display: flex; align-items: baseline; gap: var(--sp-1); font-size: var(--fs-sm); white-space: nowrap; }
.mk-shop-stall-price small { color: var(--muted); font-size: var(--fs-2xs); font-weight: 600; }
.mk-shop-go { display: flex; align-items: center; justify-content: center; gap: 2px; min-height: var(--control-h); margin: var(--sp-3); border-radius: var(--radius-btn); background: var(--primary-soft); color: var(--primary-strong); font-size: var(--fs-sm); font-weight: 700; transition: background .18s, color .18s; }
.mk-shop-go i { font-size: var(--fs-md); transition: transform .18s; }
.mk-shop-card:hover .mk-shop-go { background: var(--grad); color: var(--paper); }
.mk-shop-card:hover .mk-shop-go i { transform: translateX(2px); }

.mk-list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.mk-list-head .section-title small { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.mk-sort { display: flex; flex: 1 1 100%; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-card); overflow: hidden; }
.mk-sort a { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; gap: var(--sp-1); min-height: var(--control-h); color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; transition: color .15s; }
.mk-sort a + a { border-left: 1px solid var(--line); }
.mk-sort a:hover { color: var(--primary); }
.mk-sort a.is-active { color: var(--primary); font-weight: 700; }
.mk-sort a.is-active::after { content: ""; position: absolute; right: 22%; bottom: 0; left: 22%; height: 2px; border-radius: 2px; background: var(--primary); }
.mk-sort i { font-size: var(--fs-md); }
/* Khu CTV cards stand apart from the shop's own: a thin shop-colour-to-gold ring, the stars under the name and the seller's picture in a strip at the foot. */
.mk-tile, .mk-stall-tile { border: 1px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, color-mix(in srgb, var(--primary) 80%, transparent), color-mix(in srgb, var(--star) 70%, transparent)) border-box; }
.mk-tile-stars { display: flex; align-items: center; gap: var(--sp-1); min-width: 0; color: var(--muted); font-size: var(--fs-2xs); line-height: 1; white-space: nowrap; }
.mk-tile-stars .mk-stars { font-size: var(--fs-xs); vertical-align: 0; }
.mk-tile-stars b { color: var(--ink); font-weight: 700; }
.mk-tile-shop { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; margin: 2px -2px 0; padding: 5px 8px 5px 5px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: var(--fs-xs); font-weight: 600; }
.mk-tile-shop .mk-ava { width: 24px; height: 24px; font-size: var(--fs-2xs); box-shadow: 0 0 0 2px color-mix(in srgb, var(--star) 60%, transparent); }
.mk-tile-shop > .mk-name { flex: 1; }

.mk-hero-path { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin-bottom: var(--sp-1); color: var(--muted); font-size: var(--fs-xs); }
.mk-hero-path a { color: var(--muted); }
.mk-hero-path a:hover { color: var(--primary); }
.mk-about { margin: var(--sp-3) 0 0; color: var(--text); font-size: var(--fs-sm); white-space: pre-line; overflow-wrap: anywhere; }

.mk-reviews, .mk-store-tabs { scroll-margin-top: var(--sticky-top); }
.mk-store { margin-top: var(--sp-3); }
.mk-store-crumbs { display: -webkit-box; margin-bottom: var(--sp-3); overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
/* Seller header like a Shopee shop: a dark card on the shop's cover (or its best-selling item, darkened; else the seller's colour), then the numbers. */
.mk-store-head { display: grid; gap: var(--sp-3); }
.mk-store-card { position: relative; isolation: isolate; display: grid; gap: var(--sp-3); min-width: 0; padding: var(--sp-4); border-radius: var(--radius-lg); background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 62%, var(--shade)), color-mix(in srgb, var(--primary) 30%, var(--shade))); color: var(--photo-ink); box-shadow: var(--shadow-card); overflow: hidden; }
.mk-store-backdrop { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; filter: brightness(.42) saturate(1.1); }
.mk-store-id { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.mk-store-name { flex: 1; min-width: 0; }
.mk-store-name h1 { margin: 0; color: var(--photo-ink); font-size: var(--fs-lg); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.mk-store-online { display: flex; align-items: center; gap: var(--sp-1); margin: 2px 0 0; color: color-mix(in srgb, var(--photo-ink) 72%, transparent); font-size: var(--fs-xs); }
.mk-store-online.is-live::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.mk-store-share { flex: none; align-self: flex-start; display: grid; place-items: center; width: var(--control-h); height: var(--control-h); padding: 0; border: 0; border-radius: 50%; background: var(--photo-control); color: var(--photo-ink); font-size: var(--fs-lg); cursor: pointer; transition: background .15s; }
.mk-store-share:hover { background: var(--photo-control-hover); }
.mk-store-card .mk-marks { margin-top: 0; }
.mk-store-actions { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: var(--sp-2); }
.mk-store-actions form { display: contents; }
.mk-store-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1); min-width: 0; min-height: var(--control-h); padding: 0 var(--sp-3); border: 1px solid color-mix(in srgb, var(--photo-ink) 85%, transparent); border-radius: var(--radius-sm); background: transparent; color: var(--photo-ink); font: inherit; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s; }
.mk-store-btn:hover, .mk-store-btn.is-on { background: var(--photo-control); color: var(--photo-ink); }
.mk-store-btn:disabled { opacity: .6; cursor: progress; }
.mk-store-btn i { font-size: var(--fs-md); }
.mk-store-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-3); margin: 0; padding: var(--sp-3) var(--sp-4); list-style: none; border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow-card); }
.mk-store-stats li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 var(--sp-1); min-width: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.45; }
.mk-store-stats i { color: var(--muted); font-size: var(--fs-md); }
.mk-store-stats b, .mk-store-stats a { grid-column: 2; min-width: 0; color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mk-store-stats a:hover { text-decoration: underline; }
.mk-store-notice { display: flex; align-items: flex-start; gap: var(--sp-2); margin: 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--primary) 10%, var(--card)); color: var(--ink); font-size: var(--fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.mk-store-notice i { flex: none; margin-top: 2px; color: var(--primary); font-size: var(--fs-md); }
.mk-store-tabs { position: sticky; top: var(--sticky-top); z-index: 5; display: flex; margin: var(--sp-3) calc(var(--sp-3) * -1) var(--sp-4); padding: 0 var(--sp-3); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); overflow-x: auto; scrollbar-width: none; }
.mk-store-tabs::-webkit-scrollbar { display: none; }
.mk-store-tabs a { position: relative; flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: var(--sp-1); min-height: calc(var(--control-h) + var(--sp-2)); padding: 0 var(--sp-2); color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; transition: color .15s; }
.mk-store-tabs a b { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.mk-store-tabs a:hover, .mk-store-tabs a.is-active { color: var(--primary); }
.mk-store-tabs a.is-active { font-weight: 700; }
.mk-store-tabs a.is-active::after { content: ""; position: absolute; right: 14%; bottom: -1px; left: 14%; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }
.mk-store-block { margin-bottom: var(--sp-6); }
.mk-banner { position: relative; border-radius: var(--radius-lg); background: var(--surface-2); box-shadow: var(--shadow-card); overflow: hidden; }
.mk-banner-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.mk-banner-track::-webkit-scrollbar { display: none; }
.mk-banner-slide { flex: 0 0 100%; display: block; aspect-ratio: 2 / 1; scroll-snap-align: start; }
.mk-banner-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mk-banner-dots { position: absolute; right: 0; bottom: var(--sp-2); left: 0; display: flex; justify-content: center; gap: var(--sp-1); pointer-events: none; }
.mk-banner-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--photo-ink) 55%, transparent); box-shadow: 0 0 3px color-mix(in srgb, var(--photo-scrim) 50%, transparent); cursor: pointer; pointer-events: auto; transition: width .2s, background .2s; }
.mk-banner-dots button.is-active { width: 20px; background: var(--photo-ink); }
.mk-pics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.mk-pics.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mk-pics > * { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--surface-2); box-shadow: var(--shadow-card); overflow: hidden; }
.mk-pics.is-3 > * { aspect-ratio: 1; }
.mk-pics img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.mk-pics a:hover img { transform: scale(1.04); }
.mk-compare > * { position: relative; }
.mk-compare-tag { position: absolute; top: var(--sp-2); left: var(--sp-2); padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-pill); background: color-mix(in srgb, var(--photo-scrim) 72%, transparent); color: var(--photo-ink); font-size: var(--fs-xs); font-weight: 800; }
.mk-compare-tag.is-after { background: var(--primary); }
.mk-store-reviews { margin-top: var(--sp-3); }
.mk-store-text h2 { margin: 0 0 var(--sp-2); color: var(--ink); font-size: var(--fs-md); font-weight: 700; }
.mk-store-text p { margin: 0; color: var(--text); font-size: var(--fs-sm); white-space: pre-line; overflow-wrap: anywhere; }
.mk-store-filter { margin-bottom: 0; }
.mk-store-stallbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-3); padding: var(--sp-3); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-card); }
.mk-store-stallbar > span { display: grid; min-width: 0; }
.mk-store-stallbar b { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.mk-store-stallbar small { color: var(--muted); font-size: var(--fs-xs); }
.mk-store-stallbar .btn { flex: none; }
.mk-store-block > .tiles { margin-top: var(--sp-3); }
/* A seller's product block ends on a full row: the tiles past the last full row are left to "Xem tất cả", once there is more than one row. */
@media (max-width: 639.98px) {
    .mk-full-rows:not(.is-row) > .tile:nth-child(2n+3):last-child { display: none; }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
    .mk-full-rows > .tile:nth-child(3n+4):nth-last-child(-n+2), .mk-full-rows > .tile:nth-child(3n+4):nth-last-child(-n+2) ~ .tile { display: none; }
}
@media (min-width: 1024px) and (max-width: 1199.98px) {
    .mk-full-rows > .tile:nth-child(4n+5):nth-last-child(-n+3), .mk-full-rows > .tile:nth-child(4n+5):nth-last-child(-n+3) ~ .tile { display: none; }
}
@media (min-width: 1200px) {
    .mk-full-rows > .tile:nth-child(5n+6):nth-last-child(-n+4), .mk-full-rows > .tile:nth-child(5n+6):nth-last-child(-n+4) ~ .tile { display: none; }
}
.mk-store-about > .card h2 { display: flex; align-items: center; gap: var(--sp-2); margin: 0; color: var(--ink); font-size: var(--fs-md); font-weight: 700; overflow-wrap: anywhere; }
.mk-store-about > .card h2 i { color: var(--primary); }
.mk-store-about > .mk-store-block { margin: var(--sp-5) 0 0; }
.mk-store-facts { display: grid; margin: var(--sp-3) 0 0; }
.mk-store-facts > div { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) 0; border-top: 1px solid var(--line); }
.mk-store-facts dt { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--muted); font-size: var(--fs-sm); }
.mk-store-facts dt i { color: var(--primary); font-size: var(--fs-md); }
.mk-store-facts dd { margin: 0; color: var(--ink); font-size: var(--fs-sm); font-weight: 700; text-align: right; }

.mk-tile .tile-media, .mk-stall-tile .tile-media { aspect-ratio: 1; }
.mk-tile .media-placeholder.has-kicker > span, .mk-stall-tile .media-placeholder.has-kicker > span { -webkit-line-clamp: 2; }
/* The stall card's foot: a "Xem ngay" call instead of a price, so a category is not taken for one product. */
.mk-stall-go { display: flex; align-items: center; justify-content: center; gap: var(--sp-1); margin-top: auto; min-height: 34px; padding: 0 var(--sp-3); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); font-size: var(--fs-sm); font-weight: 700; transition: background-color .15s; }
.mk-stall-go i { font-size: var(--fs-md); transition: transform .15s; }
.mk-stall-tile:hover .mk-stall-go { background: color-mix(in srgb, var(--primary) 22%, transparent); }
.mk-stall-tile:hover .mk-stall-go i { transform: translateX(3px); }
.mk-stall-go + .mk-tile-shop { margin-top: var(--sp-2); }
/* Home "Khu CTV" block: a framed band in the Khu CTV page's look so it stands out among the shop's own blocks, with the CTVs' stall cards. */
.home-market { position: relative; padding: var(--sp-4) var(--sp-3) var(--sp-2); border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border)); border-radius: var(--radius-lg); background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--primary) 22%, transparent), transparent 55%), linear-gradient(165deg, color-mix(in srgb, var(--primary) 10%, var(--card)), var(--card) 72%); box-shadow: var(--shadow-card), 0 14px 30px -22px color-mix(in srgb, var(--primary) 80%, transparent); overflow: hidden; }
.home-market-head { display: flex; align-items: center; gap: var(--sp-3); }
.home-market-head .section-title { color: var(--ink-strong); font-size: var(--fs-lg); font-weight: 800; }
.home-market-facts { display: flex; flex-wrap: wrap; gap: 0 var(--sp-2); margin: 2px 0 0; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.home-market-facts b { color: var(--primary); font-weight: 800; font-variant-numeric: tabular-nums; }
.home-market-go { flex: none; }
.home-market-go i { font-size: var(--fs-md); }
.mk-seller-card { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); padding-top: calc(56px + var(--sp-4)); overflow: hidden; }
.mk-seller-cover { position: absolute; inset: 0 0 auto; height: 56px; background: linear-gradient(135deg, var(--primary), var(--duo, color-mix(in srgb, var(--primary) 72%, var(--shade)))); }
.mk-seller-cover img { width: 100%; height: 100%; object-fit: cover; }
.mk-seller-card > .mk-ava { box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--primary); }
.mk-marks { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-2); }
.mk-marks .badge { white-space: normal; }
.mk-marks .ctvp-live { flex: none; }
.mk-seller-card > div { flex: 1; min-width: 0; }
.mk-seller-card b { display: block; color: var(--ink); font-size: var(--fs-md); font-weight: 700; }
.mk-seller-card small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.mk-seller-card .btn { flex: none; }
.mk-seller-card > .mk-seller-actions { flex: 1 1 100%; display: flex; gap: var(--sp-2); }
.mk-seller-actions .btn { flex: 1 1 0; }
.mk-seller-card.is-strip { margin: 0 0 var(--sp-4); padding-top: var(--sp-4); }
.mk-seller-card.is-strip > .mk-seller-cover { inset: 0; height: auto; opacity: .16; }
.mk-seller-card.is-strip > :not(.mk-seller-cover) { position: relative; }
.mk-seller-card.is-strip .mk-seller-actions .btn { min-height: var(--control-h); }
.mk-seller-reply { color: var(--muted); }
.mk-seller-reply b { display: inline; color: var(--ok-ink); font-size: inherit; }
/* The seller's vouchers in the confirm sheet of a CTV item (partials/bag-sheet). */
.mk-bag-vouchers { min-width: 0; }
.mk-bag-vouchers .mk-rail-btn.is-prev { left: 0; }
.mk-bag-vouchers .mk-rail-btn.is-next { right: 0; }

.mk-od-thumb { flex: none; width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-2); }
span.mk-od-thumb { display: grid; place-items: center; color: var(--faint); font-size: var(--fs-xl); }

.mk-stars { display: inline-flex; gap: 1px; color: var(--star); font-size: var(--fs-sm); line-height: 1; vertical-align: -2px; white-space: nowrap; }
.mk-stars .bx-star { color: var(--border); }
.mk-stars.is-lg { font-size: var(--fs-lg); }
.mk-seller-rating { display: flex; align-items: center; gap: var(--sp-1); flex-wrap: wrap; }

.mk-needs-list { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.mk-needs-list:not(:has(.mk-need:not([hidden]))) { display: none; }
.mk-need { padding: var(--sp-3); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: var(--fs-sm); }
.mk-need > b { display: block; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.mk-need > small { display: inline-flex; align-items: center; gap: var(--sp-1); margin-top: 2px; color: var(--muted); font-size: var(--fs-xs); }
.mk-need p { margin: var(--sp-2) 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.mk-need p span { display: block; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.mk-textarea { width: 100%; resize: vertical; }

.mk-cart .mk-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: var(--sp-2); row-gap: var(--sp-1); }
.mk-line > .pick-thumb { grid-row: span 2; align-self: start; }
.mk-line:not(.is-unit) > .mk-line-name { grid-column: 2 / -1; }
.mk-line-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mk-line-name small { display: block; color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }
.mk-line .qty { justify-self: start; gap: var(--sp-1); }
.mk-line .qty output { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.mk-line > b { min-width: 68px; text-align: right; font-variant-numeric: tabular-nums; }
.pkg-unit { margin-left: var(--sp-1); color: var(--muted); font-weight: 600; white-space: nowrap; }
.mk-line.is-unit { row-gap: var(--sp-2); }
.mk-amount { position: relative; display: flex; align-items: center; min-width: 0; max-width: 168px; }
.mk-amount input { width: 100%; min-height: var(--control-h); padding: 0 calc(var(--sp-2) + 7ch) 0 var(--sp-3); font-size: var(--fs-md); font-weight: 700; font-variant-numeric: tabular-nums; }
.mk-amount span { position: absolute; right: var(--sp-3); max-width: 7ch; overflow: hidden; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; }
.mk-slide { --thumb: 24px; grid-column: 1 / -1; padding: var(--sp-1) 0 0; }
.mk-slide input { --pos: 0; display: block; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.mk-slide input::-webkit-slider-runnable-track { height: 8px; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--primary) calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--pos)), color-mix(in srgb, var(--faint) 30%, var(--card)) 0); }
.mk-slide input::-moz-range-track { height: 8px; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--primary) calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--pos)), color-mix(in srgb, var(--faint) 30%, var(--card)) 0); }
.mk-slide input::-webkit-slider-thumb { width: var(--thumb); height: var(--thumb); margin-top: -8px; border: 4px solid var(--card); border-radius: 50%; background: var(--primary); box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 45%, transparent); -webkit-appearance: none; appearance: none; }
.mk-slide input::-moz-range-thumb { box-sizing: border-box; width: var(--thumb); height: var(--thumb); border: 4px solid var(--card); border-radius: 50%; background: var(--primary); box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 45%, transparent); }
.mk-slide input:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: var(--radius-pill); }
.mk-ticks { position: relative; height: var(--control-h); }
.mk-ticks button { --at: 0; position: absolute; top: 0; left: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--at)); min-width: 32px; height: var(--control-h); padding: 0 var(--sp-1); border: 0; background: none; color: var(--faint); font: inherit; font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; transform: translateX(-50%); transition: color .15s ease, transform .15s ease; }
.mk-ticks button::before { content: ""; position: absolute; top: 2px; left: 50%; width: 2px; height: 6px; border-radius: 1px; background: currentColor; transform: translateX(-50%); }
.mk-ticks button.is-past { color: var(--muted); }
.mk-ticks button.is-on { color: var(--primary); transform: translateX(-50%) scale(1.12); }
.mk-ticks button:active { transform: translateX(-50%) scale(.92); }

.mk-vouchers { display: grid; gap: var(--sp-3); }
.mk-vouchers.is-row { display: flex; margin: 0 calc(var(--sp-3) * -1); padding: var(--sp-1) var(--sp-3) var(--sp-2); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.mk-vouchers.is-row::-webkit-scrollbar { display: none; }
.mk-vouchers.is-row .mk-voucher { flex: none; width: 276px; scroll-snap-align: start; }
.mk-rail { position: relative; }
.mk-rail-btn { position: absolute; top: 50%; z-index: 2; display: none; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--card); color: var(--muted); font-size: var(--fs-xl); box-shadow: var(--shadow); transform: translateY(-50%); cursor: pointer; }
.mk-rail-btn[hidden] { visibility: hidden; }
.mk-rail-btn:hover { color: var(--primary); }
.mk-rail-btn.is-prev { left: calc(var(--sp-2) * -1); }
.mk-rail-btn.is-next { right: calc(var(--sp-2) * -1); }
.mk-voucher { --vc: var(--primary); position: relative; isolation: isolate; display: block; min-width: 0; margin-bottom: 5px; color: var(--vc); filter: drop-shadow(0 1px 1px color-mix(in srgb, var(--shade) 10%, transparent)); }
.mk-voucher::after { content: ""; position: absolute; z-index: -1; left: 6px; right: 4px; bottom: -5px; height: 12px; border: 1px solid color-mix(in srgb, var(--vc) 22%, var(--border)); border-top: 0; border-radius: 0 0 3px 3px; background: color-mix(in srgb, var(--vc) 4%, var(--card)); }
.mk-voucher-card { display: flex; align-items: stretch; min-height: 116px; border: 1px solid color-mix(in srgb, var(--vc) 30%, var(--border)); border-left: 0; border-radius: 0 3px 3px 0; background: color-mix(in srgb, var(--vc) 7%, var(--card)); -webkit-mask: radial-gradient(circle 3px at 0 50%, transparent 95%, var(--shade)) 0 0 / 6px 10px repeat-y, linear-gradient(var(--shade), var(--shade)) 6px 0 / calc(100% - 6px) 100% no-repeat; mask: radial-gradient(circle 3px at 0 50%, transparent 95%, var(--shade)) 0 0 / 6px 10px repeat-y, linear-gradient(var(--shade), var(--shade)) 6px 0 / calc(100% - 6px) 100% no-repeat; }
.mk-voucher-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: var(--sp-3) var(--sp-2) var(--sp-3) var(--sp-4); }
.mk-voucher-off { max-width: 100%; color: var(--vc); font-size: var(--fs-lg); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.mk-voucher-terms { font-size: var(--fs-sm); font-weight: 500; line-height: 1.35; }
.mk-voucher-tag { max-width: 100%; margin-top: 2px; padding: 0 var(--sp-1); border: 1px solid var(--vc); border-radius: 2px; font-size: var(--fs-xs); font-weight: 500; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-voucher-body small { margin-top: var(--sp-2); color: var(--muted); font-size: var(--fs-2xs); }
.mk-voucher-side { flex: none; display: grid; place-items: center; width: 84px; padding: 0 var(--sp-2); border-left: 1px dashed color-mix(in srgb, var(--vc) 30%, var(--border)); }
.mk-voucher-use { display: inline-grid; place-items: center; min-width: 60px; min-height: 30px; padding: 0 var(--sp-3); border-radius: 2px; background: var(--vc); color: var(--paper); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.mk-voucher-use:hover { background: color-mix(in srgb, var(--vc) 86%, var(--shade)); color: var(--paper); }
.mk-voucher-qty { position: absolute; top: -1px; right: -1px; min-width: 34px; padding: 1px var(--sp-2) 1px var(--sp-3); border-radius: 0 3px 0 var(--radius-pill); background: color-mix(in srgb, var(--vc) 14%, var(--card)); color: var(--vc); font-size: var(--fs-xs); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.mk-voucher.is-pickable { cursor: pointer; }
.mk-voucher input { position: absolute; opacity: 0; pointer-events: none; }
.mk-voucher-tick { display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid color-mix(in srgb, var(--vc) 40%, var(--field-border)); border-radius: 50%; background: var(--card); color: transparent; font-size: var(--fs-sm); }
.mk-voucher:has(input:checked) .mk-voucher-card { border-color: var(--vc); background: color-mix(in srgb, var(--vc) 13%, var(--card)); }
.mk-voucher:has(input:checked) .mk-voucher-tick { border-color: var(--vc); background: var(--vc); color: var(--paper); }
.mk-voucher:has(input:focus-visible) .mk-voucher-card { outline: 2px solid var(--vc); outline-offset: -4px; }
.mk-voucher.is-used { opacity: .55; cursor: default; }
.mk-voucher.is-short { --vc: var(--muted); }
.mk-voucher-short { margin: 0; color: var(--warn-ink); font-size: var(--fs-xs); }
.mk-voucher.is-mini { margin-bottom: 4px; }
.mk-voucher.is-mini::after { left: 5px; bottom: -4px; height: 8px; }
.mk-vouchers.is-row .mk-voucher.is-mini { width: 188px; }
.mk-voucher.is-mini .mk-voucher-card { min-height: 64px; }
.mk-voucher.is-mini .mk-voucher-body { gap: 1px; padding: var(--sp-2) var(--sp-1) var(--sp-2) var(--sp-3); }
.mk-voucher.is-mini .mk-voucher-off { font-size: var(--fs-md); }
.mk-voucher.is-mini .mk-voucher-terms { font-size: var(--fs-xs); }
.mk-voucher.is-mini .mk-voucher-body small { margin-top: 2px; }
.mk-voucher.is-mini .mk-voucher-side { width: 44px; padding: 0 var(--sp-1); }
.mk-voucher.is-mini .mk-voucher-tick { width: 20px; height: 20px; }
.mk-voucher.is-mini .mk-voucher-qty { min-width: 0; padding: 0 var(--sp-1) 0 var(--sp-2); font-size: var(--fs-2xs); }

@media (min-width: 768px) {
    .home-market { padding: var(--sp-5) var(--sp-6) var(--sp-4); }
    .home-market-head { gap: var(--sp-4); }
    .home-market-head .section-title { font-size: var(--fs-xl); }
    .home-market-facts { gap: 0 var(--sp-3); font-size: var(--fs-sm); }
    .mk-land { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "path path" "title stats" "search search" "games games"; column-gap: var(--sp-8); align-items: center; padding: var(--sp-5) var(--sp-6); }
    .mk-land h1 { margin: var(--sp-3) 0; font-size: var(--fs-2xl); }
    .mk-search { max-width: none; margin-top: var(--sp-3); }
    .mk-land-stats { flex-wrap: nowrap; margin: 0; }
    .mk-land-stats li { flex-direction: column; align-items: center; gap: 2px; padding: 0 var(--sp-5); }
    .mk-land-stats li:last-child { padding-right: 0; }
    .mk-land-stats b { font-size: var(--fs-2xl); }
    .mk-games { flex-wrap: wrap; margin: var(--sp-4) 0 0; padding: 0; overflow: visible; }
    .mk-games a { min-height: 48px; padding: var(--sp-1) var(--sp-4) var(--sp-1) var(--sp-1); font-size: var(--fs-base); }
    .mk-games a > span:last-child { max-width: 220px; }
    .mk-game-img { width: 38px; height: 38px; }
    .mk-game-img.is-all { font-size: var(--fs-lg); }
    .mk-shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-4); margin: var(--sp-3) 0 0; padding: var(--sp-1) 0 var(--sp-2); overflow: visible; }
    .mk-shop-card { width: auto; }
    .mk-shop-cover { height: 112px; }
    .mk-game-img .media-placeholder > i { font-size: 1.6em; }
    .mk-sort { flex: none; }
    .mk-sort a { padding: 0 var(--sp-5); }
    .mk-vouchers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mk-vouchers.is-row { margin: 0; padding: var(--sp-1) 0 var(--sp-2); }
    .mk-vouchers.is-row .mk-voucher { width: 320px; }
    .mk-rail-btn { display: grid; }
    .mk-rail-btn.is-prev { left: calc(var(--sp-5) * -1); }
    .mk-rail-btn.is-next { right: calc(var(--sp-5) * -1); }
    .mk-store-head { grid-template-columns: 360px minmax(0, 1fr); grid-template-areas: "card search" "card stats" "notice notice"; align-items: center; gap: var(--sp-4) var(--sp-6); padding: var(--sp-5); border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow-card); }
    .mk-store-card { grid-area: card; padding: var(--sp-4) var(--sp-5); }
    .mk-store-search { grid-area: search; justify-self: end; width: min(100%, 320px); }
    .mk-store-stats { grid-area: stats; grid-template-columns: repeat(2, minmax(0, 320px)); align-self: start; gap: var(--sp-4) var(--sp-6); padding: 0; background: none; box-shadow: none; }
    .mk-store-stats li { display: flex; font-size: var(--fs-base); }
    .mk-store-stats span::after { content: ":"; }
    .mk-store-notice { grid-area: notice; }
    .mk-store-tabs { justify-content: flex-start; margin: var(--sp-4) 0 var(--sp-5); padding: 0; overflow: visible; }
    .mk-store-tabs a { flex: none; padding: 0 var(--sp-6); font-size: var(--fs-base); }
    .mk-banner-slide { aspect-ratio: 3 / 1; }
    .mk-pics { gap: var(--sp-3); }
    .mk-ava.is-lg { width: 80px; height: 80px; font-size: var(--fs-2xl); }
    .mk-seller-card > div { flex: 1 1 180px; }
    .mk-seller-card > .mk-seller-actions { flex: none; margin-left: auto; }
    .mk-seller-actions .btn { flex: none; }
}

@media (min-width: 1024px) {
    .mk-land { grid-template-columns: minmax(0, max-content) minmax(320px, 1fr) auto; grid-template-areas: "path path path" "title search stats" "games games games"; }
    .mk-search { margin: 0; }
}
