/* The Anbu Market's look, shared by every page: the header and its search, the footer, and the parts the store is made
   of (buttons, tiles, pills, panels). Everything of its own is named mk-…, so a page's own styles are never touched;
   only the page's background, type and colours are set here, so every page reads as one store. */
@font-face { font-family: 'Poppins'; src: url('./fonts/poppins-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('./fonts/poppins-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('./fonts/poppins-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('./fonts/poppins-700.woff2') format('woff2'); font-weight: 700 900; font-display: swap; }

:root {
  --mk-bg: #060a14; --mk-bg2: #0a1020; --mk-panel: #0e1526; --mk-panel2: #131c31; --mk-raise: #182238;
  --mk-line: rgba(255, 255, 255, .08); --mk-line2: rgba(255, 255, 255, .14); --mk-line3: rgba(255, 255, 255, .22);
  --mk-ink: #f1f3f9; --mk-dim: #a2abc0; --mk-faint: #6e7890;
  --mk-red: #ef4d33; --mk-red2: #ff7b45; --mk-gold: #f2c14e; --mk-blue: #3db4ff; --mk-green: #3ccf8e;
  --mk-cta: linear-gradient(135deg, #ff7b45 0%, #ef4d33 55%, #d93b26 100%);
  --mk-r0: #3ccf8e; --mk-r1: #3db4ff; --mk-r2: #b07bff; --mk-r3: #7f8cff; --mk-r4: #f2c14e;
  --mk-radius: 16px; --mk-ease: cubic-bezier(.2, .8, .2, 1); --mk-spring: cubic-bezier(.2, .9, .25, 1.12);
  --mk-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* the names the older pages use, pointed at the same colours */
  --bg: var(--mk-bg); --panel: var(--mk-panel); --line: rgba(255, 255, 255, .12); --ink: var(--mk-ink); --dim: var(--mk-dim);
  --gold: var(--mk-gold); --blue: var(--mk-blue); --r0: var(--mk-r0); --r1: var(--mk-r1); --r2: var(--mk-r2); --r3: var(--mk-r3); --r4: var(--mk-r4);
  color-scheme: dark;
}
html { background: var(--mk-bg); }
body.mk *, body.mk *::before, body.mk *::after { box-sizing: border-box; }
body.mk { margin: 0; min-height: 100vh; min-height: 100dvh; font-family: var(--mk-font); color: var(--mk-ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background: radial-gradient(1200px 600px at 50% -240px, rgba(239, 77, 51, .16), transparent 70%), radial-gradient(900px 500px at 100% 0, rgba(61, 180, 255, .06), transparent 60%), var(--mk-bg); background-attachment: fixed; }
body.mk ::selection { background: rgba(239, 77, 51, .45); color: #fff; }
body.mk a { color: inherit; }
body.mk main { position: relative; }
.mk-wrap { max-width: 1440px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
@media (max-width: 640px) { .mk-wrap { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); } }
.mk-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the header ---------- */
.mk-top { position: sticky; top: var(--mk-under, 0px); z-index: 40; background: rgba(6, 10, 20, .78); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--mk-line); }
.mk-top-in { display: flex; align-items: center; gap: 18px; height: 68px; }
.mk-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.mk-brand img { width: 26px; height: auto; filter: drop-shadow(0 2px 8px rgba(239, 77, 51, .35)); }
.mk-brand b { display: block; font-weight: 800; font-size: 17px; letter-spacing: .18em; line-height: 1; }
.mk-brand i { display: block; font-style: normal; font-weight: 500; font-size: 10.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--mk-dim); margin-top: 3px; }
.mk-search { position: relative; flex: 1 1 auto; max-width: 560px; }
.mk-search .mk-field { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--mk-line2); transition: border-color .2s, background .2s, box-shadow .2s; }
.mk-search .mk-field:focus-within { background: rgba(255, 255, 255, .08); border-color: rgba(239, 77, 51, .7); box-shadow: 0 0 0 4px rgba(239, 77, 51, .15); }
.mk-search svg { width: 18px; height: 18px; flex: none; color: var(--mk-dim); }
.mk-search input { flex: 1 1 auto; min-width: 0; height: 100%; font: inherit; font-size: 15px; color: var(--mk-ink); background: none; border: 0; outline: 0; }
.mk-search input::placeholder { color: var(--mk-faint); }
.mk-search input::-webkit-search-cancel-button { display: none; }
.mk-search kbd { font: 600 12px/1 var(--mk-font); color: var(--mk-faint); border: 1px solid var(--mk-line2); border-radius: 6px; padding: 4px 7px; }
.mk-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.mk-nav a { text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--mk-dim); padding: 9px 13px; border-radius: 10px; transition: color .2s, background .2s; white-space: nowrap; }
.mk-nav a:hover { color: var(--mk-ink); background: rgba(255, 255, 255, .05); }
.mk-nav a[aria-current="page"] { color: var(--mk-ink); background: rgba(255, 255, 255, .07); }
.mk-nav a.mk-duel { color: #fff; margin-left: 6px; background: rgba(239, 77, 51, .12); box-shadow: inset 0 0 0 1px rgba(239, 77, 51, .45); }
.mk-nav a.mk-duel:hover { background: rgba(239, 77, 51, .22); }
.mk-iconbtn { display: none; flex: none; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--mk-ink); background: rgba(255, 255, 255, .05); border: 1px solid var(--mk-line2); border-radius: 12px; cursor: pointer; }
.mk-iconbtn svg { width: 20px; height: 20px; }
@media (max-width: 1080px) { .mk-nav a.mk-hide-md { display: none; } }
@media (max-width: 860px) {
  .mk-top-in { gap: 10px; height: 60px; }
  .mk-nav { display: none; }
  .mk-iconbtn { display: inline-flex; }
  .mk-search { display: none; }
  .mk-brand { margin-right: auto; }
  body.mk-searching .mk-search { display: block; position: fixed; inset: 0; z-index: 70; max-width: none; padding: calc(env(safe-area-inset-top) + 10px) 12px 12px; background: rgba(6, 10, 20, .97); }
  body.mk-searching .mk-search .mk-field { height: 50px; }
  body.mk-searching .mk-search kbd { display: none; }
  body.mk-searching .mk-sugg { position: static; margin-top: 10px; max-height: calc(100dvh - 90px); box-shadow: none; }
}
.mk-close-search { display: none; }
body.mk-searching .mk-close-search { display: inline-flex; font: inherit; font-weight: 600; font-size: 15px; color: var(--mk-ink); background: none; border: 0; padding: 0 2px 0 8px; cursor: pointer; }

/* suggestions under the search */
.mk-sugg { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 50; max-height: min(70vh, 560px); overflow-y: auto; background: #0d1424; border: 1px solid var(--mk-line2); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); padding: 6px; }
.mk-sugg[hidden] { display: none; }
.mk-sugg h4 { margin: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--mk-faint); }
.mk-sugg a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--mk-ink); }
.mk-sugg a[aria-selected="true"], .mk-sugg a:hover { background: rgba(255, 255, 255, .07); }
.mk-sugg img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--mk-panel2); flex: none; }
.mk-sugg .mk-tk { width: 40px; height: 40px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--mk-panel2); color: var(--mk-dim); font-weight: 700; font-size: 13px; }
.mk-sugg .mk-l { min-width: 0; flex: 1; }
.mk-sugg .mk-l b { display: block; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-sugg .mk-l small { display: block; color: var(--mk-dim); font-size: 12.5px; }
.mk-sugg .mk-r { color: var(--mk-dim); font-size: 12.5px; white-space: nowrap; }
.mk-sugg .mk-all { justify-content: center; color: var(--mk-blue); font-weight: 600; font-size: 14px; border-top: 1px solid var(--mk-line); border-radius: 0 0 10px 10px; margin-top: 4px; padding-top: 12px; }
.mk-sugg p { margin: 14px 12px; color: var(--mk-dim); font-size: 14px; }

/* the phone's menu */
.mk-drawer { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; background: rgba(2, 5, 12, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.mk-drawer[hidden] { display: none; }
.mk-drawer nav { width: min(86vw, 340px); height: 100%; background: #0b111f; border-left: 1px solid var(--mk-line2); padding: calc(env(safe-area-inset-top) + 18px) 16px 24px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; animation: mk-in-right .3s var(--mk-ease); }
.mk-drawer nav a { text-decoration: none; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 17px; padding: 14px 12px; border-radius: 12px; color: var(--mk-ink); }
.mk-drawer nav a small { color: var(--mk-dim); font-weight: 400; font-size: 13px; }
.mk-drawer nav a[aria-current="page"] { background: rgba(255, 255, 255, .06); }
.mk-drawer nav .mk-sep { height: 1px; background: var(--mk-line); margin: 8px 4px; }
.mk-drawer nav button { align-self: flex-end; margin-bottom: 8px; }
@keyframes mk-in-right { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- the footer ---------- */
.mk-foot { margin-top: 72px; border-top: 1px solid var(--mk-line); background: linear-gradient(180deg, rgba(255, 255, 255, .015), transparent); }
.mk-foot-in { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-top: 44px; padding-bottom: calc(env(safe-area-inset-bottom) + 36px); }
.mk-foot .mk-fb img { width: 30px; }
.mk-foot .mk-fb p { color: var(--mk-dim); font-size: 14px; line-height: 1.6; max-width: 36ch; margin: 12px 0 0; }
.mk-foot h5 { margin: 4px 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mk-faint); }
.mk-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.mk-foot li a { color: var(--mk-dim); text-decoration: none; font-size: 14.5px; }
.mk-foot li a:hover { color: var(--mk-ink); }
.mk-foot .mk-fine { grid-column: 1 / -1; border-top: 1px solid var(--mk-line); padding-top: 18px; color: var(--mk-faint); font-size: 12.5px; line-height: 1.6; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
@media (max-width: 760px) { .mk-foot-in { grid-template-columns: 1fr 1fr; gap: 24px; } .mk-foot .mk-fb { grid-column: 1 / -1; } }

/* ---------- parts ---------- */
.mk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px/1 var(--mk-font); text-decoration: none; color: var(--mk-ink); background: rgba(255, 255, 255, .06); border: 1px solid var(--mk-line2); border-radius: 12px; padding: 0 18px; height: 46px; cursor: pointer; transition: transform .25s var(--mk-spring), background .2s, border-color .2s, box-shadow .2s; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.mk-btn:hover { background: rgba(255, 255, 255, .1); border-color: var(--mk-line3); }
.mk-btn:active { transform: scale(.97); }
.mk-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mk-btn svg { width: 18px; height: 18px; }
.mk-btn.cta { color: #fff; background: var(--mk-cta); border-color: transparent; box-shadow: 0 10px 30px rgba(239, 77, 51, .32), inset 0 1px 0 rgba(255, 255, 255, .22); }
.mk-btn.cta:hover { box-shadow: 0 14px 38px rgba(239, 77, 51, .45), inset 0 1px 0 rgba(255, 255, 255, .25); filter: brightness(1.06); }
.mk-btn.gold { color: #1b1200; background: linear-gradient(135deg, #ffd978, #f2c14e 60%, #d9a22e); border-color: transparent; box-shadow: 0 10px 30px rgba(242, 193, 78, .25); }
.mk-btn.big { height: 54px; font-size: 16.5px; padding: 0 24px; border-radius: 14px; }
.mk-btn.wide { width: 100%; }
.mk-btn.small { height: 36px; font-size: 13.5px; padding: 0 12px; border-radius: 10px; }
.mk-btn[disabled], .mk-btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.mk-link { color: var(--mk-blue); text-decoration: none; font-weight: 600; }
.mk-link:hover { text-decoration: underline; }

.mk-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 9px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--mk-dim); border: 1px solid var(--mk-line); white-space: nowrap; }
.mk-pill.rank { color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.mk-pill.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--mk-green); box-shadow: 0 0 0 3px rgba(60, 207, 142, .2); }
.mk-pill.gold { color: var(--mk-gold); border-color: rgba(242, 193, 78, .4); background: rgba(242, 193, 78, .1); }
.mk-pill.red { color: #ff9b85; border-color: rgba(239, 77, 51, .4); background: rgba(239, 77, 51, .1); }
.mk-rank0 { --c: var(--mk-r0); } .mk-rank1 { --c: var(--mk-r1); } .mk-rank2 { --c: var(--mk-r2); } .mk-rank3 { --c: var(--mk-r3); } .mk-rank4 { --c: var(--mk-r4); }

.mk-panel { background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01)), var(--mk-panel); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); }
.mk-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--mk-dim); }
.mk-h2 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.01em; margin: 0; }

/* a tile: one Anbu in a grid */
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 16px; }
@media (max-width: 640px) { .mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.mk-tile { position: relative; display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: var(--mk-ink); background: var(--mk-panel); border: 1px solid var(--mk-line); border-radius: 16px; overflow: hidden; transition: transform .35s var(--mk-spring), border-color .25s, box-shadow .3s; isolation: isolate; }
.mk-tile:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c, #fff) 50%, transparent); box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 0 0 1px color-mix(in srgb, var(--c, #fff) 25%, transparent); }
.mk-tile:focus-within { outline: none; }
.mk-tile .mk-cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.mk-tile .mk-cover:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.mk-tile .mk-img { position: relative; aspect-ratio: 1; overflow: hidden; background: linear-gradient(135deg, #111a2d, #0b1120); }
.mk-tile .mk-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--mk-ease), opacity .4s; opacity: 0; }
.mk-tile .mk-img img.in { opacity: 1; }
.mk-tile:hover .mk-img img { transform: scale(1.06); }
.mk-tile .mk-rk { position: absolute; left: 10px; top: 10px; }
.mk-tile .mk-rr { position: absolute; right: 10px; top: 10px; font-size: 11.5px; font-weight: 600; padding: 5px 8px; border-radius: 8px; background: rgba(6, 10, 20, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--mk-ink); }
.mk-tile .mk-stats { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 5px; }
.mk-tile .mk-stats span { font-size: 11.5px; font-weight: 700; padding: 4px 7px; border-radius: 7px; background: rgba(6, 10, 20, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mk-tile .mk-stats .k { color: #8fd3ff; } .mk-tile .mk-stats .a { color: #ff9b85; } .mk-tile .mk-stats .d { color: #9be3c1; }
.mk-tile .mk-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.mk-tile .mk-no { font-size: 12px; color: var(--mk-dim); font-weight: 500; }
.mk-tile .mk-nm { font-weight: 700; font-size: 15px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-tile .mk-foot-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 10px; }
.mk-tile .mk-price small { display: block; font-size: 11px; color: var(--mk-faint); font-weight: 500; }
.mk-tile .mk-price b { font-size: 16.5px; font-weight: 700; }
.mk-tile .mk-price .mk-own { font-size: 13px; color: var(--mk-dim); font-weight: 600; }
.mk-tile .mk-quick { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .3s var(--mk-spring); }
.mk-tile:hover .mk-quick, .mk-tile:focus-within .mk-quick { opacity: 1; transform: none; }
@media (hover: none) { .mk-tile .mk-quick { display: none; } }
.mk-tile.r4 { box-shadow: 0 0 0 1px rgba(242, 193, 78, .22), 0 0 30px rgba(242, 193, 78, .08); }
.mk-tile.r4::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 230, 160, .12) 50%, transparent 65%); background-size: 260% 100%; animation: mk-shine 4.5s ease-in-out infinite; }
@keyframes mk-shine { 0% { background-position: 130% 0; } 60%, 100% { background-position: -130% 0; } }
@media (max-width: 640px) { .mk-tile .mk-body { padding: 10px 11px 12px; } .mk-tile .mk-nm { font-size: 14px; } .mk-tile .mk-price b { font-size: 15px; } .mk-tile .mk-stats span { font-size: 10.5px; padding: 3px 5px; } }

/* placeholders while a page reads */
.mk-sk { position: relative; overflow: hidden; background: rgba(255, 255, 255, .05); border-radius: 10px; }
.mk-sk::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); transform: translateX(-100%); animation: mk-sk 1.3s infinite; }
@keyframes mk-sk { to { transform: translateX(100%); } }

/* a passing note */
.mk-toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 22px); z-index: 90; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #f1f3f9; color: #0a0f1c; font-weight: 600; font-size: 14.5px; padding: 12px 18px; border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); transition: opacity .25s, transform .35s var(--mk-spring); }
.mk-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- the older pages' own parts, in the store's colours ---------- */
body.mk .btn.primary, body.mk .sh-acts button.primary, body.mk .mbar .mb-tabs a[aria-current], body.mk .tabs button[aria-pressed="true"], body.mk .tabs button[aria-pressed=true], body.mk .mbar .mb-nudge a, body.mk-move main .btn:not(.ghost):not(.plain) {
  background: var(--mk-cta); border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(239, 77, 51, .28); }
body.mk .btn.primary:disabled, body.mk .sh-acts button.primary:disabled { box-shadow: none; }
body.mk .mbar .mb-ways a[aria-current] { border-color: var(--mk-red); box-shadow: 0 0 0 3px rgba(239, 77, 51, .2); }
body.mk .mbar .mb-tabs, body.mk .mbar .mb-ways a, body.mk .sh-chips button, body.mk .sh-card, body.mk .sh-tools input, body.mk .sh-tools select { background-color: rgba(255, 255, 255, .03); }
body.mk main h1 { letter-spacing: -.02em; }
body.mk .sh-card { border-radius: 14px; transition: transform .3s var(--mk-spring), border-color .2s, box-shadow .3s; }
body.mk .sh-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, .4); }

@media (prefers-reduced-motion: reduce) { body.mk *, body.mk *::before, body.mk *::after { animation: none !important; transition: none !important; } }
