/* =====================================================================
   ШРИФТ Press Start 2P — лежит локально в assets/fonts/ (без CDN).
   ===================================================================== */
@font-face{font-family:'Press Start 2P';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/press-start-2p-cyrillic-ext.woff2') format('woff2');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:'Press Start 2P';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/press-start-2p-cyrillic.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Press Start 2P';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/press-start-2p-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Press Start 2P';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/press-start-2p-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* =====================================================================
   СТИЛИ — старый добрый CSS, без фреймворков.
   ===================================================================== */

/* ---------- переменные (палитра старого Minecraft) ---------- */
:root{
  --bg:#0d0d0d;
  --fg:#ffffff;
  --mc-yellow:#ffffa0;
  --mc-splash:#ffff55;
  --mc-text-shadow:#3f3f3f;
  --mc-btn:#6f6f6f;
  --mc-panel:#c6c6c6;
  --mc-slot:#8b8b8b;
  --mc-green:#54952e;
  --mc-xp:#7efc20;
  --mc-heart:#e02929;
  --container:1024px;
}

/* ---------- база ---------- */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:'Press Start 2P','Courier New',monospace;
  font-size:10px;
  line-height:1.7;
  letter-spacing:0;
  -webkit-font-smoothing:none;
  image-rendering:pixelated;
  overflow-x:hidden;
}
h1,h2,h3,p,ol,ul,li,figure,figcaption{margin:0;padding:0}
img{max-width:100%}
a{color:inherit}
button{font:inherit;color:inherit;background:none;border:none;padding:0}
::selection{background:rgba(94,157,52,.6);color:#fff}

section{scroll-margin-top:64px}

.container{max-width:var(--container);margin-inline:auto;padding-inline:16px}

/* ссылка «к содержимому» для клавиатуры */
.skip-link{position:absolute;left:-9999px;top:0;z-index:200;background:#000;color:var(--mc-splash);padding:8px 14px;border:2px solid var(--mc-splash)}
.skip-link:focus{left:8px;top:8px}

/* ---------- пиксельный курсор ---------- */
body, body *{
  cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='30' viewBox='0 0 10 15'><path d='M0 0 v13 l3 -3 l2.5 5 l2 -1 l-2.5 -5 h5 z' fill='white' stroke='black' stroke-width='0.9' shape-rendering='crispEdges'/></svg>") 1 1, auto;
}
button,a,summary,label[for]{
  cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='30' viewBox='0 0 10 15'><path d='M0 0 v13 l3 -3 l2.5 5 l2 -1 l-2.5 -5 h5 z' fill='%23ffffa0' stroke='black' stroke-width='0.9' shape-rendering='crispEdges'/></svg>") 1 1, pointer;
}

/* ---------- текстовые тени ---------- */
.mc-text{text-shadow:2px 2px 0 var(--mc-text-shadow)}
.mc-text-dark{text-shadow:2px 2px 0 rgba(0,0,0,.25)}

/* ---------- КНОПКА как в главном меню ---------- */
.mc-btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  background-color:var(--mc-btn);
  background-image:url("../img/stone.png");
  background-size:48px 48px;
  image-rendering:pixelated;
  border:2px solid #000;
  box-shadow:inset 2px 2px 0 rgba(255,255,255,.42), inset -2px -2px 0 rgba(0,0,0,.42);
  color:#fff;
  text-shadow:2px 2px 0 var(--mc-text-shadow);
  font-weight:400;
  line-height:1.25;
  text-decoration:none;
  padding:10px 20px;
  font-size:12px;
  transition:filter 90ms steps(2), background-color 90ms steps(2);
  user-select:none;
  -webkit-user-select:none;
}
.mc-btn:hover:not(:disabled),
.mc-btn:focus-visible:not(:disabled){
  color:var(--mc-yellow);
  background-color:#7d7d7d;
  filter:brightness(1.12);
  outline:none;
}
.mc-btn:focus-visible{
  box-shadow:inset 2px 2px 0 rgba(255,255,255,.42), inset -2px -2px 0 rgba(0,0,0,.42), 0 0 0 2px rgba(255,255,160,.7);
}
.mc-btn:active:not(:disabled){
  box-shadow:inset -2px -2px 0 rgba(255,255,255,.25), inset 2px 2px 0 rgba(0,0,0,.45);
  transform:translateY(1px);
}
.mc-btn:disabled{color:#a0a0a0;filter:brightness(.7)}
.mc-btn.small{padding:8px 12px;font-size:10px}

/* ---------- ПАНЕЛИ И СЛОТЫ (GUI инвентаря) ---------- */
.mc-panel{
  background:var(--mc-panel);
  border:3px solid;
  border-color:#ffffff #555555 #555555 #ffffff;
  outline:3px solid #000;
  color:#3f3f3f;
}
.mc-panel-dark{
  background:rgba(16,16,16,.88);
  border:3px solid;
  border-color:#565656 #1a1a1a #1a1a1a #565656;
  outline:3px solid #000;
  color:#fff;
}
.mc-slot{
  background:var(--mc-slot);
  border:2px solid;
  border-color:#373737 #ffffff #ffffff #373737;
  display:flex;
  align-items:center;
  justify-content:center;
}
.mc-frame{
  background:var(--mc-slot);
  border:4px solid;
  border-color:#373737 #ffffff #ffffff #373737;
  outline:3px solid #000;
}
.mc-tooltip{
  background:rgba(18,1,26,.95);
  border:2px solid rgba(90,20,220,.55);
  outline:2px solid rgba(16,0,16,.95);
  color:#fff;
  text-shadow:2px 2px 0 var(--mc-text-shadow);
  padding:6px 10px;
  font-size:11px;
  pointer-events:none;
  white-space:nowrap;
  z-index:100;
}

/* ---------- фоны-текстуры (встроены прямо в файл) ---------- */
.bg-dirt-menu{background-image:url("../img/dirt_dark.png");background-size:64px 64px;image-rendering:pixelated}
.bg-dirt{background-image:url("../img/dirt.png");background-size:48px 48px;image-rendering:pixelated}
.bg-stone{background-image:url("../img/stone.png");background-size:48px 48px;image-rendering:pixelated}
.bg-planks{background-image:url("../img/planks.png");background-size:48px 48px;image-rendering:pixelated}
.bg-cobble{background-image:url("../img/cobble.png");background-size:48px 48px;image-rendering:pixelated}
.bg-bedrock{background-image:url("../img/bedrock.png");background-size:48px 48px;image-rendering:pixelated}
.pixel{image-rendering:pixelated}

/* ---------- скроллбар ---------- */
::-webkit-scrollbar{width:16px;height:16px}
::-webkit-scrollbar-track{background:#000}
::-webkit-scrollbar-thumb{
  background-color:#6f6f6f;
  background-image:url("../img/stone.png");
  background-size:32px 32px;
  border:2px solid #000;
  box-shadow:inset 2px 2px 0 rgba(255,255,255,.4), inset -2px -2px 0 rgba(0,0,0,.4);
}
::-webkit-scrollbar-thumb:hover{background-color:#8a8a8a}

/* ---------- анимации ---------- */
@keyframes mc-splash{from{transform:rotate(-16deg) scale(1)}to{transform:rotate(-16deg) scale(1.09)}}
.animate-splash{animation:mc-splash .4s ease-in-out infinite alternate;transform-origin:center}

@keyframes mc-drift{from{transform:translateX(-20vw)}to{transform:translateX(110vw)}}
@keyframes mc-float{from{transform:translateY(0)}to{transform:translateY(-7px)}}
.animate-float{animation:mc-float 2.6s ease-in-out infinite alternate}

@keyframes mc-torch{0%,100%{opacity:1;filter:brightness(1)}30%{opacity:.85;filter:brightness(1.25)}60%{opacity:.95;filter:brightness(.9)}}
.animate-torch{animation:mc-torch .9s steps(2) infinite}

@keyframes mc-twinkle{0%,100%{opacity:.9}50%{opacity:.25}}
.animate-twinkle{animation:mc-twinkle 1.6s ease-in-out infinite}

@keyframes mc-toast-in{from{transform:translateX(calc(100% + 24px))}to{transform:translateX(0)}}
.animate-toast-in{animation:mc-toast-in .28s steps(6) both}

@keyframes mc-pop{0%{transform:scale(.7);opacity:0}70%{transform:scale(1.06)}100%{transform:scale(1);opacity:1}}
.animate-pop{animation:mc-pop .35s steps(5) both}

@keyframes mc-blink{0%,49%{opacity:1}50%,100%{opacity:0}}
.animate-blink{animation:mc-blink 1s steps(1) infinite}

@keyframes mc-pulse{0%,100%{opacity:.5}50%{opacity:1}}
.animate-pulse{animation:mc-pulse 1.6s ease-in-out infinite}

/* =====================================================================
   ЭКРАН ЗАГРУЗКИ «Создание мира…» — прячется сам, даже без JS
   ===================================================================== */
@keyframes loader-hide{0%,62%{opacity:1;visibility:visible}100%{opacity:0;visibility:hidden}}
#loader{
  position:fixed;inset:0;z-index:90;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;
  animation:loader-hide 1.6s ease forwards;
}
#loader .loader-row{display:flex;align-items:center;gap:16px}
#loader .loader-dirt{width:100%;height:100%;background-image:url("../img/dirt.png");background-size:32px 32px;image-rendering:pixelated}
#loader .loader-title{color:#fff;font-size:16px;font-weight:400}
#loader .loader-sub{color:rgba(255,255,255,.6);font-size:10px;margin-top:4px}
#loader .loader-bar{width:256px;max-width:80vw;height:16px;background:#000;border:2px solid rgba(255,255,255,.7);padding:2px}
#loader .loader-fill{height:100%;width:6%;background:var(--mc-xp);transition:width .9s linear}

/* =====================================================================
   ШАПКА
   ===================================================================== */
.topbar{
  position:sticky;top:0;z-index:50;
  background-image:url("../img/dirt_dark.png");background-size:64px 64px;image-rendering:pixelated;
  border-bottom:4px solid #000;
  box-shadow:inset 0 -3px 0 rgba(255,255,255,.07);
}
.topbar-inner{
  max-width:var(--container);margin-inline:auto;padding-inline:12px;
  height:56px;display:flex;align-items:center;justify-content:space-between;gap:8px;
}
.topbar-brand{display:flex;align-items:center;gap:10px;min-width:0;text-decoration:none}
.topbar-brand .brand-name{font-weight:400;color:#fff;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(min-width:768px){.topbar-brand .brand-name{font-size:12px}}
.topbar-actions{display:flex;align-items:center;gap:8px}
.topbar .ip-btn{display:none}
@media(min-width:640px){.topbar .ip-btn{display:inline-flex}}
/* ссылки в шапке: чат / форум / админы */
.topbar .top-link{padding:8px 12px;font-size:10px;text-decoration:none}
.top-link .tl-short{display:none}
@media(max-width:959px){
  .top-link .tl-full{display:none}
  .top-link .tl-short{display:inline}
}
@media(max-width:479px){
  .top-link .tl-short{display:none}
  .topbar .top-link{padding:8px 9px}
}

/* =====================================================================
   HERO — главное меню
   ===================================================================== */
.hero{
  position:relative;
  background-image:url("../img/dirt_dark.png");background-size:64px 64px;image-rendering:pixelated;
}
.hero-inner{max-width:var(--container);margin-inline:auto;padding:56px 16px 40px;text-align:center;position:relative}
.logo-wrap{position:relative;display:inline-block;max-width:100%}
.hero .logo{
  display:block;margin:0 auto 8px;max-height:192px;width:auto;
  image-rendering:pixelated;
}
.site-title{
  font-size:clamp(20px,4.6vw,40px);
  font-weight:400;color:#ececec;line-height:1.15;overflow-wrap:break-word;
  text-shadow:3px 3px 0 #3f3f3f, 6px 6px 0 rgba(0,0,0,.35);
  -webkit-text-stroke:2px rgba(0,0,0,.55);
}
.splash{
  position:absolute;right:-12px;top:-22px;
  color:var(--mc-splash);font-size:12px;font-weight:400;white-space:nowrap;
  pointer-events:none;user-select:none;
}
@media(min-width:768px){.splash{right:-56px;top:-30px;font-size:16px}}
.tagline{margin-top:24px;color:rgba(255,255,255,.85);font-size:12px;max-width:672px;margin-inline:auto;line-height:1.625}
@media(min-width:768px){.tagline{font-size:14px}}
.hero-buttons{margin-top:32px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px}
@media(min-width:768px){.mc-btn.btn-lg{font-size:14px;padding:12px 28px}}

/* --- панель сервера, как строка в списке серверов --- */
.server-panel{margin:40px auto 0;max-width:576px;text-align:left;padding:12px}
.server-panel .sp-row{display:flex;align-items:center;gap:12px}
.sp-icon{position:relative;width:64px;height:64px;flex-shrink:0;overflow:hidden}
.sp-icon .fallback{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.sp-icon img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;image-rendering:pixelated;opacity:0}
.sp-icon img.ok{opacity:1}
.sp-main{flex:1;min-width:0}
.sp-name-row{display:flex;align-items:center;gap:8px}
.sp-name{color:#fff;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sp-dot{font-size:10px;color:var(--mc-xp);flex-shrink:0}
.sp-motd{font-size:10px;color:#c9c9c9;line-height:1.2;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sp-meta{font-size:9px;color:rgba(255,255,255,.45);margin-top:4px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.sp-meta .sp-addr{color:var(--mc-splash)}
.sp-extra{display:none}
@media(min-width:640px){.sp-extra{display:inline}}
.sp-side{flex-shrink:0;display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.ping-bars{display:flex;align-items:flex-end;gap:2px;height:16px}
.ping-bars span{width:3px;background:#3a3a3a}
.ping-bars span.on{background:#54d43f}
.sp-players{color:#fff;font-size:11px;white-space:nowrap}
.sp-players-label{font-size:10px;color:rgba(255,255,255,.45)}
.hero-corner{position:absolute;bottom:8px;font-size:9px;color:rgba(255,255,255,.4)}
.hero-corner.left{left:12px}
.hero-corner.right{right:12px}

/* =====================================================================
   СЦЕНА «ОКНО В МИР»
   ===================================================================== */
.scene{position:relative;height:256px;overflow:hidden;border-top:4px solid #000;background:#7ba4ff;transition:background-color 1s}
@media(min-width:768px){.scene{height:320px}}
.scene.night{background:#0b1023}
.stars{display:none;position:absolute;inset:0}
.scene.night .stars{display:block}
.stars i{position:absolute;background:#fff}
.sun{
  position:absolute;top:28px;right:14%;width:64px;height:64px;background:#fef7c0;
  box-shadow:0 0 42px 10px rgba(255,240,170,.55);transition:all .7s;
}
.scene.night .sun{opacity:0;transform:scale(.75)}
.moon{position:absolute;top:28px;right:14%;opacity:0;transform:scale(.75);transition:all .7s}
.scene.night .moon{opacity:1;transform:scale(1)}
.clouds{position:absolute;inset:0;transition:opacity 1s}
.scene.night .clouds{opacity:.2}
.cloud{position:absolute;left:0}
.cloud .c-main{width:112px;height:16px;background:#fff}
.cloud .c-top{position:absolute;top:-10px;left:20px;width:56px;height:12px;background:#fff}
.cloud .c-bot{position:absolute;bottom:-10px;left:40px;width:48px;height:12px;background:#fff}
.cloud .c-tail{position:absolute;top:-4px;left:96px;width:24px;height:10px;background:rgba(255,255,255,.85)}
.world{position:absolute;inset:0;transition:filter 1s}
.scene.night .world{filter:brightness(.42)}
.scene .layer{position:absolute;left:0;right:0;will-change:transform}
.layer-back{bottom:64px;height:176px}
.layer-back .hill{position:absolute;inset:0;background:#2c6a1c;clip-path:polygon(0% 100%, 0% 49%, 7.1% 49%, 7.1% 21%, 14.3% 21%, 14.3% 21%, 21.4% 21%, 21.4% 21%, 28.6% 21%, 28.6% 21%, 35.7% 21%, 35.7% 14%, 42.9% 14%, 42.9% 21%, 50.0% 21%, 50.0% 35%, 57.1% 35%, 57.1% 21%, 64.3% 21%, 64.3% 21%, 71.4% 21%, 71.4% 21%, 78.6% 21%, 78.6% 21%, 85.7% 21%, 85.7% 14%, 92.9% 14%, 92.9% 21%, 100.0% 21%, 100.0% 28%, 100% 100%)}
.layer-front{bottom:64px;height:128px}
.layer-front .hill{position:absolute;inset:0;background:#3f8f2b;clip-path:polygon(0% 100%, 0% 56%, 7.1% 56%, 7.1% 35%, 14.3% 35%, 14.3% 42%, 21.4% 42%, 21.4% 28%, 28.6% 28%, 28.6% 35%, 35.7% 35%, 35.7% 42%, 42.9% 42%, 42.9% 28%, 50.0% 28%, 50.0% 28%, 57.1% 28%, 57.1% 28%, 64.3% 28%, 64.3% 42%, 71.4% 42%, 71.4% 42%, 78.6% 42%, 78.6% 28%, 85.7% 28%, 85.7% 35%, 92.9% 35%, 92.9% 35%, 100.0% 35%, 100.0% 42%, 100% 100%)}
.layer-props{bottom:56px;height:96px}
.layer-props .tree{position:absolute;bottom:0}
.tree-1{left:7%;width:96px;height:96px}
.tree-2{left:46%;width:112px;height:112px}
.tree-3{left:80%;width:80px;height:80px}
.torch-wrap{position:relative}
.torch-wrap::before{content:"";position:absolute;inset:-20px;border-radius:50%;background:rgba(255,180,60,.25);filter:blur(6px)}
.torch-1{position:absolute;bottom:4px;left:30%}
.torch-2{position:absolute;bottom:4px;right:24%}
.flower{position:relative;width:12px;height:12px}
.flower .stem{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:2px;height:5px;background:#2c6a1c}
.flower .petal{position:absolute;top:0;left:50%;transform:translateX(-50%);width:6px;height:4px}
.fl-1{position:absolute;bottom:4px;left:20%}
.fl-2{position:absolute;bottom:4px;left:60%}
.fl-3{position:absolute;bottom:4px;right:9%}
.scene-ground{position:absolute;bottom:0;left:0;right:0;height:64px}
.scene-ground .grass-strip{height:32px;background-image:url("../img/grass_side.png");background-size:32px 32px;background-repeat:repeat-x;image-rendering:pixelated}
.scene-ground .dirt-strip{height:32px;background-image:url("../img/dirt.png");background-size:32px 32px;image-rendering:pixelated}
.scene-vignette{position:absolute;inset:0;box-shadow:inset 0 14px 28px rgba(0,0,0,.4);pointer-events:none}
.scene-chat{position:absolute;bottom:8px;left:8px;display:flex;flex-direction:column;gap:3px;width:240px;pointer-events:none}
@media(min-width:768px){.scene-chat{width:288px}}
.chat-line{background:rgba(0,0,0,.4);color:#fff;padding:3px 6px;width:-moz-fit-content;width:fit-content;max-width:100%;font-size:9px;line-height:1.2;overflow-wrap:break-word}
.scene-toggle{position:absolute;top:12px;right:12px;z-index:10;padding:6px 12px;font-size:11px}

/* ---------- разделитель секций ---------- */
.cobble-divider{height:12px;background-image:url("../img/cobble.png");background-size:48px 48px;image-rendering:pixelated;border-top:4px solid #000;border-bottom:4px solid #000}

/* =====================================================================
   ЗАГОЛОВКИ СЕКЦИЙ
   ===================================================================== */
.section{padding:64px 0}
.section-header{margin-bottom:40px}
.section-header .sh-row{display:flex;align-items:center;gap:12px}
@media(min-width:768px){.section-header .sh-row{gap:20px}}
.section-header .sh-bar{flex:1;height:12px;background-image:url("../img/cobble.png");background-size:48px 48px;image-rendering:pixelated;border-top:2px solid #000;border-bottom:2px solid #000;box-shadow:inset 0 2px 0 rgba(255,255,255,.15)}
.section-header h2{font-size:16px;font-weight:400;color:var(--mc-splash);white-space:nowrap}
@media(min-width:768px){.section-header h2{font-size:24px}}
.section-header .sh-sub{text-align:center;color:rgba(255,255,255,.65);margin-top:12px;font-size:11px}
@media(min-width:768px){.section-header .sh-sub{font-size:12px}}

/* =====================================================================
   О СЕРВЕРЕ — карточки и статистика
   ===================================================================== */
.features-grid{display:grid;gap:16px}
@media(min-width:640px){.features-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.features-grid{grid-template-columns:repeat(3,1fr)}}
.feature{
  padding:20px;display:flex;flex-direction:column;gap:12px;
  transition:transform .15s;
}
.feature:hover{transform:translateY(-4px)}
.feature .f-head{display:flex;align-items:center;gap:12px}
.feature .mc-slot{width:56px;height:56px;flex-shrink:0}
.feature h3{color:#fff;font-weight:400;font-size:12px;line-height:1.2}
@media(min-width:768px){.feature h3{font-size:13px}}
.feature p{font-size:10px;line-height:1.625;color:rgba(255,255,255,.7)}
@media(min-width:768px){.feature p{font-size:11px}}

.stats-label{text-align:center;color:rgba(255,255,255,.5);font-size:10px;margin:40px 0 12px}
.stats-grid{display:grid;gap:12px}
@media(min-width:640px){.stats-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.stats-grid{grid-template-columns:repeat(4,1fr)}}
.stat{padding:16px;display:flex;align-items:center;gap:12px}
.stat .mc-slot{width:48px;height:48px;flex-shrink:0}
.stat .stat-num{color:var(--mc-splash);font-size:13px;font-weight:400;line-height:1}
@media(min-width:768px){.stat .stat-num{font-size:14px}}
.stat .stat-label{color:rgba(255,255,255,.55);font-size:9px;margin-top:4px;line-height:1.2}
@media(min-width:768px){.stat .stat-label{font-size:10px}}


/* =====================================================================
   КАК ЗАЙТИ — шаги + верстак
   ===================================================================== */
.join-grid{display:grid;gap:32px;align-items:start}
@media(min-width:1024px){.join-grid{grid-template-columns:1fr auto}}
.join-steps{display:flex;flex-direction:column;gap:16px;list-style:none;counter-reset:none}
.join-steps li{display:flex;align-items:flex-start;gap:16px}
.step-num{
  width:44px;height:44px;flex-shrink:0;padding:0!important;
  font-size:13px;font-weight:400;
}
.join-steps h3{color:#fff;font-weight:400}
.join-steps p{color:rgba(255,255,255,.7);font-size:11px;line-height:1.625;margin-top:4px}
.join-steps .hl{color:var(--mc-splash);font-weight:400}
.join-steps .step-links{margin-top:8px;display:flex;flex-wrap:wrap;gap:12px}
@media(min-width:768px){.join-steps .step-links{padding-left:60px}}

/* --- верстак --- */
.craft-aside{padding:20px;width:100%;max-width:330px;margin-inline:auto}
@media(min-width:1024px){.craft-aside{width:330px}}
.craft-aside h3{color:#3f3f3f;font-weight:400;text-align:center;font-size:13px;margin-bottom:16px}
.craft-row{display:flex;align-items:center;justify-content:center;gap:16px}
.craft-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.craft-grid .mc-slot{width:56px;height:56px}
@media(min-width:768px){.craft-grid .mc-slot{width:64px;height:64px}}
.craft-grid .mc-slot.empty{visibility:visible}
.craft-arrow{display:flex;flex-direction:column;align-items:center;gap:4px}
.tint-dark{filter:brightness(.28)}
.craft-result{display:flex;flex-direction:column;align-items:center;gap:4px}
.craft-result .mc-slot{width:64px;height:64px;position:relative}
@media(min-width:768px){.craft-result .mc-slot{width:80px;height:80px}}
.craft-result .glow{position:absolute;inset:0;background:rgba(126,252,32,.2);animation:mc-pulse 1.6s ease-in-out infinite}
.craft-result .r-name{color:#3f3f3f;font-size:10px;font-weight:400}
.craft-note{color:#5a5a5a;font-size:9px;text-align:center;margin-top:16px;line-height:1.3}
/* на узких экранах верстак ужимается, чтобы не вылезать за панель */
@media(max-width:639px){
  .craft-row{gap:10px}
  .craft-grid{gap:4px}
  .craft-grid .mc-slot{width:48px;height:48px}
  .craft-result .mc-slot{width:56px;height:56px}
}

/* =====================================================================
   ГАЛЕРЕЯ — рамки для скриншотов
   ===================================================================== */
.gallery-grid{display:grid;gap:20px}
@media(min-width:640px){.gallery-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.gallery-grid{grid-template-columns:repeat(3,1fr)}}
.shot{display:flex;flex-direction:column;gap:6px}
.shot-frame{padding:8px;position:relative;aspect-ratio:16/9;overflow:hidden}
.shot-frame img{
  position:absolute;top:8px;left:8px;right:8px;bottom:8px;
  width:calc(100% - 16px);height:calc(100% - 16px);
  object-fit:cover;image-rendering:pixelated;opacity:0;
  transition:transform .2s, opacity .2s;
}
.shot-frame img.ok{opacity:1}
.shot:hover .shot-frame img.ok{transform:scale(1.03)}
.shot-ph{
  position:absolute;top:8px;left:8px;right:8px;bottom:8px;
  background-image:url("../img/dirt.png");background-size:48px 48px;image-rendering:pixelated;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;
}
.shot-ph .ph-name{color:#fff;font-size:10px}
.shot-ph .ph-hint{color:rgba(255,255,255,.5);font-size:10px;line-height:1.2;padding-inline:12px}
.shot figcaption{
  text-align:center;font-size:9px;color:rgba(255,255,255,.6);
  padding:6px 8px;
}

/* =====================================================================
   ПРАВИЛА — книга
   ===================================================================== */
.book-wrap{position:relative;max-width:672px;margin-inline:auto}
.book-spine{position:absolute;left:0;top:0;bottom:0;width:16px;background:#d9c493;border-right:2px solid #b3945c;z-index:10}
.book-stack1{position:absolute;left:4px;right:4px;bottom:-8px;height:8px;background:#cbb487;border:2px solid #000}
.book-stack2{position:absolute;left:2px;right:2px;bottom:-4px;height:8px;background:#dcc79a;border:2px solid #000}
.book{
  position:relative;background:#ead9ab;border:4px solid #5b4325;
  padding:32px;
  box-shadow:0 0 0 3px #000, 4px 6px 0 rgba(0,0,0,.35);
}
@media(min-width:768px){.book{padding:40px 48px}}
.book h3{text-align:center;color:#5b4325;font-weight:400;font-size:14px}
@media(min-width:768px){.book h3{font-size:16px}}
.book .book-sub{text-align:center;color:#8a6f45;font-size:10px;margin-top:4px;margin-bottom:24px}
.book ol{display:flex;flex-direction:column;gap:14px;list-style:none}
.book ol li{display:flex;align-items:flex-start;gap:12px}
.rule-num{
  flex-shrink:0;width:28px;height:28px;background:#5b4325;color:#ead9ab;
  font-size:11px;font-weight:400;display:flex;align-items:center;justify-content:center;
  border:2px solid #000;
}
.book ol p{color:#4a3a20;font-size:11px;line-height:1.625;padding-top:2px}
@media(min-width:768px){.book ol p{font-size:11px}}
.book .fold1,.book .fold2{position:absolute;bottom:0;right:0;width:0;height:0}
.book .fold1{border-left:30px solid transparent;border-bottom:30px solid #c9b485}
.book .fold2{border-left:30px solid transparent;border-bottom:30px solid rgba(0,0,0,.25);transform:translateY(2px) translateX(2px)}
.rules-footnote{text-align:center;color:rgba(255,255,255,.45);font-size:10px;margin-top:32px}

/* =====================================================================
   FAQ — аккордеон на чистом <details>
   ===================================================================== */
.faq-list{display:flex;flex-direction:column;gap:12px;max-width:768px;margin-inline:auto}
.faq-item{ }
.faq-item summary{
  display:flex;align-items:center;gap:12px;padding:14px;cursor:pointer;
  list-style:none;
}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary:focus-visible{outline:2px solid rgba(255,255,160,.7);outline-offset:-2px}
.faq-item .q-icon{width:36px;height:36px;flex-shrink:0}
.faq-item .q-text{flex:1;color:#fff;font-weight:400;font-size:11px}
@media(min-width:768px){.faq-item .q-text{font-size:12px}}
.faq-plus{color:var(--mc-splash);font-size:16px;line-height:1;transition:transform .15s;flex-shrink:0}
.faq-item[open] .faq-plus{transform:rotate(45deg)}
.faq-answer{padding:0 16px 16px}
@media(min-width:768px){.faq-answer{padding-left:68px;padding-right:24px}}
.faq-answer p{
  color:rgba(255,255,255,.7);font-size:10px;line-height:1.625;
  border-left:4px solid var(--mc-green);padding:4px 0 4px 12px;
}
@media(min-width:768px){.faq-answer p{font-size:11px}}
.faq-footnote{text-align:center;color:rgba(255,255,255,.5);font-size:10px;margin-top:32px}

/* =====================================================================
   ФИНАЛЬНЫЙ ПРИЗЫВ
   ===================================================================== */
.cta-panel{padding:32px;text-align:center;position:relative;overflow:hidden;margin-inline:auto;max-width:768px}
@media(min-width:768px){.cta-panel{padding:40px}}
.cta-torch{position:absolute;top:16px;display:none}
@media(min-width:640px){.cta-torch{display:block}}
.cta-torch.left{left:16px}
.cta-torch.right{right:16px}
.cta-player{display:flex;justify-content:center;margin-bottom:16px}
.cta-player .mc-slot{width:80px;height:80px}
.cta-panel h2{font-size:16px;font-weight:400;color:var(--mc-splash)}
@media(min-width:768px){.cta-panel h2{font-size:20px}}
.cta-panel .cta-text{color:rgba(255,255,255,.7);font-size:11px;margin-top:12px;line-height:1.625;max-width:448px;margin-inline:auto}
@media(min-width:768px){.cta-panel .cta-text{font-size:12px}}
.cta-actions{margin-top:28px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
@media(min-width:640px){.cta-actions{flex-direction:row}}
.cta-addr{color:rgba(255,255,255,.85);font-size:13px}
.cta-addr b{color:var(--mc-splash)}
.cta-addr .port{color:rgba(255,255,255,.4)}
.cta-hint{margin-top:24px;color:rgba(255,255,255,.35);font-size:9px}

/* =====================================================================
   ФУТЕР
   ===================================================================== */
.site-footer{
  margin-top:auto;
  /* булыжник + затемняющий слой, чтобы текст читался */
  background-image:linear-gradient(rgba(8,8,8,.55),rgba(8,8,8,.55)),url("../img/cobble.png");
  background-size:auto,48px 48px;image-rendering:pixelated;
  border-top:4px solid #000;
}
.footer-grid{
  max-width:var(--container);margin-inline:auto;padding:36px 16px 32px;
  display:grid;gap:32px;color:rgba(255,255,255,.9);
  text-shadow:1px 1px 0 rgba(0,0,0,.85);
}
@media(min-width:768px){.footer-grid{grid-template-columns:repeat(3,1fr)}}
.footer-brand{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.footer-brand .brand-name{font-weight:400;color:#fff}
.footer-about{color:rgba(255,255,255,.8);font-size:10px;line-height:1.625}
.footer-love{margin-top:12px;display:flex;align-items:center;gap:8px;color:rgba(255,255,255,.72);font-size:10px}
.footer-col h3{color:var(--mc-splash);font-weight:400;font-size:11px;margin-bottom:12px}
.footer-links{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.footer-links .mc-btn{padding:8px 16px;font-size:11px}
.footer-links-hint{color:rgba(255,255,255,.65);font-size:10px;line-height:1.3}
.footer-conn{color:rgba(255,255,255,.85);font-size:10px;line-height:1.625;display:flex;flex-direction:column;gap:6px}
.footer-conn b{color:#fff;font-weight:400}
.footer-bottom{
  border-top:2px solid rgba(0,0,0,.7);background:rgba(0,0,0,.55);
  padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;
  font-size:10px;color:rgba(255,255,255,.75);
}
.footer-bottom .copyright{transition:transform .1s, color .1s}
.footer-bottom .copyright:hover{color:var(--mc-splash)}
.footer-bottom .copyright.wobble{transform:translateY(-2px)}
.footer-bottom .ver{flex-shrink:0}
.footer-bottom .dom{flex-shrink:0}

.mc-tooltip .tw{color:#fff;display:block}
.mc-tooltip .ts{display:block;color:rgba(255,255,255,.5);font-size:9px;line-height:1.2}

/* =====================================================================
   ХОТБАР — навигация снизу
   ===================================================================== */
.hotbar{
  position:fixed;bottom:0;left:0;right:0;z-index:40;
  display:flex;flex-direction:column;align-items:center;pointer-events:none;
}
.hotbar-inner{pointer-events:auto;display:flex;flex-direction:column;align-items:center;padding:0 8px 6px;width:-moz-fit-content;width:fit-content;max-width:100%}
.hb-vitals{display:none;align-items:flex-end;justify-content:space-between;width:492px;max-width:100%;margin-bottom:4px;padding-inline:4px}
@media(min-width:768px){.hb-vitals{display:flex}}
.hb-vitals .hearts,.hb-vitals .food{display:flex;gap:2px}
.flip{transform:scaleX(-1)}
.hb-xp{position:relative;width:492px;max-width:100%;margin-bottom:5px}
.hb-xp-track{
  height:9px;background:rgba(0,0,0,.85);border:2px solid #000;padding:1px;
  display:flex;
}
.hb-xp-fill{height:100%;width:0;background:var(--mc-xp);transition:width .15s linear}
.hb-level{
  position:absolute;top:-24px;left:50%;transform:translateX(-50%);
  color:var(--mc-xp);font-weight:400;font-size:12px;line-height:1;display:none;
}
.hb-level.show{display:block}
.hb-bar{
  display:flex;gap:3px;padding:3px;background:rgba(0,0,0,.65);border:2px solid #000;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.12);
  max-width:100vw;
}
.hb-slot{position:relative;flex-shrink:0}
.hb-slot .tip{
  position:absolute;bottom:calc(100% + 10px);left:50%;transform:translateX(-50%);
  opacity:0;transition:opacity .1s;display:none;
}
@media(min-width:768px){.hb-slot .tip{display:block}}
.hb-slot:hover .tip,.hb-slot:focus-within .tip{opacity:1}
.hb-slot button{
  position:relative;width:44px;height:44px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.35);border:2px solid #5a5a5a;
  transition:outline .075s, transform .075s, background-color .075s;
  outline:0 solid #fff;
}
@media(min-width:768px){.hb-slot button{width:48px;height:48px}}
.hb-slot button:hover{background:rgba(0,0,0,.15)}
.hb-slot button.selected{
  outline:3px solid #fff;outline-offset:-2px;
  transform:translateY(-2px);z-index:10;
}
.hb-slot button:focus-visible{outline:2px solid #fff;outline-offset:-2px}
.hb-num{position:absolute;bottom:0;right:2px;font-size:8px;color:rgba(255,255,255,.6);line-height:1}
.hb-space{height:144px}
@media(min-width:768px){.hb-space{height:128px}}

/* =====================================================================
   ДОСТИЖЕНИЯ (тосты)
   ===================================================================== */
#toasts{
  position:fixed;top:64px;right:12px;z-index:80;
  display:flex;flex-direction:column;gap:8px;pointer-events:none;
}
.toast{
  display:flex;align-items:center;gap:12px;width:300px;max-width:calc(100vw - 24px);
  padding:8px;background:#212121;border:2px solid #000;
  box-shadow:inset 2px 2px 0 rgba(255,255,255,.28), inset -2px -2px 0 rgba(0,0,0,.45);
}
.toast .mc-slot{width:44px;height:44px;flex-shrink:0}
.toast .t-title{color:var(--mc-splash);font-size:11px;line-height:1.2}
.toast .t-desc{color:#fff;font-size:10px;line-height:1.3;overflow-wrap:break-word}

/* ---------- уважаем «меньше движения» ---------- */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
  html{scroll-behavior:auto}
}
