/* Shared design of the Kaleidoscope wiki (copy of KaleidoscopeWiki/src/style.css). Own additions: emrion.css */
@font-face {
  font-family: "Monocraft";
  src: url("font/Monocraft.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #121214;
  --bg-2: #18181c;
  --panel: #1f1f24;
  --panel-hi: #2b2b32;
  --panel-lo: #0c0c0e;
  --slot: #141418;
  --text: #e8e6e3;
  --muted: #9a98a3;
  --accent: #6fcf4a;       /* grass green */
  --accent-2: #f2b33d;     /* gold */
  --link: #8ad4ff;
  --tt-bg: #100010f0;
  --tt-border-1: #5000ff;
  --tt-border-2: #28007f;
  --pixel: "Monocraft", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --text-font: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 50% -200px, #24402033, transparent 70%),
    repeating-linear-gradient(0deg, #ffffff03 0 2px, transparent 2px 4px),
    var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--text-font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--pixel); font-size: 0.85em; background: var(--panel-lo); padding: 1px 6px; border: 1px solid #000; }

h1, h2, h3, .brand, .nav-link, .btn, .badge, .count, .stat b, .card-title, .slot-count, .tt-name {
  font-family: var(--pixel);
  font-weight: normal;
  letter-spacing: 0.02em;
}
h1 { font-size: 2rem; margin: 0 0 0.5rem; text-shadow: 3px 3px 0 #000; }
h2 { font-size: 1.25rem; margin: 2.2rem 0 1rem; color: var(--accent); text-shadow: 2px 2px 0 #000; display: flex; align-items: center; gap: 0.6rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.4rem; color: var(--accent-2); text-shadow: 2px 2px 0 #000; }
.lead { color: var(--muted); max-width: 70ch; margin-top: 0; }
.muted { color: var(--muted); }

img { image-rendering: pixelated; }

/* ---- Bevelled Minecraft panels ---- */
.panel {
  background: var(--panel);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 var(--panel-hi), inset -2px -2px 0 var(--panel-lo);
}

/* ---- Top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.6rem 1.5rem;
  background: #0d0d10ee;
  backdrop-filter: blur(6px);
  border-bottom: 3px solid #000;
  box-shadow: 0 2px 0 #2a2a30;
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); font-size: 1.1rem; }
.brand b { color: var(--accent); margin-left: 0.35rem; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.nav-link { color: var(--muted); padding: 0.35rem 0.75rem; border: 2px solid transparent; font-size: 0.85rem; }
.nav-link:hover { color: var(--text); text-decoration: none; background: var(--panel); border-color: #000; }
.nav-link.active { color: var(--text); background: var(--panel); border-color: #000; box-shadow: inset 0 -3px 0 var(--accent); }
.search { margin-left: auto; position: relative; }
.search input, .filter {
  font: 0.9rem var(--pixel);
  color: var(--text);
  background: #000;
  border: 2px solid #a0a0a0;
  outline: none;
  padding: 0.45rem 0.7rem;
  width: 260px;
}
.search input:focus, .filter:focus { border-color: #fff; }
#search-results { position: absolute; right: 0; top: calc(100% + 6px); width: 360px; max-height: 70vh; overflow: auto; display: none; padding: 4px; }
#search-results.open { display: block; }
#search-results a { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.5rem; color: var(--text); }
#search-results a:hover, #search-results a.sel { background: var(--panel-hi); text-decoration: none; }
#search-results small { margin-left: auto; color: var(--muted); font-family: var(--pixel); font-size: 0.7rem; }

/* ---- Layout ---- */
.content { width: min(1200px, 100% - 2rem); margin: 2rem auto 4rem; flex: 1; }
.footer { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 1.5rem; border-top: 3px solid #000; background: #0d0d10; }
.crumbs { font-family: var(--pixel); font-size: 0.8rem; color: var(--muted); margin-bottom: 1rem; }

/* ---- Home ---- */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; padding: 2.5rem 0 1.5rem; }
.hero h1 { font-size: 2.6rem; line-height: 1.15; }
.hero h1 span { display: block; color: var(--accent); }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 55ch; }
.hero-art { display: flex; justify-content: center; gap: 1rem; filter: drop-shadow(6px 6px 0 #000); }
.hero-art .icon-xl:nth-child(2) { transform: translateY(-24px); }
.actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.2rem; }
.btn {
  display: inline-block; padding: 0.6rem 1.2rem; color: #fff; font-size: 0.95rem;
  background: #4c8a2f; border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #7ccc55, inset -2px -2px 0 #2f5a1b;
  text-shadow: 2px 2px 0 #1d3a10;
}
.btn:hover { text-decoration: none; filter: brightness(1.12); }
.btn.alt { background: #5a5a62; box-shadow: inset 2px 2px 0 #8a8a94, inset -2px -2px 0 #36363c; text-shadow: 2px 2px 0 #222; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { padding: 1rem; text-align: center; }
.stat b { display: block; font-size: 1.8rem; color: var(--accent-2); text-shadow: 2px 2px 0 #000; }
.stat span { color: var(--muted); font-size: 0.9rem; }

/* ---- Cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.card { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 1.2rem 1rem; color: var(--text); text-align: center; transition: transform 0.08s; }
.card:hover { transform: translateY(-3px); text-decoration: none; box-shadow: inset 2px 2px 0 #3a3a44, inset -2px -2px 0 var(--panel-lo), 0 0 0 2px var(--accent); }
.card-title { font-size: 0.95rem; }
.badge { display: inline-block; font-size: 0.7rem; padding: 2px 8px; background: #000; color: var(--accent-2); border: 1px solid #444; }
.count { font-size: 0.75rem; background: #000; color: var(--muted); padding: 1px 8px; border: 1px solid #333; }

/* ---- Icons and slots ---- */
.icon, .icon-sm, .icon-lg, .icon-xl, .brand-icon { display: inline-block; vertical-align: middle; }
.icon.missing { background: repeating-conic-gradient(#f0f 0 25%, #000 0 50%) 0 0 / 8px 8px; opacity: 0.6; }
.slot {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: var(--slot);
  border: 2px solid; border-color: #08080a #3a3a42 #3a3a42 #08080a;
}
.slot.big { width: 52px; height: 52px; border-color: #08080a #4a4a52 #4a4a52 #08080a; background: #101014; }
.slot.empty { opacity: 0.6; }
a.slot:hover { background: #2a2a34; text-decoration: none; }
.slot-count { position: absolute; right: 2px; bottom: -2px; color: #fff; font-size: 0.85rem; text-shadow: 2px 2px 0 #3f3f3f; }
.slot-tag { position: absolute; left: 3px; top: -1px; font: 0.7rem var(--pixel); color: var(--accent-2); text-shadow: 1px 1px 0 #000; }

/* ---- Recipes ---- */
.recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 0.9rem; }
.recipe { padding: 0.8rem 0.9rem; display: flex; flex-direction: column; gap: 0.5rem; }
.recipe-body { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.inputs { display: flex; flex-wrap: wrap; gap: 2px; max-width: 230px; }
.grid3 { display: grid; gap: 0; }
.grid-row { display: flex; }
.arrow span { display: block; width: 28px; height: 18px; background:
  linear-gradient(#bbb, #bbb) 0 6px / 18px 6px no-repeat,
  conic-gradient(from -135deg at 100% 50%, #bbb 90deg, transparent 0) 100% 0 / 12px 18px no-repeat;
  filter: drop-shadow(2px 2px 0 #000); }
.via { display: flex; flex-direction: column; align-items: center; font-size: 0.7rem; color: var(--muted); font-family: var(--pixel); }
.outputs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.chance { font-family: var(--pixel); color: var(--accent-2); font-size: 0.75rem; }
.card-station { align-self: flex-start; font-family: var(--pixel); font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.notes { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.85rem; }
.filter { margin-bottom: 1rem; width: min(420px, 100%); }
.filter.big { width: 100%; font-size: 1rem; padding: 0.7rem 0.9rem; }

/* ---- Item list ---- */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.item-tile { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem; background: var(--panel); border: 2px solid #000; color: var(--text); font-size: 0.9rem; }
.item-tile:hover { background: var(--panel-hi); text-decoration: none; box-shadow: 0 0 0 2px var(--accent); }
.item-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Item page ---- */
.item-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; padding: 1.5rem; align-items: start; }
.item-hero-icon { padding: 10px; background: var(--slot); border: 2px solid; border-color: #08080a #3a3a42 #3a3a42 #08080a; filter: drop-shadow(4px 4px 0 #000); }
.stats { border-collapse: collapse; font-size: 0.9rem; min-width: 260px; }
.stats th { text-align: left; color: var(--muted); font-weight: normal; padding: 4px 14px 4px 0; vertical-align: top; }
.stats td { padding: 4px 0; }
.station-hero { display: flex; gap: 1.5rem; padding: 1.5rem; align-items: center; }
.station-hero p { margin: 0.4rem 0 0; color: var(--muted); max-width: 75ch; }

/* ---- Minecraft tooltip ---- */
.mc-tooltip {
  position: fixed; z-index: 100; pointer-events: none; display: none;
  max-width: 340px; padding: 6px 9px; background: var(--tt-bg);
  border: 2px solid var(--tt-bg);
  box-shadow: inset 0 0 0 2px var(--tt-border-1), inset 0 -2px 0 2px var(--tt-border-2);
  font: 0.85rem/1.45 var(--pixel); color: #fff; text-shadow: 2px 2px 0 #3e3e3e;
}
.mc-tooltip.static { position: static; display: inline-block; margin-top: 0.6rem; max-width: 60ch; }
.tt-name { color: #fff; }
.tt-lore { color: #aaa; }
.tt-maxim { color: #555; font-style: italic; text-shadow: none; }

/* ---- Effects ---- */
.effects { list-style: none; padding: 0.6rem 1rem; margin: 0; max-width: 560px; }
.effects li { display: flex; justify-content: space-between; gap: 1rem; padding: 4px 0; border-bottom: 1px dashed #333; }
.effects li:last-child { border: 0; }
.effect-name a { color: #c7a6ff; }
.effect-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.effect-card { padding: 1rem 1.1rem; scroll-margin-top: 90px; }
.effect-card:target { box-shadow: inset 2px 2px 0 var(--panel-hi), inset -2px -2px 0 var(--panel-lo), 0 0 0 2px var(--accent-2); }
.effect-card p { color: var(--muted); margin: 0 0 0.6rem; }
.minis { display: flex; flex-wrap: wrap; gap: 4px; }
.mini { display: inline-flex; padding: 3px; background: var(--slot); border: 1px solid #000; }

/* ---- Guides and tables ---- */
.guide { padding: 1rem 1.4rem; margin-bottom: 1rem; }
.guide h2 { margin-top: 0.3rem; }
.guide li { margin: 0.35rem 0; }
.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem; margin: 0.6rem 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 1.8rem; height: 1.8rem; display: grid; place-items: center;
  font-family: var(--pixel); font-size: 0.85rem; color: #fff; background: #4c8a2f; border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #7ccc55, inset -2px -2px 0 #2f5a1b;
}
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.6rem 0.9rem; border-bottom: 1px solid #2c2c33; }
.table th { font-family: var(--pixel); font-weight: normal; color: var(--accent); }

.hidden { display: none !important; }

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 0.6rem; padding: 0.6rem 1rem; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  #search-results { width: 100%; }
  .hero, .item-hero { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .hero-art { display: none; }
}

/* ---- Sources, start guide, crops ---- */
.sources { list-style: square; padding: 0.8rem 1rem 0.8rem 2.2rem; margin: 0; max-width: 820px; }
.sources li { margin: 0.25rem 0; }
.start-step h2 { margin-top: 0.2rem; }
.step-no {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; color: #fff; font-size: 0.95rem;
  background: #4c8a2f; border: 2px solid #000; box-shadow: inset 2px 2px 0 #7ccc55, inset -2px -2px 0 #2f5a1b;
}
.start-step .recipes { margin: 0.8rem 0; }
.crop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.crop { padding: 1rem 1.1rem; }
.crop p { margin: 0.4rem 0 0; }
.crop-row { display: flex; align-items: center; gap: 0.8rem; }
.crop-row small { display: block; font-family: var(--pixel); color: var(--muted); font-size: 0.7rem; }

/* ---- Languages: wiki texts (l-*) and names (n-*) ---- */
html.ui-en .l-de, html:not(.ui-en) .l-en { display: none !important; }
html.names-en .n-de, html:not(.names-en) .n-en { display: none !important; }

/* ---- Settings ---- */
.settings { position: relative; }
.settings-button {
  font: 0.8rem var(--pixel); color: var(--text); cursor: pointer;
  background: #5a5a62; border: 2px solid #000; padding: 0.45rem 0.8rem;
  box-shadow: inset 2px 2px 0 #8a8a94, inset -2px -2px 0 #36363c; text-shadow: 2px 2px 0 #222;
}
.settings-button:hover { filter: brightness(1.12); }
.settings-panel { position: absolute; right: 0; top: calc(100% + 6px); width: 300px; padding: 0.9rem 1rem; display: none; z-index: 60; }
.settings-panel.open { display: block; }
.setting { margin-bottom: 0.9rem; }
.setting > span { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.35rem; }
.toggle { display: flex; }
.toggle button {
  flex: 1; font: 0.8rem var(--pixel); color: var(--muted); cursor: pointer; padding: 0.4rem 0.5rem;
  background: var(--slot); border: 2px solid #000;
}
.toggle button + button { border-left: 0; }
.toggle button.on { color: #fff; background: #4c8a2f; box-shadow: inset 2px 2px 0 #7ccc55, inset -2px -2px 0 #2f5a1b; text-shadow: 2px 2px 0 #1d3a10; }
.small { font-size: 0.75rem; margin: 0; }

/* ---- Hunger and saturation drumsticks ---- */
.food-bar { display: flex; flex-wrap: wrap; gap: 0; margin-top: 3px; }
.food-bar img { width: 18px; height: 18px; image-rendering: pixelated; filter: drop-shadow(1px 1px 0 #000); }

/* ---- Effect icons ---- */
.effect-icon { image-rendering: pixelated; vertical-align: middle; margin-right: 8px; filter: drop-shadow(1px 1px 0 #000); }
.effect-card h3 { display: flex; align-items: center; }
.effect-name { display: flex; align-items: center; }

/* Tavern: effects per brew level, cocktail colours; start page paths */
.brew-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.8rem; }
.brew-level h3 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.4rem; font-size: 1rem; }
.brew-level .effects { margin: 0; }
table.colours th { white-space: nowrap; padding-right: 1rem; }
table.colours td .minis { margin: 0; }
.paths .card .muted { font-size: 0.85rem; }
h2[id] { scroll-margin-top: 5rem; }
