/* CheeseBurger SMP website — shared styles. Logical properties everywhere so Arabic (RTL) mirrors cleanly. */

:root {
  --bg: #14110F;
  --bg-2: #191512;
  --card: #1E1915;
  --card-2: #262019;
  --card-3: #2E261E;
  --line: #352B23;
  --line-2: #4A3D31;
  --text: #F7F0E6;
  --muted: #BDAE9B;
  --dim: #8E7F6E;

  --cheese: #FFC93C;
  --cheese-2: #FFB423;
  --burger: #FF8A3D;
  --tomato: #FF5A4E;
  --lettuce: #6BCB77;
  --bun: #C58B4E;
  --shard: #B98AFF;
  --discord: #5865F2;

  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 64px;
  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 32px);

  --font: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Tahoma, Arial, sans-serif;
  --font-display: "Pixelify Sans", "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, Tahoma, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, "Liberation Mono", monospace;

  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);

  color-scheme: dark;
}

/* The pixel font has no Arabic glyphs, and letter-spacing breaks Arabic joining. */
html[lang="ar"] { --font-display: var(--font); }
html[lang="ar"] *, html[lang="ar"] *::before, html[lang="ar"] *::after { letter-spacing: 0 !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { line-height: 1.75; }
main { flex: 1 0 auto; }
img { max-width: 100%; }
a { color: var(--cheese); text-decoration: none; }
a:hover { color: #FFE08A; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 800; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--font-mono); }
:focus-visible { outline: 3px solid var(--cheese); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(255, 201, 60, .35); color: #fff; }

.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.c-cheese { color: var(--cheese); }
.c-lettuce { color: var(--lettuce); }
.c-tomato { color: var(--tomato); }
.c-shard { color: var(--shard); }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 200;
  background: var(--cheese); color: #2A1A05; padding: 8px 14px; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 12px; color: #2A1A05; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(20, 17, 15, .82);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255, 201, 60, .12);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; transition: transform .3s var(--ease); }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: .02em; white-space: nowrap; }
.brand-name b { color: var(--cheese); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 2px; margin-inline-start: 18px; }
.nav a {
  position: relative; display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--muted); font-weight: 500; font-size: .95rem; white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav a[aria-current="page"] { color: var(--cheese); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; inset-inline: 12px; bottom: 2px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--cheese) 0 6px, transparent 6px 9px);
}
.hdr-end { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }

.status-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding-inline: 12px;
  border-radius: 999px; background: rgba(107, 203, 119, .1); border: 1px solid rgba(107, 203, 119, .35);
  color: var(--text); font-size: .88rem; font-weight: 500; white-space: nowrap; transition: background .2s, transform .15s;
}
.status-chip:hover { background: rgba(107, 203, 119, .18); }
.status-chip:active { transform: scale(.97); }
.status-chip .ip { color: var(--muted); font-family: var(--font-display); border-inline-start: 1px solid rgba(255, 255, 255, .15); padding-inline-start: 8px; }
.status-chip.offline { background: rgba(255, 90, 78, .1); border-color: rgba(255, 90, 78, .35); }

.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lettuce); flex-shrink: 0; box-shadow: 0 0 0 0 rgba(107, 203, 119, .6); animation: pulse 2s infinite; }
.offline .dot, .dot.off { background: var(--tomato); animation: none; }
.dot.idle { background: var(--dim); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(107, 203, 119, .55); } 70% { box-shadow: 0 0 0 8px rgba(107, 203, 119, 0); } 100% { box-shadow: 0 0 0 0 rgba(107, 203, 119, 0); } }

.lang-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.lang-switch button {
  border: 0; background: transparent; color: var(--muted); padding: 5px 9px; border-radius: 7px;
  font-size: .82rem; font-weight: 700; line-height: 1.2; transition: background .2s, color .2s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--cheese); color: #2A1A05; }
.lang-switch button[lang="ar"] { font-family: var(--font); font-size: .86rem; }

.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--card); align-items: center; justify-content: center; padding: 0;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; position: relative; transition: transform .25s var(--ease), background .2s;
}
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }
.nav-open .nav-toggle .bars { background: transparent; }
.nav-open .nav-toggle .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle .bars::after { transform: translateY(-6px) rotate(-45deg); }
html[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

@media (max-width: 1320px) {
  .status-chip .ip { display: none; }
}
@media (max-width: 1200px) and (min-width: 961px) {
  .brand-name { display: none; }
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: var(--header-h); inset-inline: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px var(--gutter) 16px;
    background: rgba(20, 17, 15, .97); border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .45);
    opacity: 0; transform: translateY(-8px); pointer-events: none; visibility: hidden;
    transition: opacity .2s, transform .2s var(--ease), visibility .2s;
  }
  .nav-open .nav { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .nav a[aria-current="page"] { background: rgba(255, 201, 60, .08); }
  .nav a[aria-current="page"]::after { display: none; }
}
@media (max-width: 560px) {
  .brand-name { display: none; }
  .status-chip { padding-inline: 10px; }
  .lang-switch button { padding: 5px 7px; }
}
@media (max-width: 360px) {
  .status-chip .lbl { display: none; }
}

/* ------------------------------------------------------------------ buttons */
.btn {
  --b-bg: var(--card-2); --b-fg: var(--text); --b-bd: var(--line-2); --b-sh: rgba(0, 0, 0, .55);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 46px; padding: .7em 1.3em; border-radius: 10px;
  background: var(--b-bg); color: var(--b-fg); border: 2px solid var(--b-bd);
  box-shadow: 0 4px 0 var(--b-sh); font-weight: 700; font-size: 1rem; line-height: 1.1; white-space: nowrap;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), filter .2s, background .2s;
  user-select: none;
}
.btn:hover { color: var(--b-fg); transform: translateY(-2px); box-shadow: 0 6px 0 var(--b-sh); filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--b-sh); }
.btn img, .btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.btn-primary { --b-bg: linear-gradient(180deg, #FFDB66, #FFB423); --b-fg: #2A1A05; --b-bd: #B87700; --b-sh: #7E4E00; }
.btn-orange { --b-bg: linear-gradient(180deg, #FFA35E, #F2701F); --b-fg: #2A1205; --b-bd: #B44A00; --b-sh: #7A3200; }
.btn-green { --b-bg: linear-gradient(180deg, #7FDA8A, #4FB25C); --b-fg: #0E2A12; --b-bd: #2F7A3A; --b-sh: #1F5427; }
.btn-discord { --b-bg: var(--discord); --b-fg: #fff; --b-bd: #4048C9; --b-sh: #2B3196; }
.btn-ghost { --b-bg: transparent; --b-bd: var(--line-2); --b-sh: transparent; box-shadow: none; }
.btn-ghost:hover { box-shadow: none; background: rgba(255, 255, 255, .05); }
.btn-sm { min-height: 38px; padding: .5em 1em; font-size: .92rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 9px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); padding: 0;
  transition: background .2s, transform .15s;
}
.icon-btn:hover { background: var(--card-3); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ decoration */
.drip {
  height: 28px; margin-top: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='28' shape-rendering='crispEdges'%3E%3Cg fill='%23FFC93C'%3E%3Crect width='160' height='8'/%3E%3Crect x='8' y='8' width='12' height='12'/%3E%3Crect x='12' y='20' width='4' height='4'/%3E%3Crect x='40' y='8' width='8' height='4'/%3E%3Crect x='64' y='8' width='16' height='16'/%3E%3Crect x='68' y='24' width='8' height='4'/%3E%3Crect x='104' y='8' width='8' height='8'/%3E%3Crect x='132' y='8' width='12' height='6'/%3E%3C/g%3E%3Crect width='160' height='2' fill='%23FFE48A'/%3E%3Cg fill='%23E9A400'%3E%3Crect x='16' y='12' width='4' height='8'/%3E%3Crect x='76' y='12' width='4' height='12'/%3E%3Crect x='108' y='8' width='4' height='8'/%3E%3Crect y='6' width='160' height='2' opacity='.35'/%3E%3C/g%3E%3Cg fill='%23FFF1B8'%3E%3Crect x='10' y='10' width='2' height='4'/%3E%3Crect x='66' y='10' width='2' height='6'/%3E%3C/g%3E%3C/svg%3E") repeat-x;
  background-size: 160px 28px;
  position: relative; z-index: 2;
  pointer-events: none;
}
.grid-bg {
  background-image:
    linear-gradient(rgba(255, 201, 60, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 201, 60, .045) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ------------------------------------------------------------------ hero (home) */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 9vw, 104px) clamp(48px, 7vw, 80px); text-align: center; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 60% 55% at 50% 0%, rgba(255, 201, 60, .22), transparent 70%),
    radial-gradient(ellipse 40% 40% at 85% 85%, rgba(255, 90, 78, .14), transparent 70%),
    radial-gradient(ellipse 40% 40% at 12% 80%, rgba(107, 203, 119, .1), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 201, 60, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 201, 60, .05) 1px, transparent 1px);
  background-size: 32px 32px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
}
.hero-logo { display: block; margin: 0 auto 18px; width: min(100%, 720px); height: auto; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .45)) drop-shadow(0 0 40px rgba(255, 170, 40, .25)); animation: logo-in .8s var(--ease) both; }
.hero-logo.broken { display: none; }
.hero-title-fallback { font-family: var(--font-display); font-size: clamp(2.2rem, 7vw, 4.4rem); color: var(--cheese); text-shadow: 0 5px 0 #7E4E00; margin-bottom: 12px; }
@keyframes logo-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 201, 60, .1); border: 1px solid rgba(255, 201, 60, .3); color: var(--cheese);
  font-weight: 700; font-size: .85rem; letter-spacing: .04em;
}
.hero-tagline { font-size: clamp(1.35rem, 3.4vw, 2.1rem); font-weight: 800; margin: 0 auto 10px; max-width: 760px; }
.hero-tagline em { font-style: normal; color: var(--cheese); }
.hero-sub { color: var(--muted); max-width: 640px; margin: 0 auto 30px; font-size: clamp(1rem, 2vw, 1.12rem); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: .9rem; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-size: .86rem; color: var(--muted); white-space: nowrap;
}
.chip b { color: var(--text); font-weight: 700; }
.chip img { width: 18px; height: 18px; }

.ip-box {
  position: relative; display: inline-flex; align-items: center; gap: 14px; max-width: 100%;
  padding: 14px 16px 14px 22px; padding-inline: 22px 16px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(180deg, #2A221A, #201A14); color: var(--text);
  border: 2px solid rgba(255, 201, 60, .45); box-shadow: 0 6px 0 rgba(0, 0, 0, .5), 0 0 0 6px rgba(255, 201, 60, .06), 0 20px 50px rgba(255, 160, 40, .12);
  transition: transform .15s var(--ease), border-color .2s, box-shadow .2s;
  overflow: hidden;
}
.ip-box::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 230, 150, .14) 50%, transparent 65%);
  transform: translateX(-100%); transition: transform .7s var(--ease);
}
.ip-box:hover { border-color: var(--cheese); transform: translateY(-2px); color: var(--text); }
.ip-box:hover::after { transform: translateX(100%); }
.ip-box:active { transform: translateY(2px); }
.ip-box .ip-label { display: block; font-size: .72rem; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; text-align: start; }
.ip-box .ip-value { display: block; font-family: var(--font-display); font-size: clamp(1.15rem, 4.4vw, 1.85rem); font-weight: 700; color: var(--cheese); direction: ltr; unicode-bidi: isolate; overflow-wrap: break-word; line-height: 1.2; text-align: start; }
.ip-box .ip-copy {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 11px;
  background: var(--cheese); color: #2A1A05; transition: transform .2s var(--ease);
}
.ip-box:hover .ip-copy { transform: rotate(-8deg) scale(1.06); }
.ip-box .ip-copy svg { width: 22px; height: 22px; }
.ip-box.copied { border-color: var(--lettuce); }
.ip-box.copied .ip-copy { background: var(--lettuce); }
html[dir="rtl"] .ip-box .ip-value { text-align: right; }
.ip-hint { display: block; margin-top: 8px; font-size: .82rem; color: var(--dim); }

.online-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px;
  background: rgba(107, 203, 119, .1); border: 1px solid rgba(107, 203, 119, .32); font-weight: 700; color: var(--text);
}
.online-pill.offline { background: rgba(255, 90, 78, .1); border-color: rgba(255, 90, 78, .35); }
.online-pill.loading { background: var(--card); border-color: var(--line); color: var(--muted); }

.floaty { position: absolute; width: 48px; height: 48px; z-index: -1; opacity: .85; animation: floaty 7s ease-in-out infinite alternate; animation-delay: var(--d, 0s); filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .35)); pointer-events: none; }
@keyframes floaty { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-18px) rotate(6deg); } }
@media (max-width: 720px) { .floaty { width: 32px; height: 32px; opacity: .28; } .floaty.f-hide-sm { display: none; } }
@media (max-width: 480px) {
  .ip-box { width: 100%; gap: 10px; padding-inline: 16px 12px; }
  .ip-box .ip-value { font-size: clamp(.9rem, 4.5vw, 1.3rem); }
  .ip-box .ip-copy { width: 40px; height: 40px; }
}

/* stats strip */
.stats-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: -10px; position: relative; z-index: 3; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; gap: 14px; min-width: 0; }
.stat img { width: 36px; height: 36px; flex-shrink: 0; }
.stat .v { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1.1; color: var(--text); }
.stat .k { display: block; font-size: .84rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 820px) { .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .stat { padding: 12px; gap: 10px; } .stat .v { font-size: 1.15rem; } .stat img { width: 28px; height: 28px; } }

/* ------------------------------------------------------------------ page hero (inner pages) */
.page-hero { position: relative; overflow: hidden; padding-block: clamp(40px, 7vw, 72px) clamp(28px, 5vw, 48px); isolation: isolate; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 55% 80% at 50% -10%, rgba(255, 201, 60, .18), transparent 70%), radial-gradient(ellipse 35% 60% at 100% 100%, rgba(255, 138, 61, .1), transparent 70%);
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 201, 60, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 201, 60, .045) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(#000, transparent 90%); mask-image: linear-gradient(#000, transparent 90%);
}
.page-hero .container { display: flex; align-items: center; gap: 22px; }
.page-hero-icon { width: 72px; height: 72px; flex-shrink: 0; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .4)); animation: bob 3.5s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 5.5vw, 3.2rem); font-weight: 700; margin-bottom: .2em; letter-spacing: .01em; }
.page-hero p { color: var(--muted); font-size: clamp(1rem, 2vw, 1.12rem); margin: 0; max-width: 680px; }
@media (max-width: 520px) { .page-hero .container { flex-direction: column; align-items: flex-start; gap: 12px; } .page-hero-icon { width: 56px; height: 56px; } }

/* ------------------------------------------------------------------ sections */
.section { padding-block: clamp(48px, 8vw, 88px); }
.section.tight { padding-block: clamp(32px, 5vw, 56px); }
.section.alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-block: 1px solid var(--line); }
.section-head { margin-bottom: clamp(24px, 4vw, 40px); max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .14em; color: var(--cheese);
}
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--cheese); box-shadow: 4px 4px 0 var(--burger); }
.section-title { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: .3em; }
.section-sub { color: var(--muted); font-size: 1.05rem; margin: 0; }
.row-between { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.row-between .section-head { margin-bottom: 0; }

/* cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.card.hover:hover { transform: translateY(-4px); border-color: rgba(255, 201, 60, .4); box-shadow: 0 14px 34px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 201, 60, .08); }
.card-title { font-size: 1.15rem; margin-bottom: .35em; }

/* feature grid */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 1100px) { .features { grid-template-columns: repeat(5, minmax(0, 1fr)); } .features .feature { padding: 20px; } }
@media (max-width: 600px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feature { position: relative; overflow: hidden; }
.feature::after {
  content: ""; position: absolute; inset-inline-end: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow, rgba(255, 201, 60, .14)), transparent 70%); transition: transform .4s var(--ease);
}
.feature:hover::after { transform: scale(1.5); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--card-3); border: 1px solid var(--line-2); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25);
  transition: transform .3s var(--ease);
}
.feature-icon img { width: 36px; height: 36px; }
.feature:hover .feature-icon { transform: rotate(-6deg) scale(1.08); }
.feature h3 { font-size: 1.12rem; margin-bottom: .35em; }
.feature p { color: var(--muted); margin: 0; font-size: .96rem; }
.feature code, .prose code, .step code, .perks code, .section-sub code, .cmd p code { background: rgba(255, 201, 60, .1); color: var(--cheese); padding: 1px 6px; border-radius: 5px; font-size: .9em; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }

/* join steps */
.join-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 820px) { .join-grid { grid-template-columns: minmax(0, 1fr); } }
.join-card { padding: 26px; }
.join-card header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.join-card header .platform-icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--card-3); border: 1px solid var(--line-2); flex-shrink: 0; }
.join-card header .platform-icon svg { width: 28px; height: 28px; }
.join-card h3 { margin: 0; font-size: 1.25rem; }
.join-card header p { margin: 0; color: var(--muted); font-size: .9rem; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.step { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.step::before {
  content: counter(step); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
  background: var(--cheese); color: #2A1A05; font-weight: 800; font-family: var(--font-display); box-shadow: 0 3px 0 #7E4E00;
}
.step > div { padding-top: 4px; }
.copy-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; margin-inline-end: 6px; padding: 6px 12px; border-radius: 9px; border: 1px dashed rgba(255, 201, 60, .5);
  background: rgba(255, 201, 60, .07); color: var(--cheese); font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  direction: ltr; unicode-bidi: isolate; transition: background .2s, border-color .2s; max-width: 100%; overflow-wrap: anywhere; text-align: start;
}
.copy-chip:hover { background: rgba(255, 201, 60, .14); border-style: solid; }
.copy-chip svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .8; }
.copy-chip small { font-family: var(--font); color: var(--muted); font-weight: 500; font-size: .78rem; }
.join-tip { margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); color: var(--muted); font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; }
.join-tip img { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; }

/* home: leaderboard + online lists */
.duo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 880px) { .duo { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .015); }
.panel-head h3 { margin: 0; font-size: 1.08rem; display: flex; align-items: center; gap: 10px; }
.panel-head h3 img { width: 26px; height: 26px; }
.panel-head a { font-size: .9rem; font-weight: 700; white-space: nowrap; }
.panel-body { padding: 10px; flex: 1; }
.mini-lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mini-lb li { display: grid; grid-template-columns: 34px 36px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; transition: background .2s; }
.mini-lb li:hover { background: rgba(255, 255, 255, .04); }
.mini-lb .val { font-weight: 800; color: var(--lettuce); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.player-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; }
.player-tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; padding-inline: 5px 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-weight: 500; font-size: .92rem; max-width: 100%; transition: border-color .2s, transform .2s; color: var(--text); }
.player-tag:hover { border-color: var(--line-2); transform: translateY(-1px); color: var(--text); }
.player-tag img.head { width: 24px; height: 24px; border-radius: 6px; }
.player-tag .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.more-tag { color: var(--muted); padding-inline: 12px; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; }
.empty img { width: 48px; height: 48px; display: block; margin: 0 auto 10px; opacity: .9; }
.empty.big { padding: 56px 16px; }
.empty.big h3 { color: var(--text); }

img.head { border-radius: 6px; background: var(--card-3); image-rendering: pixelated; flex-shrink: 0; }
.pname { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; unicode-bidi: isolate; min-width: 0; }
.pcell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.badge { image-rendering: pixelated; height: 20px; width: auto; flex-shrink: 0; vertical-align: middle; }
.badge-txt {
  display: inline-block; flex-shrink: 0; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 800; line-height: 1.5;
  background: var(--card-3); border: 1px solid var(--line-2); color: var(--text); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; direction: ltr;
}
.badge-lg { height: 40px; }
.badge-xl { height: 60px; }

/* medals */
.medal {
  width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 8px; font-weight: 800; font-size: .9rem;
  background: var(--card-3); color: var(--muted); font-family: var(--font-display); font-variant-numeric: tabular-nums;
}
.medal.m1 { background: linear-gradient(180deg, #FFE27A, #F5B400); color: #4A2E00; box-shadow: 0 3px 0 #8A5A00, 0 0 18px rgba(255, 201, 60, .35); }
.medal.m2 { background: linear-gradient(180deg, #F1F1F1, #B9C0C8); color: #2A2F36; box-shadow: 0 3px 0 #6C737C; }
.medal.m3 { background: linear-gradient(180deg, #F2B27A, #C77436); color: #3A1A05; box-shadow: 0 3px 0 #7A3E10; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; border-radius: 22px; padding: clamp(28px, 5vw, 48px);
  background: linear-gradient(120deg, #2B2117, #231B14 50%, #2A1C1A); border: 1px solid var(--line-2);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
}
.cta-band::before { content: ""; position: absolute; inset-inline-end: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(88, 101, 242, .35), transparent 70%); }
.cta-band h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-bottom: .3em; }
.cta-band p { color: var(--muted); margin: 0; max-width: 560px; }
.cta-band > * { position: relative; }
@media (max-width: 680px) { .cta-band { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ store */
.rank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; align-items: stretch; }
.rank-card {
  --rc: var(--cheese);
  position: relative; display: flex; flex-direction: column; padding: 26px 24px 24px; border-radius: 18px;
  background: var(--card);
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 9%, var(--card)), var(--card) 45%);
  border: 1px solid var(--line-2);
  border: 1px solid color-mix(in srgb, var(--rc) 30%, var(--line));
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.rank-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--rc) 65%, var(--line)); box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 0 40px color-mix(in srgb, var(--rc) 18%, transparent); }
.rank-card::before { content: ""; position: absolute; inset-inline: 20px; top: -1px; height: 4px; border-radius: 0 0 4px 4px; background: var(--rc); }
.rank-card.featured { border-width: 2px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--rc) 12%, transparent); }
.rank-ribbon {
  position: absolute; top: 14px; inset-inline-end: 14px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800;
  background: var(--rc); color: #1A0E04; text-transform: uppercase; letter-spacing: .06em;
}
.rank-card .badge-wrap { height: 60px; display: flex; align-items: center; margin-bottom: 14px; }
.rank-card .badge-wrap .badge { height: 40px; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35)); transition: transform .3s var(--ease); }
.rank-card:hover .badge-wrap .badge { transform: scale(1.06) rotate(-2deg); }
.rank-card .rank-name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--rc); margin-bottom: 4px; }
.rank-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 18px; }
.rank-price .amt { font-size: 2.2rem; font-weight: 800; line-height: 1; direction: ltr; unicode-bidi: isolate; }
.rank-price .per { color: var(--muted); font-size: .95rem; }
.perks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 9px; flex: 1; }
.perks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: .95rem; }
.perks li .ck { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: rgba(107, 203, 119, .15); color: var(--lettuce); margin-top: 1px; }
.perks li .ck svg { width: 14px; height: 14px; }
.perks li b { color: var(--text); }
.perks li.up .ck { background: color-mix(in srgb, var(--rc) 20%, transparent); color: var(--rc); }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); -webkit-overflow-scrolling: touch; }
.compare { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .95rem; }
.compare th, .compare td { padding: 13px 16px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.compare th:first-child, .compare td:first-child { text-align: start; color: var(--muted); font-weight: 500; position: sticky; inset-inline-start: 0; background: var(--card); z-index: 1; }
.compare thead th { background: var(--card-2); vertical-align: bottom; }
.compare thead th:first-child { background: var(--card-2); }
.compare thead .badge { height: 20px; display: block; margin: 0 auto 6px; }
.compare thead .rn { font-weight: 800; font-size: .95rem; }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.compare tbody tr:hover td:first-child { background: #221C17; }
.compare .yes { color: var(--lettuce); }
.compare .no { color: var(--dim); }
.compare svg { width: 18px; height: 18px; vertical-align: middle; }
.compare .better { color: var(--text); font-weight: 700; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product { padding: 18px 10px 14px; }
  .product .p-name { font-size: 1rem; }
  .product .p-price { font-size: 1.15rem; }
}
.product { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 16px 18px; gap: 6px; }
.product .p-icon { width: 64px; height: 64px; margin-bottom: 6px; display: grid; place-items: center; position: relative; }
.product .p-icon img { width: 48px; height: 48px; transition: transform .3s var(--ease); }
.product:hover .p-icon img { transform: translateY(-4px) rotate(-6deg) scale(1.08); }
.product .p-icon::after { content: ""; position: absolute; bottom: 2px; width: 40px; height: 8px; border-radius: 50%; background: rgba(0, 0, 0, .35); z-index: -1; }
.product .p-icon { isolation: isolate; }
.product .p-name { font-weight: 800; font-size: 1.1rem; line-height: 1.25; }
.product .p-desc { color: var(--muted); font-size: .86rem; line-height: 1.4; min-height: 2.4em; }
.product .p-price { font-size: 1.35rem; font-weight: 800; margin: 4px 0 12px; direction: ltr; unicode-bidi: isolate; }
.product .btn { margin-top: auto; }
.product.shard .p-name { color: var(--shard); }
.product.shard { --glow: rgba(185, 138, 255, .16); }
.crate-common { --crate: #C8C8C8; }
.crate-prime { --crate: #4DD0E1; }
.crate-gold { --crate: #FFC93C; }
.crate-amethyst { --crate: #B98AFF; }
.crate-crimson { --crate: #FF5A4E; }
.product.key .p-name { color: var(--crate, var(--cheese)); }
.product.key .p-icon { border-radius: 16px; background: radial-gradient(circle, color-mix(in srgb, var(--crate, var(--cheese)) 22%, transparent), transparent 70%); }

.media-card {
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; padding: clamp(22px, 4vw, 34px);
  background: linear-gradient(135deg, rgba(194, 102, 255, .12), var(--card) 55%); border-color: rgba(194, 102, 255, .35);
}
.media-card .badge { height: 40px; }
.media-card h3 { font-size: 1.4rem; color: #D59BFF; }
.media-card ul { margin: 0 0 18px; padding-inline-start: 1.2em; color: var(--muted); display: grid; gap: 4px; }
.media-card li::marker { color: #C266FF; }
@media (max-width: 640px) { .media-card { grid-template-columns: minmax(0, 1fr); } }

.small-print { margin-top: 36px; padding: 18px 20px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--dim); font-size: .86rem; }
.small-print p:last-child { margin: 0; }

/* ------------------------------------------------------------------ tabs */
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px;
  border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: .95rem; white-space: nowrap; transition: background .2s, color .2s;
}
.tab img { width: 22px; height: 22px; }
.tab:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.tab[aria-selected="true"] { background: var(--cheese); color: #2A1A05; box-shadow: 0 3px 0 #7E4E00; }

/* ------------------------------------------------------------------ leaderboards */
.lb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.lb-layout > * { min-width: 0; }
@media (max-width: 980px) { .lb-layout { grid-template-columns: minmax(0, 1fr); } }
.podium { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; align-items: end; margin-bottom: 16px; }
.podium-card {
  position: relative; text-align: center; padding: 18px 12px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; transition: transform .25s var(--ease);
}
.podium-card:hover { transform: translateY(-4px); }
.podium-card.p1 { order: 2; padding-top: 26px; border-color: rgba(255, 201, 60, .5); background: linear-gradient(180deg, rgba(255, 201, 60, .12), var(--card) 60%); }
.podium-card.p2 { order: 1; }
.podium-card.p3 { order: 3; }
.podium-card img.head { width: 56px; height: 56px; border-radius: 10px; box-shadow: 0 5px 0 rgba(0, 0, 0, .35); }
.podium-card.p1 img.head { width: 72px; height: 72px; }
.podium-card .medal { position: absolute; top: -12px; }
.podium-card .pname { max-width: 100%; font-size: 1rem; }
.podium-card .val { font-weight: 800; font-size: 1.15rem; color: var(--cheese); direction: ltr; unicode-bidi: isolate; }
.podium-card .crown { position: absolute; top: -30px; width: 32px; height: 32px; }
.podium-card.p1 .medal { display: none; }
@media (max-width: 520px) {
  .podium { gap: 8px; }
  .podium-card { padding: 16px 6px 12px; }
  .podium-card img.head { width: 44px; height: 44px; }
  .podium-card.p1 img.head { width: 56px; height: 56px; }
  .podium-card .pname { font-size: .85rem; }
  .podium-card .val { font-size: .95rem; }
  .podium-card .badge { height: 14px; }
}

.lb-table { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lb-head, .lb-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 18px; }
.lb-head { background: var(--card-2); color: var(--dim); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--line); }
.lb-head span:last-child, .lb-row .val { text-align: end; }
.lb-row { border-bottom: 1px solid rgba(53, 43, 35, .6); transition: background .2s; cursor: pointer; }
.lb-row:last-child { border-bottom: 0; }
.lb-row:hover { background: rgba(255, 255, 255, .03); }
.lb-row img.head { width: 32px; height: 32px; }
.lb-row .val { font-weight: 800; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.lb-row .rk { color: var(--dim); font-size: .82rem; white-space: nowrap; }
.lb-row.me { background: rgba(255, 201, 60, .07); }
.lb-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; color: var(--dim); font-size: .85rem; flex-wrap: wrap; }
.v-money { color: var(--lettuce); }
.v-shards { color: var(--shard); }
.v-kills { color: var(--tomato); }
.v-deaths { color: var(--burger); }
.v-playtime { color: var(--cheese); }
.v-sell_money { color: var(--lettuce); }
@media (max-width: 520px) {
  .lb-head, .lb-row { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 9px 12px; gap: 8px; }
  .lb-row .badge { display: none; }
  .lb-row img.head { width: 28px; height: 28px; }
  .medal { width: 28px; height: 28px; font-size: .82rem; }
}

.search-card { position: sticky; top: calc(var(--header-h) + 16px); }
.search-form { display: flex; gap: 8px; margin-top: 12px; }
.input {
  flex: 1; min-width: 0; height: 46px; padding-inline: 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--bg); color: var(--text); font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--dim); }
.input:focus { outline: none; border-color: var(--cheese); box-shadow: 0 0 0 3px rgba(255, 201, 60, .18); }
.input-icon { position: relative; flex: 1; min-width: 0; display: flex; }
.input-icon svg { position: absolute; inset-inline-start: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.input-icon .input { padding-inline-start: 40px; }
select.input { padding-inline-end: 34px; appearance: none; -webkit-appearance: none; cursor: pointer; flex: 0 0 auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23BDAE9B' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
html[dir="rtl"] select.input { background-position: left 12px center; }

.profile { margin-top: 16px; }
.profile-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile-top img.head { width: 64px; height: 64px; border-radius: 12px; box-shadow: 0 5px 0 rgba(0, 0, 0, .35); }
.profile-top .pname { font-size: 1.3rem; display: block; }
.profile-top .sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .86rem; color: var(--muted); margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat-grid div { padding: 10px 12px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); min-width: 0; }
.stat-grid .k { display: block; font-size: .76rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-grid .v { display: block; font-weight: 800; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-grid .wide { grid-column: span 2; }

/* ------------------------------------------------------------------ market */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .input-icon { flex: 1 1 260px; }
.toolbar .count { color: var(--dim); font-size: .9rem; margin-inline-start: auto; }
.ah-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.listing { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 14px; padding: 14px; align-items: center; }
.slot {
  position: relative; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 4px;
  background: #8B8B8B; box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #FFFFFF; /* Minecraft inventory slot */
}
.slot img { width: 36px; height: 36px; }
.slot .amt { position: absolute; inset-inline-end: 4px; bottom: 1px; font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: #fff; text-shadow: 2px 2px 0 #3F3F3F; direction: ltr; }
.listing .l-name { font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.listing .l-price { font-weight: 800; color: var(--lettuce); font-size: 1.15rem; direction: ltr; unicode-bidi: isolate; }
.listing .l-each { color: var(--dim); font-size: .8rem; font-weight: 500; }
.listing .l-meta { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: .8rem; flex-wrap: wrap; margin-top: 2px; }
.listing .l-meta img.head { width: 16px; height: 16px; border-radius: 3px; }
.l-meta .seller { color: var(--muted); direction: ltr; unicode-bidi: isolate; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.l-meta img.head { width: 16px; height: 16px; border-radius: 3px; }
.listing .named { color: #9FE5FF; font-style: italic; }
.listing .enchanted { color: #D9B8FF; }
.l-extra { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 1px; }
.l-extra span { font-size: .74rem; font-weight: 700; padding: 0 7px; border-radius: 999px; line-height: 1.6; cursor: help; white-space: nowrap; }
.l-extra .ench { background: rgba(185, 138, 255, .14); color: #D9B8FF; }
.l-extra .contents { background: rgba(197, 139, 78, .16); color: #E8BE8A; }
.progress { height: 7px; border-radius: 999px; background: var(--card-3); overflow: hidden; margin: 6px 0 2px; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4FB25C, var(--lettuce)); }
.listing.order .l-price { font-size: 1.05rem; }
.fade-in { animation: fade-up .45s var(--ease) both; animation-delay: var(--rd, 0s); }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.tx-list { padding: 0; overflow: hidden; }
.tx-row {
  display: grid; grid-template-columns: 48px minmax(0, 1.5fr) minmax(90px, auto) minmax(0, 1.4fr) minmax(80px, auto);
  gap: 14px; align-items: center; padding: 10px 18px; border-bottom: 1px solid rgba(53, 43, 35, .7);
}
.tx-row:last-child { border-bottom: 0; }
.tx-row:hover { background: rgba(255, 255, 255, .025); }
.tx-row .slot { width: 44px; height: 44px; box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #FFFFFF; }
.tx-row .slot img { width: 26px; height: 26px; }
.tx-row .slot .amt { font-size: .78rem; inset-inline-end: 3px; }
.tx-item { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tx-item .l-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-kind { align-self: flex-start; font-size: .7rem; font-weight: 800; padding: 0 7px; border-radius: 999px; background: rgba(255, 201, 60, .12); color: var(--cheese); text-transform: uppercase; letter-spacing: .05em; }
.tx-kind.k-order { background: rgba(255, 138, 61, .14); color: var(--burger); }
.tx-price { font-weight: 800; color: var(--lettuce); display: flex; flex-direction: column; direction: ltr; text-align: end; }
html[dir="rtl"] .tx-price { text-align: start; }
.tx-price .l-each { color: var(--dim); font-size: .76rem; font-weight: 500; }
.tx-people { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: .85rem; color: var(--dim); }
.tx-arrow svg { width: 14px; height: 14px; display: block; color: var(--dim); }
.tx-time { font-size: .82rem; text-align: end; white-space: nowrap; }
@media (max-width: 760px) {
  .tx-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 14px; }
  .tx-row .slot { grid-row: span 2; }
  .tx-people { grid-column: 2; }
  .tx-time { grid-column: 3; }
}

.poster-online { position: absolute; top: 10px; inset-inline-end: 10px; }
.product .p-amt {
  position: absolute; inset-inline-end: -8px; bottom: -4px; padding: 0 7px; border-radius: 8px; line-height: 1.5;
  background: var(--card-3); border: 1px solid var(--line-2); color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: .9rem; direction: ltr;
}

/* home: spawn hub render */
.hub-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.hub-frame {
  position: relative; border-radius: 18px; overflow: hidden; border: 2px solid var(--line-2);
  box-shadow: 0 8px 0 rgba(0, 0, 0, .45), 0 30px 60px rgba(0, 0, 0, .4); background: #7EC8F0; aspect-ratio: 25 / 18;
}
.hub-frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.hub-frame:hover img { transform: scale(1.04); }
.hub-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
@media (max-width: 860px) { .hub-grid { grid-template-columns: minmax(0, 1fr); } }
.bounty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.poster {
  position: relative; text-align: center; padding: 22px 16px 18px; border-radius: 6px; color: #3B2410;
  background: linear-gradient(180deg, #F4DFB4, #E8C98E); box-shadow: 0 6px 0 #8A6236, 0 16px 30px rgba(0, 0, 0, .35);
  transition: transform .25s var(--ease);
}
.poster:nth-child(odd) { transform: rotate(-1.2deg); }
.poster:nth-child(even) { transform: rotate(1deg); }
.poster:hover { transform: rotate(0) translateY(-4px); }
.poster::before { content: ""; position: absolute; top: 8px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--tomato); box-shadow: 0 2px 0 #8A2A22; }
.poster .wanted { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: .12em; color: #7A2A14; margin: 6px 0 8px; text-transform: uppercase; }
.poster img.head { width: 72px; height: 72px; border-radius: 4px; border: 4px solid #3B2410; background: #3B2410; }
.poster .pname { display: block; margin: 8px 0 2px; font-size: 1.05rem; color: #2A1808; }
.poster .reward-l { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: #7A5530; font-weight: 700; }
.poster .reward { font-size: 1.5rem; font-weight: 800; color: #1F6B2A; direction: ltr; unicode-bidi: isolate; }
.poster .cnt { font-size: .78rem; color: #7A5530; }

/* ------------------------------------------------------------------ rules */
.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .rules-grid { grid-template-columns: minmax(0, 1fr); } }
.rule-card { --rc: var(--lettuce); padding: 0; overflow: hidden; }
.rule-card header { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 14%, transparent), transparent); }
html[dir="rtl"] .rule-card header { background: linear-gradient(270deg, color-mix(in srgb, var(--rc) 14%, transparent), transparent); }
.rule-card header img { width: 40px; height: 40px; }
.rule-card h2 { font-size: 1.3rem; margin: 0; color: var(--rc); }
.rule-card header p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.rule-list { list-style: none; margin: 0; padding: 14px 22px 20px; display: grid; gap: 10px; }
.rule-list li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.rule-list li .mk { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in srgb, var(--rc) 16%, transparent); color: var(--rc); margin-top: 1px; }
.rule-list li .mk svg { width: 14px; height: 14px; }
.rule-card.ok { --rc: var(--lettuce); }
.rule-card.no { --rc: var(--tomato); }
.rule-card.chat { --rc: #6FB7FF; }
.rule-card.pun { --rc: var(--cheese); }
.rule-note { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 18px 20px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.rule-note img { width: 36px; height: 36px; flex-shrink: 0; }
.rule-note p { margin: 0; flex: 1 1 260px; }
.btn { max-width: 100%; }
@media (max-width: 400px) { .btn { white-space: normal; text-align: center; } }

/* ------------------------------------------------------------------ commands */
.cmd-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.cmd-toolbar .input-icon { flex: 1 1 280px; max-width: 520px; }
.cmd-legend { color: var(--dim); font-size: .88rem; }
.cmd-legend code { color: var(--muted); }
.cmd-jump { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.cmd-jump a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: .9rem; font-weight: 500; transition: border-color .2s, color .2s; }
.cmd-jump a:hover { color: var(--text); border-color: var(--line-2); }
.cmd-jump img { width: 18px; height: 18px; }
.cmd-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 900px) { .cmd-groups { grid-template-columns: minmax(0, 1fr); } }
.cmd-group { padding: 0; overflow: hidden; }
.cmd-group header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--card-2); }
.cmd-group header img { width: 30px; height: 30px; }
.cmd-group h2 { font-size: 1.15rem; margin: 0; }
.cmd-group header .n { margin-inline-start: auto; color: var(--dim); font-size: .85rem; }
.cmd { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 11px 20px; border-bottom: 1px solid rgba(53, 43, 35, .7); transition: background .2s; }
.cmd:hover { background: rgba(255, 255, 255, .02); }
.cmd button.syntax { justify-self: start; }
.cmd:last-child { border-bottom: 0; }
.cmd button.syntax {
  border: 0; background: none; padding: 0; text-align: start; direction: ltr; unicode-bidi: isolate;
  font-family: var(--font-mono); font-weight: 700; font-size: .93rem; color: var(--cheese); white-space: nowrap; border-radius: 4px;
}
.cmd button.syntax:hover { text-decoration: underline; text-underline-offset: 3px; }
.cmd .arg { color: var(--burger); font-weight: 500; }
.cmd .opt { color: var(--dim); font-weight: 500; }
.cmd p { margin: 0; color: var(--muted); font-size: .93rem; }
.cmd .perk-tag { display: inline-block; font-size: .72rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: rgba(255, 201, 60, .14); color: var(--cheese); margin-inline-start: 6px; vertical-align: 1px; white-space: nowrap; }
@media (max-width: 600px) { .cmd { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; } .cmd button.syntax { white-space: normal; overflow-wrap: anywhere; } }
mark { background: rgba(255, 201, 60, .3); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ------------------------------------------------------------------ 404 */
.nf { text-align: center; padding-block: clamp(60px, 12vw, 140px); position: relative; }
.nf .code { font-family: var(--font-display); font-size: clamp(5rem, 22vw, 11rem); font-weight: 700; line-height: 1; color: var(--cheese); text-shadow: 0 8px 0 #7E4E00, 0 0 60px rgba(255, 170, 40, .3); display: inline-flex; align-items: center; gap: .1em; direction: ltr; }
.nf .code img { width: .9em; height: .9em; animation: wobble 2.4s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-10deg) translateY(0); } 50% { transform: rotate(12deg) translateY(-10px); } }
.nf h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-top: 18px; }
.nf p { color: var(--muted); max-width: 520px; margin: 0 auto 28px; }

/* ------------------------------------------------------------------ footer */
.site-footer { margin-top: auto; background: #100D0B; border-top: 1px solid var(--line); position: relative; }
.site-footer .drip { position: absolute; top: 0; inset-inline: 0; height: 21px; background-size: 120px 21px; margin: 0; opacity: .95; }
.footer-main { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 28px; padding-block: 56px 28px; }
.footer-brand img.logo { width: 252px; max-width: 100%; height: auto; display: block; margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: .94rem; max-width: 320px; }
.footer-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--muted); font-size: .95rem; transition: color .2s; }
.footer-col a:hover { color: var(--cheese); }
.footer-ip { margin-top: 4px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 18px 26px; border-top: 1px solid var(--line); color: var(--dim); font-size: .84rem; }
@media (max-width: 860px) { .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-main { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ modal + toasts */
dialog.modal {
  width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 18px;
  background: var(--card); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
dialog.modal[open] { animation: modal-in .25s var(--ease); }
dialog.modal::backdrop { background: rgba(8, 6, 5, .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-body { padding: 28px 26px 22px; text-align: center; }
.modal-body img.m-icon { width: 72px; height: 72px; margin-bottom: 10px; }
.modal-body h3 { font-size: 1.4rem; }
.modal-body p { color: var(--muted); }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.modal-x { position: absolute; top: 12px; inset-inline-end: 12px; }

.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; padding-inline: 14px 18px; border-radius: 12px;
  background: #2A231C; border: 1px solid var(--line-2); color: var(--text); box-shadow: 0 14px 40px rgba(0, 0, 0, .5); font-weight: 500;
  animation: toast-in .3s var(--ease) both; pointer-events: auto;
}
.toast img { width: 26px; height: 26px; flex-shrink: 0; }
.toast.ok { border-color: rgba(107, 203, 119, .5); }
.toast.err { border-color: rgba(255, 90, 78, .5); }
.toast.out { animation: toast-out .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------------ loading + errors */
.skel { position: relative; overflow: hidden; background: var(--card-2); border-radius: 8px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-line { height: 14px; margin: 8px 0; }
.skel-card { height: 380px; border-radius: 18px; }
.skel-row { height: 52px; margin: 6px 10px; }
.error-box { text-align: center; padding: 36px 20px; border-radius: var(--radius); border: 1px dashed rgba(255, 90, 78, .4); background: rgba(255, 90, 78, .05); color: var(--muted); }
.error-box img { width: 44px; height: 44px; display: block; margin: 0 auto 10px; }
.error-box p { margin-bottom: 14px; }

/* ------------------------------------------------------------------ reveal on scroll */
/* Uses the separate `translate` property so hover `transform`s on the same cards still work. */
.reveal-on .reveal {
  opacity: 0; translate: 0 18px;
  transition: opacity .6s var(--ease), translate .6s var(--ease), transform .25s var(--ease), border-color .25s, box-shadow .25s, background .2s;
  transition-delay: var(--rd, 0s), var(--rd, 0s), 0s, 0s, 0s, 0s;
}
.reveal-on .reveal.in { opacity: 1; translate: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
  .floaty { animation: none; }
}
