/* Unbounded and Fixel Text (SIL Open Font License 1.1), subset to Latin + Cyrillic. */
@font-face { font-family: "Fixel Text"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/FixelText-Regular.woff2) format("woff2"); }
@font-face { font-family: "Fixel Text"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/FixelText-Medium.woff2) format("woff2"); }
@font-face { font-family: "Fixel Text"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/FixelText-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "Fixel Text"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/FixelText-Bold.woff2) format("woff2"); }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/Unbounded-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/Unbounded-ExtraBold.woff2) format("woff2"); }

/* BavovnaCraft public site — "Степ": pixel steppe, navy glass, one yellow accent. */

:root {
  --navy: #0b1330;
  --navy-deep: #070c1d;
  --panel: rgba(8, 12, 24, 0.8);
  --panel-strong: rgba(8, 12, 24, 0.9);
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --chip: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.12);
  --text: #fff;
  --soft: rgba(255, 255, 255, 0.86);
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.56);
  --accent: #ffd500;
  --accent-hover: #ffe14d;
  --accent-edge: #b89a00;
  --on-accent: #14161c;
  --good: #4ade80;
  --warn: #ffb347;
  --danger: #ff9c8a;
  --idle: #9aa3b8;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Fixel Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --header-h: 68px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h2 { font: 800 clamp(24px, 3vw, 32px)/1.15 var(--display); letter-spacing: -0.01em; }
h3 { font-weight: 700; font-size: 18px; }
p { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pixel, .brand-mark, .step-icon { image-rendering: pixelated; flex: none; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 780px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 18px; border: 0; border-radius: 12px;
  font: 600 15px/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, transform .1s, box-shadow .1s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 0 var(--accent-edge); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-edge); }
.btn-ghost { background: var(--chip); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); color: var(--text); }
.btn-small { padding: 8px 14px; font-size: 14px; box-shadow: 0 3px 0 var(--accent-edge); }
.btn-xl { padding: 18px 28px; font-size: 18px; font-weight: 700; border-radius: 14px; }
.btn.is-disabled { background: var(--chip); color: var(--faint); box-shadow: none; cursor: not-allowed; }
.btn-icon { image-rendering: pixelated; flex: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 12, 24, 0.62);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { border-radius: 6px; }
.wordmark { font: 800 17px/1 var(--display); letter-spacing: 0.02em; white-space: nowrap; }
.wordmark .accent { color: var(--accent); }
.site-nav { display: flex; gap: 4px; margin-left: 8px; }
.site-nav a {
  padding: 8px 12px; border-radius: 10px; color: var(--soft);
  font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--accent); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, 0.08); }
.lang-switch a {
  padding: 5px 10px; border-radius: 8px; color: var(--soft);
  font: 700 12px/1.2 var(--body); letter-spacing: 0.04em; text-decoration: none;
}
.lang-switch a:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.lang-switch a[aria-current="true"] { background: #fff; color: var(--on-accent); }

/* «Увійти» and, signed in, the nickname (to «Акаунт»). */
.header-login { box-shadow: none; }
.header-login-icon { display: none; width: 18px; height: 18px; }
.me-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.08); color: var(--text); text-decoration: none; font: 600 14px/1.2 var(--body);
}
.me-chip:hover { background: rgba(255, 255, 255, 0.14); color: var(--text); }
.me-head { width: 24px; height: 24px; border-radius: 5px; image-rendering: pixelated; flex: none; }
.me-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* One row: a little less room around the sections, and a long nickname ends in «…». */
@media (min-width: 1200px) {
  .header-row { gap: 16px; }
  .site-nav a { padding: 8px 10px; }
  .me-name { max-width: 76px; }
}
/* Narrower, the sections go to a row of their own. */
@media (max-width: 1199px) {
  .header-row { flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; }
  .site-nav { order: 3; width: 100%; margin: 0 -12px; padding: 0 0 6px; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  :root { --header-h: 104px; }
}
@media (max-width: 860px) { .header-download { display: none; } }
/* A phone's first row holds the brand, the language and an icon for the account. */
@media (max-width: 600px) {
  .me-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .me-chip { padding: 5px; }
}
/* Five sections fit a phone's width; narrower ones scroll. */
@media (max-width: 480px) {
  .site-nav { gap: 2px; }
  .site-nav a { padding: 8px 7px; font-size: 14px; }
  .wordmark { font-size: 15px; }
  .header-actions { gap: 8px; }
  .lang-switch a { padding: 5px 8px; }
  .header-login { padding: 7px; }
  .header-login-icon { display: block; }
  .header-login-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 380px) { .wordmark { font-size: 14px; } .lang-switch a { padding: 5px 6px; } }

/* Hero */
.hero {
  position: relative;
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + 48px) 0 clamp(130px, 19vh, 210px);
  min-height: min(100vh, 860px);
  display: flex; align-items: center;
  background: #4f86dd url(steppe-day.svg) 72% 100% / cover no-repeat;
  image-rendering: pixelated;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 620px) 1fr; gap: 32px; align-items: end; }
.hero-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 24px 60px rgba(4, 8, 20, 0.35);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
  color: var(--soft); font-weight: 600; font-size: 14px; letter-spacing: 0.02em;
}
.eyebrow .dot { width: 10px; height: 10px; background: var(--accent); box-shadow: 3px 3px 0 #ff8a1a; }
.hero-title { font: 800 clamp(32px, 4.6vw, 56px)/1.06 var(--display); letter-spacing: -0.015em; margin-bottom: 20px; }
.lead { color: var(--soft); font-size: clamp(16px, 1.6vw, 18px); line-height: 1.6; max-width: 60ch; }
.hero-panel .lead { margin-bottom: 28px; }
.download .dl-meta { margin-top: 14px; color: var(--muted); font-size: 14px; }
.download .dl-alt { margin-top: 6px; font-size: 14px; }
.hero-stats { display: flex; flex-direction: column; gap: 12px; justify-self: end; }
.stat {
  display: flex; flex-direction: column; min-width: 200px; padding: 16px 20px;
  background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px;
}
.stat-value { font: 800 28px/1.1 var(--display); }
.stat-label { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) {
  .hero { min-height: 0; padding-bottom: 170px; background-position: 88% 100%; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: row; justify-self: stretch; }
  .stat { flex: 1; min-width: 0; padding: 12px 16px; }
  .stat-value { font-size: 22px; }
}
@media (max-width: 480px) {
  .hero { padding-top: calc(var(--header-h) + 24px); }
  .btn-xl { width: 100%; padding: 16px 20px; font-size: 17px; }
}

/* A strip of pixel soil under every landscape. */
.soil { height: 24px; background: #6b4420 url(soil.svg) 0 0 / 48px 24px repeat-x; image-rendering: pixelated; }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.section-head .more { font-weight: 600; text-decoration: none; }
.empty { color: var(--muted); padding: 28px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; }

/* What the network has (the landing page) */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.feature {
  display: flex; flex-direction: column; gap: 8px; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.feature .pixel { margin-bottom: 8px; }
/* Whole-pixel line heights keep the cards, and so the pixel art in the next ones, on whole pixels. */
.feature h3 { line-height: 22px; }
.feature p { color: var(--muted); font-size: 15px; }
.feature .more { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: 14px; line-height: 22px; text-decoration: none; }
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* On a phone the icon sits beside the title, so nine cards stay short. */
@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .feature { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px 14px; align-items: center; padding: 18px; }
  .feature .pixel { margin: 0; }
  .feature p, .feature .more { grid-column: 1 / -1; }
  .feature .more { padding-top: 0; }
}

/* Downloads */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.platform {
  display: flex; flex-direction: column; gap: 12px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.platform.is-current { border-color: var(--accent); background: rgba(255, 213, 0, 0.08); }
.platform-head p { font-size: 14px; margin-top: 2px; }
.platform-file { font-size: 14px; color: var(--soft); overflow-wrap: anywhere; }
.platform .btn { margin-top: auto; align-self: flex-start; }
.hash { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 8px 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.28); }
.hash-label { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; flex: none; }
.hash-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--soft); }
.copy {
  flex: none; padding: 5px 10px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--chip); color: var(--text); font: 600 12px/1.2 var(--body);
}
.copy:hover { background: rgba(255, 255, 255, 0.2); }
.copy.is-done { background: var(--good); color: var(--on-accent); }
.mac-install {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px 32px; align-items: center;
  margin-top: 16px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.mac-install h3 { margin-bottom: 6px; }
.mac-install .muted { font-size: 14px; }
.command { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 12px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); min-width: 0; }
.command code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 14px; color: var(--accent); scrollbar-width: thin; }
.mac-install .note { grid-column: 1 / -1; font-size: 13px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .mac-install { grid-template-columns: 1fr; } }

/* Server cards */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.server-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.scene { position: relative; overflow: hidden; background-color: #2f6bd0; background-size: cover; background-repeat: no-repeat; image-rendering: pixelated; }
.scene-day { background-image: url(steppe-day.svg); }
.scene-dusk { background-image: url(steppe-dusk.svg); background-color: #5a3c8c; }
.scene-night { background-image: url(steppe-night.svg); background-color: #111c44; }
.server-card .scene { height: 132px; background-position: 88% 72%; }
.scene-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.server-icon {
  position: absolute; left: 16px; bottom: -1px; display: grid; place-items: center;
  width: 60px; height: 56px; border-radius: 12px 12px 0 0; background: #111829;
}
.server-card.is-soon .scene { filter: saturate(0.55) brightness(0.85); }
.status {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px; background: rgba(4, 8, 16, 0.72);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.status .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--idle); }
.status-online .dot { background: var(--good); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2); }
.status-maintenance .dot { background: var(--warn); }
.status-soon .dot { background: var(--accent); }
.server-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 16px 18px 18px; background: #111829; }
.server-body h3 { font: 800 18px/1.2 var(--display); }
.server-body > p { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 3px 10px; border-radius: 999px; background: var(--chip); font-size: 12px; font-weight: 600; color: var(--soft); }
.server-meta { display: flex; gap: 20px; margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.server-meta dt { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.server-meta dd { margin: 0; color: var(--soft); font-weight: 600; }

/* «Ще від Бавовни»: Vatra under the servers. Its campfire across the whole block, and the text on a
   dark card over it, at the bottom left. */
.vatra-section { padding-top: 0; }
.vatra-hero { display: flex; align-items: flex-end; min-height: 400px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #2b1d52 url(vatra.svg) 50% 60% / cover no-repeat; }
.vatra-over { display: flex; flex-direction: column; gap: 14px; max-width: 470px; padding: 26px 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-strong); }
.vatra-over .eyebrow, .vatra-over h2, .vatra-over p { margin: 0; }
.vatra-over > p { font-size: 17px; line-height: 1.55; color: var(--soft); }
.vatra-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.vatra-actions .muted { font-size: 14px; }
/* A phone: the whole picture on top (it is 1.6 times as wide as tall), the card under it. */
@media (max-width: 600px) {
  .vatra-hero { min-height: 0; padding: calc((100vw - 32px) / 1.6 - 24px) 12px 12px; background-size: 100% auto; background-position: 50% 0; }
  .vatra-over { max-width: none; padding: 20px; }
}

/* News */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color .15s, transform .15s; }
.news-card:hover { border-color: rgba(255, 213, 0, 0.5); transform: translateY(-2px); }
.news-card.is-pinned { border-color: rgba(255, 213, 0, 0.35); }
.news-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.news-link:hover { color: inherit; }
.news-cover { height: 150px; background-position: 88% 70%; display: grid; place-items: center; }
.news-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: rgba(4, 8, 16, 0.55); }
.news-body { display: flex; flex-direction: column; gap: 8px; padding: 18px; flex: 1; background: #111829; }
.news-body h3 { font-size: 19px; line-height: 1.3; }
.news-body > p { color: var(--muted); font-size: 15px; }
.news-date { color: var(--faint); font-size: 13px; font-weight: 600; }
.news-date .pin { color: var(--accent); }
.news-body .more { margin-top: auto; padding-top: 6px; color: var(--accent); font-weight: 600; font-size: 14px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step { position: relative; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; counter-increment: step; }
.step::before {
  content: counter(step); position: absolute; top: 20px; right: 20px;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font: 800 16px/1 var(--display);
}
.step-icon { margin-bottom: 16px; }
.step h3 { margin-bottom: 6px; font-size: 18px; }
.step p { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Inner page banners */
.page-banner {
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + 56px) 0 120px;
  background: #4f86dd url(steppe-day.svg) 80% 100% / cover no-repeat;
  image-rendering: pixelated;
}
.page-banner .wrap > * { max-width: 680px; }
.page-banner h1 {
  display: inline-block; padding: 14px 22px; margin-bottom: 14px; border-radius: 16px;
  background: var(--panel); font: 800 clamp(28px, 4vw, 44px)/1.1 var(--display);
}
.page-banner .lead { padding: 14px 20px; border-radius: 14px; background: var(--panel); }
@media (max-width: 860px) { .page-banner { background-position: 90% 100%; padding-bottom: 90px; } }

.pager { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 32px; color: var(--muted); }
.pager a { font-weight: 600; text-decoration: none; }

/* Article */
.article-head { padding: 48px 0 24px; }
.article-head h1 { font: 800 clamp(28px, 4vw, 42px)/1.12 var(--display); margin: 12px 0 14px; }
.back { font-weight: 600; font-size: 14px; text-decoration: none; }
.article-image { display: block; width: 100%; border-radius: 16px; margin-bottom: 28px; }
.article .prose { padding-bottom: 72px; }
.prose { font-size: 17px; line-height: 1.7; color: var(--soft); }
.prose > * + * { margin-top: 1em; }
.prose h1, .prose h2, .prose h3 { color: var(--text); margin-top: 1.6em; }
.prose h1 { font: 800 28px/1.2 var(--display); }
.prose h2 { font: 800 22px/1.25 var(--display); }
.prose h3 { font-size: 19px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul.seller { list-style: none; padding-left: 0; }
.prose li + li { margin-top: 0.4em; }
.prose code { font-family: var(--mono); font-size: 0.9em; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); }
.prose pre { overflow-x: auto; padding: 16px; border-radius: 12px; background: rgba(0, 0, 0, 0.35); }
.prose pre code { padding: 0; background: none; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.prose img { border-radius: 12px; }
.prose hr { border: 0; border-top: 1px solid var(--line); }
.rules h2:first-child { margin-top: 0; }
.rules ol { counter-reset: none; }
.rules li::marker { color: var(--accent); font-weight: 700; }

/* Open-source licences (/licenses): a licence opens to its texts, a text to its words. */
.license-list { font-size: 15px; line-height: 1.5; }
.license { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.license + .license { margin-top: 8px; }
.license > summary {
  display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap;
  padding: 13px 18px; cursor: pointer; color: var(--text); font-weight: 700; list-style: none;
}
.license > summary::-webkit-details-marker { display: none; }
.license > summary::before { content: "+"; flex: none; width: 14px; color: var(--accent); font-family: var(--mono); }
.license[open] > summary::before { content: "−"; }
.license-name { flex: 1 1 200px; min-width: 0; }
.license-count { margin-left: auto; color: var(--muted); font-size: 14px; font-weight: 600; }
.license-text { padding: 10px 18px; border-top: 1px solid var(--line); }
.license-text > summary { cursor: pointer; color: var(--soft); font-size: 14px; overflow-wrap: anywhere; }
.license-text > summary:hover { color: var(--text); }
.license-text pre {
  margin: 10px 0 4px; padding: 14px; max-height: 420px; overflow: auto; border-radius: 10px;
  background: rgba(0, 0, 0, 0.35); color: var(--soft); font: 12.5px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
}
div.license-text pre { margin-top: 4px; }

/* Half of the top-ups to the army (/pay and the payment page) */
.flag { flex: none; width: 24px; height: 16px; margin-top: 4px; border-radius: 3px; background: linear-gradient(#0057b7 50%, #ffd700 50%); }
.fund-note { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; padding: 18px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.fund-body { min-width: 0; }
.fund-text { color: var(--soft); }
.fund-total { margin-top: 10px; color: var(--muted); font-size: 15px; }
.fund-total strong { color: var(--text); }
.fund-list { list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; color: var(--muted); }
.fund-list li { display: flex; flex-wrap: wrap; gap: 2px 16px; padding: 7px 0; border-top: 1px solid var(--line); }
.fund-month { min-width: 128px; }
.fund-amount { min-width: 112px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-fund { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.pay-fund .flag { margin-top: 3px; width: 21px; height: 14px; }
.pay-agree { margin-top: 12px; color: var(--faint); font-size: 13px; }

/* Pay */
.notice { display: flex; gap: 20px; align-items: flex-start; padding: 24px; background: var(--surface); border: 1px solid rgba(255, 213, 0, 0.35); border-radius: 16px; }
.notice h2 { font-size: 20px; margin-bottom: 8px; }
.notice p { color: var(--muted); }
.pay-terms { margin-top: 16px; color: var(--muted); font-size: 14px; }
h2.sub { font-size: 20px; margin: 40px 0 16px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.product { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.product h3 { font-size: 16px; margin-bottom: 6px; }
.product p { color: var(--muted); font-size: 14px; }
.product .price { margin-top: 12px; color: var(--accent); font-weight: 700; font-size: 16px; }

/* Leaderboards (/top) */
.top-server + .top-server { margin-top: clamp(40px, 6vw, 64px); }
.board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.board { min-width: 0; padding: 20px 22px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.board-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.board-head h2, .board-head h3 { font: 800 18px/1.2 var(--display); }
.board-head p { margin-top: 2px; font-size: 14px; }
.board-list { list-style: none; margin: 0; padding: 0; }
.board-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.board-place {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--chip); color: var(--soft); font: 800 13px/1 var(--display);
}
.board-list .is-gold .board-place { background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 0 var(--accent-edge); }
.board-list .is-silver .board-place { background: #d9dfeb; color: var(--on-accent); box-shadow: 0 3px 0 #8f99ad; }
.board-list .is-bronze .board-place { background: #e0975a; color: var(--on-accent); box-shadow: 0 3px 0 #9c5a26; }
.board-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.board-value { flex: none; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-empty { padding: 14px 0 12px; border-top: 1px solid var(--line); color: var(--muted); }
.top-note {
  display: flex; gap: 16px; align-items: center; margin-top: clamp(32px, 5vw, 48px); padding: 18px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--soft);
}
.top-note code { font-family: var(--mono); font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); color: var(--accent); white-space: nowrap; }
@media (max-width: 480px) {
  .board { padding: 16px 16px 8px; }
  .top-note { align-items: flex-start; padding: 16px; }
}

/* Payment page: Solana Pay request, live status */
.pay-banner { padding-bottom: 56px; }
.pay-section { padding-top: clamp(28px, 4vw, 48px); }
.pay-wrap { max-width: 980px; }
/* Only the parts for the payment's state are shown; site.js switches data-state. */
[data-state="pending"] .only-paid, [data-state="pending"] .only-expired,
[data-state="paid"] .only-pending, [data-state="paid"] .only-expired,
[data-state="expired"] .only-pending, [data-state="expired"] .only-paid,
[data-state="test"] .only-pending, [data-state="test"] .only-paid, [data-state="test"] .only-expired,
[data-state="pending"] .only-test, [data-state="paid"] .only-test, [data-state="expired"] .only-test { display: none !important; }
.pay-card {
  display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(24px, 4vw, 44px); align-items: start;
  padding: clamp(20px, 4vw, 36px); border-radius: 22px;
  background: var(--panel-strong); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(4, 8, 20, 0.35);
}
[data-state="paid"] .pay-card, [data-state="expired"] .pay-card, [data-state="test"] .pay-card { grid-template-columns: minmax(0, 1fr); max-width: 620px; }
.status-row.is-test { color: var(--warn); }
.status-row.is-test .dot { background: var(--warn); }
.card-test { color: var(--warn); font-size: 14px; }
[data-state="paid"] .pay-card { border-color: rgba(74, 222, 128, 0.45); }
.nowrap { white-space: nowrap; }
/* Ways to pay: tabs once site.js runs, blocks one under another without it. */
.pay-methods { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* Card or USDC: two tabs over the ways to pay (site.js; without it, one under the other). */
.pay-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, 0.32); }
.pay-kinds[hidden] { display: none; }
.pay-kind {
  padding: 12px 10px; border: 0; border-radius: 10px; background: transparent;
  color: var(--soft); font: 700 15px/1.2 var(--body); cursor: pointer;
}
.pay-kind:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.pay-kind[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.kind { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.kind[hidden] { display: none; }
.kind + .kind { padding-top: 22px; border-top: 1px solid var(--line); }
[data-kinds-ready] .kind + .kind { padding-top: 0; border-top: 0; }
[data-kinds-ready] .kind > .method-title { display: none; }
.kind .btn { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: progress; }
.card-icon { flex: none; }
.card-notes { display: grid; gap: 4px; margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.card-error { color: var(--danger); font-size: 14px; }
#payment[data-kind="card"] .only-usdc, #payment[data-kind="usdc"] .only-card { display: none !important; }
.status-row .confirming { display: none; }
#payment[data-card="paid"] .status-row .waiting { display: none; }
#payment[data-card="paid"] .status-row .confirming { display: inline; }
.method-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, 0.32); }
.method-tabs[hidden] { display: none; }
.method-tab {
  padding: 9px 6px; border: 0; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--soft); font: 600 14px/1.2 var(--body); white-space: nowrap;
}
.method-tab:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.method-tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.method { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.method[hidden] { display: none; }
.method + .method { padding-top: 22px; border-top: 1px solid var(--line); }
[data-tabs-ready] .method + .method { padding-top: 0; border-top: 0; }
.method-title { font: 800 18px/1.2 var(--display); }
[data-tabs-ready] .method-title { display: none; }
.method-for { color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.method .btn { width: 100%; }
.method-hint { color: var(--muted); font-size: 14px; }
.qr-frame { padding: 8px; border-radius: 16px; background: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.3); }
.qr-frame svg { display: block; width: 100%; height: auto; }
.copy-row { display: flex; flex-direction: column; gap: 6px; }
.copy-label { color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.copy-field { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); }
.copy-value { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 600 14px/1.45 var(--mono); color: var(--text); }
#pay-exact { color: var(--accent); font-size: 17px; }
.copy-plain { font-weight: 600; }
.copy-plain .muted { font-size: 13px; font-weight: 400; }
.exact-warning { padding: 14px 16px; border-radius: 14px; background: rgba(255, 179, 71, 0.1); border: 1px solid rgba(255, 179, 71, 0.5); }
.exact-warning strong { display: block; margin-bottom: 4px; color: var(--warn); }
.exact-warning p { color: var(--soft); font-size: 14px; }
.pay-label { color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.pay-amount { margin: 6px 0 2px; font: 800 clamp(32px, 4.6vw, 48px)/1.1 var(--display); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.pay-amount .amount-tail { color: var(--accent); }
.pay-amount .unit { color: var(--soft); font-size: 0.55em; white-space: nowrap; }
.pay-network { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; font-weight: 500; }
.pay-exact { margin-top: 10px; color: var(--muted); font-size: 14px; }
.chain { width: 12px; height: 12px; border-radius: 3px; background: linear-gradient(135deg, #9945ff, #14f195); }
.pay-get {
  display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 14px 18px; border-radius: 14px;
  background: rgba(255, 213, 0, 0.08); border: 1px solid rgba(255, 213, 0, 0.3);
}
.pay-get div { display: flex; flex-direction: column; }
.pay-get .muted { font-size: 13px; }
.pay-get strong { font: 800 24px/1.15 var(--display); }
.pay-status { margin-top: 14px; }
.status-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); font-weight: 600; }
.status-row .dot { width: 10px; height: 10px; flex: none; border-radius: 3px; background: var(--idle); }
.status-row .dot-wait { background: var(--accent); animation: pay-pulse 1.4s ease-in-out infinite; }
@keyframes pay-pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .status-row .dot-wait { animation: none; } }
.pay-timer { margin-left: auto; color: var(--soft); font: 600 14px/1 var(--mono); white-space: nowrap; }
.status-row.is-paid { background: rgba(74, 222, 128, 0.14); color: var(--good); font-size: 17px; }
.status-row .check {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px;
  background: var(--good); color: var(--on-accent); font-weight: 800;
}
.status-row.is-expired { color: var(--warn); }
.status-row.is-expired .dot { background: var(--warn); }
.pay-after { margin-top: 14px; color: var(--muted); }
.pay-steps { margin-bottom: 16px; }
/* The step number sits beside the title here (there's no icon above it to clear). */
.pay-steps .step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px 14px; align-items: center; align-content: start; }
.pay-steps .step::before { position: static; }
.pay-steps .step h3 { margin: 0; }
.pay-steps .step p { grid-column: 1 / -1; }
.pay-steps .step p a { color: var(--accent); }
.pay-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pay-note { padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.pay-note.is-warning { border-color: rgba(255, 179, 71, 0.45); }
.pay-note h3 { margin-bottom: 6px; font-size: 16px; }
.pay-note.is-warning h3 { color: var(--warn); }
.pay-note p { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .pay-notes { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .pay-card { grid-template-columns: 1fr; }
  .pay-info { order: -1; }
  .pay-methods { max-width: 380px; width: 100%; margin: 0 auto; }
  .method .qr-frame { max-width: 300px; width: 100%; margin: 0 auto; }
}

/* 404 and error pages */
.is-lost main, .error-body { display: flex; }
.lost, .error-page {
  flex: 1; display: flex; align-items: center; min-height: 70vh;
  background: #111c44 url(steppe-night.svg) 85% 100% / cover no-repeat; image-rendering: pixelated;
}
.lost { margin-top: calc(-1 * var(--header-h)); padding: calc(var(--header-h) + 40px) 0 140px; }
.lost-panel { max-width: 560px; padding: clamp(24px, 4vw, 36px); border-radius: 22px; background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.08); }
.lost-code, .error-code { font: 800 72px/1 var(--display); color: var(--accent); }
.lost h1 { font: 800 clamp(28px, 4vw, 40px)/1.1 var(--display); margin: 12px 0; }
.lost .lead { margin-bottom: 24px; }
.verify-mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; }
.verify-mark svg { width: 28px; height: 28px; }
.verify-mark.is-done { color: var(--good); background: rgba(74, 222, 128, 0.16); }
.verify-mark.is-expired { color: var(--warn); background: rgba(255, 179, 71, 0.16); }
.verify-mark.is-key { color: var(--accent); background: rgba(255, 213, 0, 0.14); }
/* The new password's form (`/reset-password`). */
.reset-form { display: grid; gap: 14px; }
.reset-field { display: grid; gap: 6px; color: var(--soft); font-size: 14px; font-weight: 600; }
.reset-field input {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: 500 16px var(--body);
}
.reset-field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.reset-hint { color: var(--faint); font-size: 13px; }
.reset-error { margin-bottom: 16px; color: var(--danger); font-weight: 600; }
.reset-form .btn { justify-self: start; margin-top: 4px; }
/* Signing in: `/login`, `/login/code`, `/register`, `/forgot-password`. */
.auth-panel { max-width: 480px; }
.auth-from {
  display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.06); color: var(--soft); font-size: 14px; line-height: 1.45;
}
.auth-forgot { justify-self: end; margin-top: -6px; font-size: 14px; font-weight: 500; }
.auth-switch { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.reset-hint.auth-hint { margin-top: -6px; }
.auth-checks { display: grid; gap: 10px; margin-top: 2px; }
.auth-check { display: flex; gap: 10px; align-items: flex-start; color: var(--soft); font-size: 14px; line-height: 1.45; font-weight: 500; }
.auth-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.reset-field .auth-code { font: 600 22px/1.2 var(--mono); letter-spacing: 0.18em; text-align: center; }
.auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.reset-form .auth-actions .btn { margin-top: 0; }
.auth-notice { margin-bottom: 18px; padding: 10px 14px; border-radius: 12px; background: rgba(74, 222, 128, 0.12); color: var(--good); font-size: 14px; font-weight: 600; }
.link-button {
  padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.link-button:hover { color: var(--accent-hover); }
/* A connected app's mark (we keep no logos of theirs). */
.app-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, 0.1); color: var(--soft);
}
.app-mark svg { width: 18px; height: 18px; }
/* The consent page and the page of an app we don't know (`/connect/…`). */
.consent-panel { max-width: 520px; }
.lost .consent-panel h1 { font-size: clamp(26px, 3.2vw, 32px); }
.app-pair { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.app-pair .link { display: flex; gap: 6px; }
.app-pair .link span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.32); }
.app-pair .app-mark { width: 48px; height: 48px; border-radius: 13px; }
.app-pair .app-mark svg { width: 26px; height: 26px; }
.consent-who {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 22px; padding: 12px 14px;
  border-radius: 14px; background: rgba(255, 255, 255, 0.06); color: var(--soft); font-size: 15px;
}
.consent-who strong { color: var(--text); }
.consent-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.consent-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--soft); line-height: 1.45; }
.consent-list svg { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.consent-yes svg { color: var(--good); }
.consent-list .consent-no { color: var(--muted); }
.consent-no svg { color: var(--faint); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.consent-small { margin-top: 18px; color: var(--faint); font-size: 13px; line-height: 1.5; }
.lost .lead.lead-small { font-size: 16px; }
.unknown-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
/* «Акаунт» and «Підключені програми». */
.acc-panel { max-width: 720px; display: grid; gap: 28px; }
.acc-panel .auth-notice { margin-bottom: -8px; }
.acc-ban { margin-bottom: -8px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 179, 71, 0.12); color: var(--warn); font-size: 14px; font-weight: 600; }
.acc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.lost .acc-name { font: 800 clamp(28px, 4vw, 40px)/1.1 var(--display); margin: 0; overflow-wrap: anywhere; }
.acc-mail { margin-top: 8px; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.acc-mail .ok { color: var(--good); font-weight: 600; }
.acc-mail .no { color: var(--warn); font-weight: 600; }
.acc-h2 { font: 800 20px/1.2 var(--display); margin: 0 0 6px; }
.acc-sub { color: var(--muted); font-size: 15px; }
.acc-sub.acc-after { margin-top: 12px; font-size: 14px; }
.acc-none { margin-top: 14px; color: var(--soft); }
.app-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 14px; padding: 16px 18px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
}
.app-card .app-mark { width: 44px; height: 44px; border-radius: 12px; }
.app-card .app-mark svg { width: 24px; height: 24px; }
.app-card .who { flex: 1 1 200px; min-width: 0; }
.app-card .name { font-weight: 700; font-size: 17px; }
.app-card .meta { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 2px; }
.btn-unlink { background: rgba(255, 156, 138, 0.14); color: var(--danger); }
.btn-unlink:hover { background: rgba(255, 156, 138, 0.24); color: var(--danger); }
.acc-note { padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; line-height: 1.6; }
.acc-note a { color: var(--soft); }
.error-body { min-height: 100vh; }
.error-page { justify-content: center; padding: 24px 16px; }
.error-card { max-width: 440px; padding: 32px; border-radius: 20px; background: var(--panel-strong); border: 1px solid var(--line); }
.error-card h1 { font: 800 26px/1.2 var(--display); margin: 12px 0 10px; }
.error-card p { color: var(--muted); margin-bottom: 22px; }

/* Footer */
.site-footer { background: #0b0f1c; }
/* The page ends in the night steppe: a band of the landscape at its own aspect ratio. */
.footer-scene {
  width: 100%;
  aspect-ratio: 1100 / 210;
  min-height: 110px;
  max-height: 300px;
  background: #18265a url(steppe-night-horizon.svg) 88% 100% / cover no-repeat;
  image-rendering: pixelated;
}
.is-lost .footer-scene { display: none; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.6fr; gap: 32px; padding-top: 36px; padding-bottom: 40px; font-size: 14px; }
.footer-grid .muted { margin-top: 10px; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer nav a { color: var(--soft); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); }
.footer-legal { display: flex; flex-direction: column; gap: 8px; color: var(--faint); }
.footer-legal a { color: var(--soft); }
.footer-seller { color: var(--soft); }
.footer-bottom { padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

/* Clans */
.clan-search { display: flex; gap: 8px; margin-bottom: 28px; }
.clan-search-input {
  flex: 1; min-width: 0; padding: 9px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: 500 15px var(--body);
}
.clan-search-input::placeholder { color: var(--faint); }
.clan-server + .clan-server { margin-top: clamp(40px, 6vw, 64px); }
.clan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.clan-card {
  display: block; min-width: 0; padding: 18px 20px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--text);
}
.clan-card:hover { background: var(--surface-hover); border-color: var(--accent); }
.clan-card h3 { font: 800 18px/1.2 var(--display); margin: 10px 0 6px; }
.clan-card p { color: var(--muted); font-size: 14px; }
.clan-tag {
  display: inline-block; padding: 4px 10px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line);
  font: 700 13px/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent);
}
.clan-head { margin: 28px 0 20px; }
.clan-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 16px; margin-bottom: 24px; }
.clan-tile { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.clan-tile-value { font: 800 22px/1.2 var(--display); }
.clan-tile-label { margin-top: 4px; color: var(--muted); font-size: 14px; }
.clan-members { list-style: none; margin: 0; padding: 0; }
.clan-members li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.rank-badge { padding: 2px 8px; border-radius: 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rank-badge.is-leader { background: var(--accent); color: var(--on-accent); }
.rank-badge.is-elder { background: var(--chip); color: var(--soft); }
.clan-note { margin-top: 24px; padding: 14px 18px; border-radius: 14px; background: var(--panel); color: var(--muted); font-size: 14px; }

/* The world map (/map): the 3D map fills the screen under the header and the plot panel floats
   over it. Everything over the map is solid (a see-through button over a busy map reads badly):
   hover only lightens it. */
.map3d {
  --map-ctl: #111833; --map-ctl-hover: #1e2952; --map-panel: rgba(11, 16, 40, 0.95);
  --map-sold: #aab3cc; --map-resale: #ff9f43;
  position: relative; overflow: hidden; background: var(--navy-deep);
  height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); min-height: 420px;
}
.map3d [hidden] { display: none !important; }
.map3d-canvas, .map3d-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map3d-canvas canvas { touch-action: none; outline: none; }
.map3d-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); max-width: 520px; margin: 0 auto; }
.map3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.map3d-label {
  position: absolute; left: 0; top: 0; padding: 2px 7px; border-radius: 7px; will-change: transform;
  background: rgba(7, 12, 29, 0.84); color: var(--text); font: 700 12px/1.25 var(--body); white-space: nowrap;
}
.map3d-label.is-sold { color: var(--map-sold); }
.map3d-label.is-selected { background: var(--accent); color: var(--on-accent); font-size: 13px; }
.map3d-label.is-warp { color: var(--good); }
.map3d-label.is-warp::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--good); vertical-align: 1px; }
.map3d-label.is-spawn { background: var(--good); color: #062012; }
.map3d-ctl {
  padding: 8px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--map-ctl); color: var(--soft); font: 600 14px/1.2 var(--body); cursor: pointer;
}
.map3d-ctl:hover { background: var(--map-ctl-hover); color: var(--text); }
.map3d-ctl.is-on { border-color: var(--accent); color: var(--accent); }
.map3d-worlds { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; gap: 6px; }
.map3d-zoom { position: absolute; top: 60px; right: 12px; z-index: 3; display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.map3d-zoom button { width: 38px; height: 38px; border: 0; background: var(--map-ctl); color: var(--text); font: 600 20px/1 var(--body); cursor: pointer; }
.map3d-zoom button + button { border-top: 1px solid var(--line); }
.map3d-zoom button:hover { background: var(--map-ctl-hover); color: var(--accent); }
.map3d-top { position: absolute; top: 148px; right: 12px; z-index: 3; }
.map3d-claims { position: absolute; top: 196px; right: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; }
.map3d-claims input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.map3d-legend {
  position: absolute; left: 384px; bottom: 12px; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px 14px;
  padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--map-ctl); color: var(--soft); font-size: 13px;
}
.map3d-swatch { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; border: 2px solid var(--accent); vertical-align: -1px; }
.map3d-swatch.is-resale { border-color: var(--map-resale); }
.map3d-swatch.is-sold { border-color: var(--map-sold); background: rgba(170, 179, 204, 0.25); }
.map3d-coords {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; padding: 5px 10px; border-radius: 8px; white-space: pre;
  border: 1px solid var(--line); background: var(--map-ctl); color: var(--soft); font: 13px var(--mono); font-variant-numeric: tabular-nums;
}
.map3d-toast {
  position: absolute; left: 50%; bottom: 64px; z-index: 6; transform: translateX(-50%);
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--map-ctl-hover); font-size: 14px;
}
/* The plot panel. */
.map3d-panel {
  position: absolute; top: 12px; left: 12px; bottom: 12px; z-index: 4; width: 360px;
  display: flex; flex-direction: column; padding: 12px;
  background: var(--map-panel); border: 1px solid var(--line); border-radius: 16px;
}
.map3d-panel-body { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.map3d-sheet { display: none; }
.map3d-pick { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.map3d-panel input[type="search"], .map3d-panel select {
  width: 100%; min-width: 0; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--map-ctl); color: var(--text); font: 500 14px var(--body);
}
.map3d-panel input::placeholder { color: var(--faint); }
.map3d-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.map3d-chips { display: flex; gap: 6px; }
.map3d-chip {
  flex: 1; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--map-ctl); color: var(--muted); font: 600 13px var(--body); cursor: pointer;
}
.map3d-chip:hover { background: var(--map-ctl-hover); color: var(--text); }
.map3d-chip.is-on { border-color: var(--accent); color: var(--text); }
.map3d-list { flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 6px; align-content: start; padding-right: 2px; }
.map3d-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline;
  padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--map-ctl);
  color: var(--text); font: 600 14px var(--body); text-align: left; cursor: pointer;
}
.map3d-row:hover { background: var(--map-ctl-hover); }
.map3d-row.is-selected { border-color: var(--accent); }
.map3d-row-meta { overflow: hidden; color: var(--muted); font-weight: 400; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.map3d-row-price { color: var(--accent); font-variant-numeric: tabular-nums; }
.map3d-row-price.is-sold { color: var(--map-sold); font-weight: 400; }
.map3d-list-empty { margin: 4px 2px; color: var(--muted); font-size: 14px; }
.map3d-card { display: grid; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--accent); background: var(--map-ctl); }
.map3d-card-top { display: flex; align-items: center; gap: 10px; }
.map3d-card-id { font: 800 18px/1 var(--display); }
.map3d-status { padding: 3px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; }
.map3d-status.is-sold { background: #39405c; color: var(--soft); }
.map3d-close {
  margin-left: auto; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--map-ctl); color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer;
}
.map3d-close:hover { background: var(--map-ctl-hover); color: var(--text); }
.map3d-facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 0; font-size: 14px; }
.map3d-facts dt { color: var(--muted); }
.map3d-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.map3d-facts dd.is-price { color: var(--accent); font-weight: 700; }
.map3d-how, .map3d-where { margin: 0; color: var(--soft); font-size: 13px; }
.map3d-where { color: var(--faint); }
.map3d-note { margin: 0; color: var(--faint); font-size: 13px; }
/* A phone: the panel is a sheet at the bottom, closed until tapped. */
@media (max-width: 860px) {
  .map3d-panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 62%; padding: 8px 10px; }
  .map3d-panel.is-closed .map3d-panel-body { display: none; }
  .map3d-sheet {
    display: flex; justify-content: space-between; align-items: center; width: 100%;
    padding: 6px 4px; border: 0; background: none; color: var(--text); font: 700 14px var(--body); cursor: pointer;
  }
  .map3d-legend { left: 12px; bottom: 70px; }
  .map3d-coords { display: none; }
  .map3d-worlds .map3d-ctl { padding: 7px 10px; font-size: 13px; }
}
