:root {
  --bg: #16181a; --panel: #1f2225; --panel2: #262a2e; --line: #33383d;
  --text: #e8e5de; --muted: #a2a29a; --accent: #8cc63f; --accent2: #5e9a2a; --gold: #e9c349; --link: #a8d86a;
  --s: 32px;
  /* єдині правила вікі: кожен блок (плитка, ігрове вікно, картка моба, таблиця) — той самий фон, рамка й радіус */
  --tile: var(--panel); --tile2: var(--panel2); --tile-line: var(--line); --r: 8px;
  color-scheme: dark;
}
@font-face { font-family: "Prysmak MC"; src: url(mc.woff?v=400ee1b8) format("woff"); font-display: swap; }
* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--panel2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 14px; background: var(--panel2); color: var(--text); border: 2px solid var(--gold); border-radius: 8px; }
.skip:focus { top: 10px; }
main:focus { outline: none; }

/* ---------- іконки зі спрайта текстурпаку ---------- */
.ic { display: inline-block; flex: none; width: var(--s); height: var(--s); vertical-align: middle;
  background: url(icons.png?v=400ee1b8) calc(var(--c, 0) * -1 * var(--s)) calc(var(--r, 0) * -1 * var(--s)) / calc(32 * var(--s)) auto no-repeat;
  image-rendering: pixelated; }
.ic.big { --s: 48px; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 20px;
  background: #101213ee; backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 36px; height: 36px; image-rendering: pixelated; flex: none; }
.burger { display: none; background: none; border: 1px solid var(--line); color: var(--text); font-size: 20px; border-radius: 6px; width: 40px; height: 40px; cursor: pointer; }
.search { position: relative; margin-left: auto; width: min(380px, 100%); }
.search input { width: 100%; height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 15px; }
.search input:focus { outline: 2px solid var(--accent2); }
.results { position: absolute; top: 46px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; max-height: 60vh; overflow: auto; display: none; box-shadow: 0 12px 30px #0008; }
.results.on { display: block; }
.results a { display: block; padding: 8px 14px; color: var(--text); border-bottom: 1px solid var(--line); }
.results a small { display: block; color: var(--muted); }
.results a:hover, .results a.sel { background: var(--panel2); text-decoration: none; }
.results .count { padding: 6px 14px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.results small.snip { font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.results mark { background: #4a5a1f; color: #fff; border-radius: 2px; padding: 0 1px; }
.results .more { display: block; width: 100%; padding: 9px 14px; background: none; border: 0; color: var(--link); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.results .more:hover { background: var(--panel2); }

/* ---------- розмітка ---------- */
.wrap { display: grid; grid-template-columns: 270px minmax(0, 1fr) 230px; max-width: 1440px; margin: 0 auto; }
.homep .wrap, .notoc .wrap { grid-template-columns: 270px minmax(0, 1fr); }
.notoc article { max-width: 1000px; }   /* без колонки змісту текст займає її місце */
.side { position: sticky; top: 60px; height: calc(100vh - 60px); overflow: auto; padding: 16px 10px 40px; border-right: 1px solid var(--line); --s: 24px; }
/* меню на сітці: значок | номер | назва — номери й назви стоять рівними стовпчиками, перенесений рядок — під першою літерою */
.side a { display: grid; grid-template-columns: 24px 22px minmax(0, 1fr); column-gap: 8px; align-items: center;
  padding: 5px 10px; border-radius: 6px; color: var(--text);
  font: 16px/1.25 "Prysmak MC", system-ui, sans-serif; -webkit-font-smoothing: none; text-shadow: 2px 2px 0 #000a; }
/* підрозділ: менший значок у стовпчику номера, назва — на тій самій лінії, що й назви розділів */
.side a.sub { grid-template-columns: 20px minmax(0, 1fr); padding: 5px 10px 5px 44px; color: var(--muted); font-size: 14px; --s: 20px; }
.side a.sec { margin-top: 2px; }
.side a .n { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.side a.sub .n { display: none; }
.side a.home { display: block; }
.side a:hover { background: var(--panel2); text-decoration: none; }
.side a.act { background: #2d3a22; color: #fff; }
.side a.home { font-weight: 700; margin-bottom: 6px; }
main { padding: 28px 40px 80px; min-width: 0; }
.toc { position: sticky; top: 60px; height: calc(100vh - 60px); overflow: auto; padding: 28px 16px; font-size: 13.5px; border-left: 1px solid var(--line); }
.toc b { display: block; color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: .06em; margin-bottom: 8px; }
.toc a { display: block; padding: 4px 0 4px 10px; color: var(--muted); border-left: 2px solid transparent; line-height: 1.35; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.on { color: var(--accent); border-left-color: var(--accent); }

/* ---------- сторінка ---------- */
.phead { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.phead h1 { margin: 0; font-size: 32px; line-height: 1.15; }
.num { color: var(--accent); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
article { max-width: 820px; }
article h2 { position: relative; margin: 34px 0 8px; font-size: 21px; line-height: 1.3; color: #fff; }
article h2 .hash { position: absolute; left: -22px; color: var(--line); opacity: 0; }
article h2:hover .hash { opacity: 1; color: var(--accent); text-decoration: none; }
article h3 { margin: 24px 0 6px; font-size: 17px; color: var(--gold); }
article p { margin: 8px 0; }
article strong { color: #fff; }
article ul, article ol { padding-left: 24px; margin: 8px 0; }
article li { margin: 4px 0; }
article li > p { margin: 4px 0; }
/* пункт списку з «заголовком» (**Назва.** текст) — назва зеленим акцентом */
article li > strong:first-child { color: var(--accent); }
/* пункт із власними вікнами — окремий блок із лінією зліва, щоб пункти не зливались */
article > ul > li:has(> .vis, > .dishes) { list-style: none; margin: 18px 0 18px -24px; padding: 2px 0 2px 16px; border-left: 3px solid var(--accent2); }
article > ul > li:has(> .vis) > .vis { margin-bottom: 6px; }
.xref { border-bottom: 1px dashed var(--accent2); }
.xref:hover { text-decoration: none; border-bottom-style: solid; }
.tbl { overflow-x: auto; margin: 12px 0; background: var(--tile); border: 1px solid var(--tile-line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--panel2); color: #fff; font-weight: 600; }
tbody tr:nth-child(even) { background: #1b1e20; }
tbody tr:last-child td { border-bottom: 0; }
.callout { margin: 16px 0; padding: 12px 16px; border-radius: 8px; background: #22301a; border-left: 4px solid var(--accent); }
.callout.info, .callout.note { background: #1d2733; border-left-color: #5a9bd8; }
.callout b { display: block; margin-bottom: 4px; color: #fff; }
.callout p { margin: 0; }
.shot { margin: 12px 0; }
.shot img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
.pn { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); }
.pn a { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.pn a:hover { border-color: var(--accent2); text-decoration: none; }

/* ---------- ігрові вікна ---------- */
/* темний ігровий інтерфейс: вікна не «ріжуть очі» на темному сайті */
.vis { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin: 16px 0 24px; }
li .vis { margin: 10px 0 14px; }
.mc { margin: 0; padding: 12px 14px 14px; background: var(--tile); color: #e4e2dc; border-radius: var(--r); width: fit-content;
  border: 1px solid var(--tile-line); max-width: 100%;
  font-family: "Prysmak MC", system-ui, sans-serif; -webkit-font-smoothing: none; }
.mc figcaption { font-size: 16px; margin: 0 2px 10px; line-height: 1.25; color: #f2efe6; text-shadow: 2px 2px 0 #000a; }
.mc .row { display: flex; align-items: center; gap: 10px; }
.mc .note { display: block; font-size: 16px; color: #bdbab0; margin-top: 8px; }
.slot { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none;
  background: #17181b; box-shadow: inset 2px 2px #0b0b0d, inset -1px -1px #3a3d42; cursor: default; }
.slot:has(.ic):hover, .slot:focus { background: #33363c; }
.slot:focus:not(:focus-visible) { outline: none; }
.slot.big { width: 52px; height: 52px; }
.slot.ghost { background: transparent; box-shadow: none; }
.slot b { position: absolute; right: 1px; bottom: 1px; color: #fff; font: 16px/1 "Prysmak MC", sans-serif; text-shadow: 2px 2px 0 #3f3f3f; pointer-events: none; }
.grid3 { display: grid; grid-template-columns: repeat(3, 40px); }
.arrow { position: relative; width: 44px; height: 30px; background: url(img/arrow.png) center / 44px 30px no-repeat; image-rendering: pixelated; }
.arrow .time { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 16px; white-space: nowrap; color: #c9c6bd; }
.cook { display: grid; grid-template-columns: 40px; justify-items: center; gap: 2px; }
.flame { width: 28px; height: 28px; background: url(img/flame.png) center / contain no-repeat; image-rendering: pixelated; }
.flame.f-blasting { background-image: url(img/flame_blast.png); }
.flame.f-smoking { background-image: url(img/flame_smoker.png); }
.smith { display: flex; }
/* торги: усі видно одразу, колонками за рівнями жителя (без прокрутки) */
.trades { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start; }
.tcol { display: flex; flex-direction: column; gap: 3px; }
.trade { display: flex; align-items: center; gap: 2px; padding: 3px 6px 3px 3px; background: var(--tile2); border-radius: 4px; }
.tarrow { width: 20px; height: 18px; margin: 0 8px; background: url(img/trade_arrow.png) center / contain no-repeat; image-rendering: pixelated; }
.lvl { font-size: 16px; color: #c9c6bd; margin: 0 0 2px 2px; }
.chest { display: grid; grid-template-columns: repeat(9, 40px); }
.inv { display: flex; flex-wrap: wrap; max-width: calc(9 * 40px); }

#tip { position: fixed; z-index: 50; pointer-events: none; display: none; max-width: 340px; padding: 6px 10px 8px;
  font: 16px/1.25 "Prysmak MC", system-ui, sans-serif; -webkit-font-smoothing: none; text-shadow: 2px 2px 0 #3e3e3e;
  background: #100010f2; color: #fff; border: 2px solid #2d0a63; border-radius: 4px; box-shadow: 0 6px 18px #000a; }
#tip span { display: block; color: #aaa; margin-top: 2px; }
#tip span.good { color: #5555ff; text-shadow: 2px 2px 0 #15153f; }
#tip span.bad { color: #ff5555; text-shadow: 2px 2px 0 #3f1515; }
#tip span.ench { color: #aaa; }
#tip span.info { color: #ffaa00; text-shadow: 2px 2px 0 #3f2a00; }
#tip span.adesc { color: #55ff55; text-shadow: 2px 2px 0 #153f15; }
#tip span.achal { color: #ff55ff; text-shadow: 2px 2px 0 #3f153f; }

/* броня, риби, діжка */
.armor, .fish { display: flex; flex-direction: column; gap: 4px; }
.arow { display: flex; align-items: center; }
.alabel { width: 150px; font-size: 16px; color: #e4e2dc; }
.frow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 3px 0; border-top: 1px solid #3a3d42; }
.frow:first-child { border-top: 0; }
.fhead { display: flex; align-items: center; gap: 8px; width: 260px; font-size: 16px; }
.fcells { display: flex; flex-wrap: wrap; }
.barrel .bar3d { display: flex; justify-content: center; padding: 8px 0 14px; }
.barrel .bar3d img { max-width: 100%; image-rendering: pixelated; }
.layers { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.lay { margin: 0; text-align: center; }
.lay img { display: block; max-width: 140px; image-rendering: pixelated; margin: 0 auto 4px; }
.lay figcaption { font-size: 16px; color: #c9c6bd; margin: 0; }
/* іконки в таблицях їжі */
td .tslots { display: inline-flex; vertical-align: middle; margin-right: 8px; }
td .slot { width: 36px; height: 36px; --s: 28px; }
td.ticon { white-space: nowrap; }

/* досягнення: вікно як у грі */
.advwin { margin: 14px 0 22px; max-width: 100%; font-family: "Prysmak MC", system-ui, sans-serif; -webkit-font-smoothing: none; }
.advtabs { display: flex; gap: 4px; padding-left: 10px; }
.advtab { width: 56px; height: 52px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--tile); border: 1px solid var(--tile-line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; margin-bottom: -1px; opacity: .7; }
.advtab.on { background: var(--tile2); opacity: 1; }
.advbox { background: var(--tile2); border: 1px solid var(--tile-line); border-radius: var(--r); padding: 8px 10px 10px; }
.advtitle { font-size: 16px; color: #f2efe6; margin: 0 2px 8px; text-shadow: 2px 2px 0 #000a; }
.advpane { display: none; overflow: auto; max-height: 72vh; border-radius: 4px; background-size: 32px 32px; image-rendering: pixelated;
  box-shadow: inset 0 0 0 2px #0008; }
.advpane.on { display: block; }
.advcanvas { position: relative; }
.advcanvas svg { position: absolute; left: 0; top: 0; }
.adv { position: absolute; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  background: url(img/adv_task.png) center / 52px 52px no-repeat; image-rendering: pixelated; cursor: default; --s: 32px; }
.adv.f-goal { background-image: url(img/adv_goal.png); }
.adv.f-challenge { background-image: url(img/adv_challenge.png); }
.adv:hover, .adv:focus { filter: brightness(1.25); }
.adv:focus:not(:focus-visible) { outline: none; }
.advwin .note { display: block; font-size: 16px; color: #bdbab0; margin-top: 8px; }

/* картка моба, як на вікі */
.mob { float: right; clear: right; width: 270px; margin: 4px 0 16px 22px; background: var(--tile); border: 1px solid var(--tile-line); border-radius: var(--r); overflow: hidden; }
.mob .mh { margin: 0; padding: 8px 10px; text-align: center; background: var(--tile2); border-bottom: 1px solid var(--tile-line); color: #f2efe6; font: 16px/1.3 "Prysmak MC", sans-serif; text-shadow: 2px 2px 0 #0008; }
.mob .pic { display: flex; justify-content: center; align-items: center; min-height: 150px; padding: 12px; background: radial-gradient(circle at 50% 60%, #2c3136, #1b1e20); }
.mob .pic img { max-width: 100%; max-height: 230px; image-rendering: pixelated; }
.mob dl { margin: 0; padding: 4px 12px 10px; font-size: 14.5px; }
.mob dt { color: var(--muted); margin-top: 8px; font-size: 13px; }
.mob dd { margin: 2px 0 0; }
.mob .drops { display: flex; flex-wrap: wrap; margin-top: 4px; }
.mob .hearts { color: #ff5d5d; }
.mobrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.mobrow .mob { float: none; width: 200px; margin: 0; }
.mobrow .mob .pic { min-height: 0; height: 170px; }
.mobrow .mob .pic img { max-height: 146px; }
article h2, .pn { clear: both; }
.mob.struct { width: 320px; }
.mob.struct .pic { background: radial-gradient(circle at 50% 55%, #3a4048, #1b1e20); }
.mob.struct .pic img { max-height: 280px; image-rendering: auto; }
.mob .credit { display: block; padding: 4px 12px 0; font-size: 11px; color: var(--muted); }

/* ---------- головна ---------- */
/* шапка головної: розмитий банер фоном на всю ширину, сам банер по центру */
.hero { position: relative; z-index: 2; margin-top: 4px; padding: 30px 24px 26px; text-align: center; border-radius: 14px;
  border: 1px solid #3d4a2c; background: #1a2016; box-shadow: 0 10px 34px #0008; }
/* фон не виходить за блок без overflow:hidden — інакше обрізався б список результатів пошуку */
.hero::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: url(img/banner.png) center / cover no-repeat;
  filter: blur(18px) brightness(.42) saturate(1.3); clip-path: inset(0 round 14px); }
.hero::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, transparent 40%, #16181acc); }
.hero > * { position: relative; z-index: 1; }
.hero .banner { display: block; width: 100%; max-width: 400px; height: auto; margin: 0 auto 18px; border-radius: 10px;
  border: 2px solid #8cc63f66; box-shadow: 0 12px 30px #000c, 0 0 0 6px #0003; image-rendering: pixelated; }
.hero h1 { margin: 0 0 14px; font-size: 34px; text-shadow: 0 2px 10px #000; }
.hero p { margin: 0; color: #cfd2c4; }
/* велике поле пошуку на головній — головний спосіб знайти відповідь */
.search.big { width: min(620px, 100%); margin: 0 auto; text-align: left; }
.search.big input { height: 52px; font-size: 17px; padding: 0 18px; border-radius: 10px; background: #14171acc; border-color: #4a5a32; }
.search.big .results { top: 58px; z-index: 5; max-height: 55vh; }
.hero .first { display: inline-block; margin-top: 16px; padding: 10px 18px; border-radius: 8px; background: var(--accent2); color: #fff; font-weight: 600; }
.hero .first:hover { background: #6fae35; text-decoration: none; }
.quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; --s: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border-radius: 999px; font-size: 14px;
  background: #14171acc; border: 1px solid var(--tile-line); color: var(--text); }
.chip:hover { border-color: var(--accent2); text-decoration: none; }
.allh { margin: 30px 0 0; font-size: 20px; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); border-bottom: 1px dashed var(--line); }
.crumbs a:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 560px) { .hero { padding: 16px 12px 18px; } .hero h1 { font-size: 26px; } }

/* страви: сітка карток (назва, лікування, ефект, рецепт) замість широкої таблиці */
.dishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 14px 0 24px; }
.dish { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; background: var(--tile); border: 1px solid var(--tile-line); border-radius: var(--r); }
.dish:hover, .card:hover { border-color: var(--accent2); }
.dhead { display: flex; align-items: center; gap: 10px; line-height: 1.25; }
/* заголовок будь-якого блоку (плитка, ігрове вікно, картка моба) — ігровий шрифт, один колір */
.dhead b { color: #f2efe6; font: 16px/1.25 "Prysmak MC", system-ui, sans-serif; font-weight: normal; -webkit-font-smoothing: none; text-shadow: 2px 2px 0 #000a; }
.dhead b strong { color: inherit; font-weight: normal; }
.dhead .slot { width: 36px; height: 36px; --s: 28px; }
.dmeta { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 13.5px; }
.dmeta span { padding: 1px 8px; border-radius: 10px; background: var(--panel2); }
.dmeta .heal { color: #ff8a8a; }
.dmeta .eff { color: #9db8ff; }
.dmeta i { font-style: normal; color: var(--muted); }
.dfield { font-size: 15px; line-height: 1.5; color: var(--text); padding-left: 10px; border-left: 2px solid var(--accent2); }
/* склад/рецепт словами — другорядний, коли поруч намальоване вікно; головне — що предмет дає */
.dfield.sec { font-size: 13.5px; color: var(--muted); border-left-color: var(--tile-line); }
.dfield.sec > span { color: var(--muted); }
.dfield > span { display: block; margin-bottom: 1px; font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.dfield strong { color: #fff; }
.dish .mrec { margin-top: auto; flex-wrap: wrap; row-gap: 6px; }
.mcook { display: inline-flex; align-items: center; gap: 4px; flex: none; white-space: nowrap; }
.mrec .arrow { flex: none; }
.dhint { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.mrec { display: flex; align-items: center; gap: 4px; margin: 2px 0; font-family: "Prysmak MC", system-ui, sans-serif; -webkit-font-smoothing: none; }
.mrec + .mrec { margin-top: 8px; }
.mrec .grid3 { grid-template-columns: repeat(3, 30px); }
.mrec .slot, td .mrec .slot { width: 30px; height: 30px; --s: 24px; }
.mrec .arrow { width: 28px; height: 20px; background-size: 28px 20px; }
.mrec .flame { width: 20px; height: 20px; }
.mrec .time { font-size: 14px; color: #9a9890; margin-left: 4px; white-space: nowrap; }
.mrec .note { font-size: 12px; line-height: 1.1; color: #9a9890; white-space: nowrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; margin-top: 18px; }
.card { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--tile-line); border-radius: var(--r); background: var(--tile); color: var(--text); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent2); transform: translateY(-2px); text-decoration: none; }
.card h2 { margin: 0 0 4px; font-size: 18px; line-height: 1.25; }
.card ul { margin: 0; padding-left: 16px; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.card.subc { background: #1b1e20; }

/* ---------- вузькі екрани ---------- */
@media (max-width: 1180px) { .wrap, .notoc .wrap { grid-template-columns: 250px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 860px) {
  .wrap, .homep .wrap, .notoc .wrap { grid-template-columns: minmax(0, 1fr); }
  .burger { display: block; }
  .side { position: fixed; z-index: 30; top: 60px; left: 0; width: 290px; background: var(--bg); transform: translateX(-100%); transition: transform .2s; }
  body.menu .side { transform: none; box-shadow: 8px 0 30px #000a; }
  main { padding: 20px 16px 60px; }
  .top { padding: 0 12px; gap: 10px; }
  .brand { font-size: 15px; gap: 8px; }
  .phead h1 { font-size: 26px; }
  .mob, .mob.struct { float: none; width: 100%; max-width: 360px; margin: 12px auto; }
  article h2 .hash { display: none; }
}
@media (max-width: 560px) {
  /* назва ховається лише візуально: посилання зберігає доступне ім'я (aria-label) */
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 440px) {
  .slot { width: 34px; height: 34px; } .slot.big { width: 44px; height: 44px; }
  .mc { --s: 28px; }
  .grid3 { grid-template-columns: repeat(3, 34px); }
  .chest { grid-template-columns: repeat(9, 34px); }
  .inv { max-width: calc(9 * 34px); }
  .mc { padding: 8px; }
  .fhead { width: 100%; }
}
@media (max-width: 360px) {
  /* найвужчі телефони: скриня на 9 слотів має влізти без прокрутки сторінки */
  .slot { width: 30px; height: 30px; } .mc { --s: 24px; }
  .grid3 { grid-template-columns: repeat(3, 30px); }
  .chest { grid-template-columns: repeat(9, 30px); }
  .inv { max-width: calc(9 * 30px); }
  td .slot { width: 30px; height: 30px; --s: 24px; }
  /* скриня тягнеться на всю ширину й ділить її на 9 рівних слотів */
  .lootp { width: 100%; }
  .chest { grid-template-columns: repeat(9, minmax(0, 1fr)); }
  .chest .slot { width: auto; height: auto; aspect-ratio: 1; --s: 22px; }
  .alabel { width: 92px; font-size: 14px; line-height: 1.15; }
}
