:root {
  color-scheme: light;
  --page: #f7f8f5;
  --surface: #ffffff;
  --surface-muted: #eef2ec;
  --line: #d9dfd7;
  --line-strong: #bac5b9;
  --ink: #202521;
  --muted: #667067;
  --green: #2f7d4a;
  --green-dark: #245f39;
  --green-soft: #e3f1e6;
  --gold: #a9791f;
  --gold-soft: #f7edd4;
  --red: #a0443d;
  --topbar: rgba(255, 255, 255, 0.96);
  --sidebar: #f1f4ef;
  --secondary-ink: #465047;
  --hover: rgba(255, 255, 255, 0.75);
  --hover-solid: #fafbf9;
  --focus-ring: rgba(47, 125, 74, 0.12);
  --code-block: #222823;
  --code-block-ink: #f5f7f3;
  --gold-line: #ead8a9;
  --gold-line-strong: #cda94f;
  --gold-ink: #6f5017;
  --gold-muted: #947028;
  --gold-hover: #f7e8bf;
  --green-line: #bed9c4;
  --modification: #516b58;
  --error-soft: #f5e4e2;
  --scrim: rgba(22, 28, 23, 0.38);
  --on-accent: #ffffff;
  --shadow: 0 10px 30px rgba(39, 54, 42, 0.09);
  --header-height: 64px;
  --sidebar-width: 276px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #151815;
  --surface: #1d211e;
  --surface-muted: #252b26;
  --line: #353d36;
  --line-strong: #4a554c;
  --ink: #edf1ec;
  --muted: #a7b0a8;
  --green: #68bd7d;
  --green-dark: #8bd39c;
  --green-soft: #24392a;
  --gold: #d5a84c;
  --gold-soft: #3b321f;
  --red: #e38a83;
  --topbar: rgba(29, 33, 30, 0.97);
  --sidebar: #191d1a;
  --secondary-ink: #c5ccc6;
  --hover: rgba(255, 255, 255, 0.055);
  --hover-solid: #242925;
  --focus-ring: rgba(104, 189, 125, 0.17);
  --code-block: #101310;
  --code-block-ink: #f0f4ef;
  --gold-line: #675431;
  --gold-line-strong: #9b7938;
  --gold-ink: #f0cb75;
  --gold-muted: #d2ac61;
  --gold-hover: #443922;
  --green-line: #41634a;
  --modification: #a6c5ad;
  --error-soft: #3a2424;
  --scrim: rgba(0, 0, 0, 0.55);
  --on-accent: #101411;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--green-dark);
}

.topbar {
  align-items: center;
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 28px;
  grid-template-columns: var(--sidebar-width) auto minmax(220px, 360px) 38px;
  height: var(--header-height);
  left: 0;
  padding: 0 24px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 30;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 18px;
  font-weight: 720;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  border-radius: 5px;
  height: 38px;
  image-rendering: pixelated;
  width: 38px;
}

.view-tabs {
  align-items: stretch;
  display: flex;
  gap: 4px;
  height: 100%;
}

.view-tabs a {
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  font-weight: 650;
  padding: 2px 14px 0;
  text-decoration: none;
}

.view-tabs a:hover {
  color: var(--ink);
}

.view-tabs a.active {
  border-bottom-color: var(--green);
  color: var(--green-dark);
}

.global-search {
  align-items: center;
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 8px;
  height: 38px;
  padding: 0 11px;
  position: relative;
}

.global-search:focus-within {
  background: var(--surface);
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.global-search > span {
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.global-search input {
  background: transparent;
  border: 0;
  color: var(--ink);
  min-width: 0;
  outline: 0;
  width: 100%;
}

.search-results {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
  max-height: min(520px, calc(100vh - 90px));
  overflow: auto;
  padding: 6px;
  position: absolute;
  right: 0;
  top: 45px;
  width: min(430px, calc(100vw - 32px));
  z-index: 50;
}

.search-result {
  border-radius: 5px;
  color: var(--ink);
  display: block;
  padding: 10px;
  text-decoration: none;
}

.search-result:hover,
.search-result:focus {
  background: var(--surface-muted);
  outline: 0;
}

.search-result strong {
  display: block;
  font-size: 14px;
}

.search-result small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-kind {
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  margin-right: 7px;
  text-transform: uppercase;
}

.app-shell {
  min-height: 100vh;
  padding-top: var(--header-height);
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  bottom: 0;
  display: flex;
  flex-direction: column;
  left: 0;
  overflow: hidden;
  position: fixed;
  top: var(--header-height);
  width: var(--sidebar-width);
  z-index: 20;
}

.sidebar-heading {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  font-weight: 760;
  justify-content: space-between;
  letter-spacing: 0.08em;
  padding: 22px 22px 10px;
  text-transform: uppercase;
}

#category-navigation {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 18px;
}

.article-page-toc {
  align-self: start;
  border-top: 1px solid var(--line);
  max-height: calc(100vh - var(--header-height) - 64px);
  overflow-y: auto;
  padding-top: 14px;
  position: sticky;
  top: calc(var(--header-height) + 32px);
}

.article-toc-heading {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.07em;
  margin: 0 7px 7px;
  text-transform: uppercase;
}

.article-toc-link {
  border-left: 2px solid transparent;
  border-radius: 3px;
  color: var(--secondary-ink);
  display: block;
  font-size: 12px;
  line-height: 1.3;
  padding: 6px 9px;
  text-decoration: none;
}

.article-toc-link:hover {
  background: var(--hover);
  color: var(--ink);
}

.article-toc-link.active {
  background: var(--surface);
  border-left-color: var(--green);
  color: var(--green-dark);
  font-weight: 680;
}

.article-toc-link.toc-level-3 {
  padding-left: 21px;
}

.category {
  margin-top: 13px;
}

.category h2 {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.05em;
  margin: 0 10px 6px;
  text-transform: uppercase;
}

.category a {
  border-left: 2px solid transparent;
  border-radius: 4px;
  color: var(--secondary-ink);
  display: block;
  font-size: 13px;
  line-height: 1.25;
  padding: 7px 10px;
  text-decoration: none;
}

.category a:hover {
  background: var(--hover);
  color: var(--ink);
}

.category a.active {
  background: var(--surface);
  border-left-color: var(--green);
  color: var(--green-dark);
  font-weight: 680;
}

.sidebar-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 11px;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
}

.status-dot {
  background: var(--green);
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

#main-content {
  margin-left: var(--sidebar-width);
  min-height: calc(100vh - var(--header-height));
  outline: 0;
}

.article-layout {
  display: grid;
  gap: 34px;
  grid-template-columns: 160px minmax(0, 700px) 190px;
  margin: 0 auto;
  max-width: 1230px;
  padding: 52px 34px 88px;
}

.wiki-article {
  min-width: 0;
}

.article-eyebrow {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-heading-meta {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.article-edit-link {
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 680;
  padding: 5px 8px;
  text-decoration: none;
}

.article-edit-link:hover {
  background: var(--surface);
  border-color: var(--green);
  color: var(--green-dark);
}

.article-edit-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.wiki-article > h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
}

.article-summary {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  margin: 18px 0 34px;
}

.article-body {
  border-top: 1px solid var(--line);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.75;
  padding-top: 16px;
}

.article-body > h1:first-child {
  display: none;
}

.article-body h2 {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 23px;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 38px 0 12px;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.article-body h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  letter-spacing: 0;
  margin: 28px 0 8px;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.article-body p {
  margin: 0 0 19px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 22px;
  padding-left: 25px;
}

.article-body li {
  margin: 6px 0;
  padding-left: 3px;
}

.article-body strong {
  font-weight: 720;
}

.article-body code {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.86em;
  padding: 2px 5px;
}

.article-body pre {
  background: var(--code-block);
  border-radius: 6px;
  color: var(--code-block-ink);
  overflow: auto;
  padding: 16px;
}

.article-body pre code {
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 20px 0 28px;
  overflow-x: auto;
}

.article-body table {
  border-collapse: collapse;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  width: 100%;
}

.article-body th {
  background: var(--surface-muted);
  font-weight: 720;
  text-align: left;
}

.article-body th,
.article-body td {
  border-bottom: 1px solid var(--line);
  padding: 11px 13px;
  vertical-align: top;
}

.article-body tr:last-child td {
  border-bottom: 0;
}

.article-aside {
  position: sticky;
  top: calc(var(--header-height) + 32px);
  align-self: start;
}

.aside-section {
  border-top: 1px solid var(--line);
  margin-bottom: 28px;
  padding-top: 14px;
}

.aside-section h2 {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.07em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: var(--green-soft);
  border-radius: 4px;
  color: var(--green-dark);
  font-size: 11px;
  padding: 5px 7px;
}

.related-link {
  border-radius: 4px;
  color: var(--ink);
  display: block;
  font-size: 13px;
  line-height: 1.35;
  padding: 7px 5px;
  text-decoration: none;
}

.related-link:hover {
  background: var(--surface-muted);
  color: var(--green-dark);
}

.advancement-view {
  margin: 0 auto;
  max-width: 900px;
  padding: 58px 42px 90px;
}

.advancement-heading {
  align-items: center;
  display: flex;
  gap: 22px;
}

.advancement-heading h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
}

.advancement-heading p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 12px 0 0;
}

.advancement-icon {
  flex: 0 0 72px;
  height: 72px;
  width: 72px;
}

.advancement-section {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 22px;
}

.advancement-section h2 {
  font-size: 13px;
  letter-spacing: 0.05em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.requirement-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.requirement-list li {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  font-size: 14px;
  gap: 10px;
  min-height: 38px;
  padding: 8px 0;
}

.requirement-list li::before {
  background: var(--green);
  border-radius: 50%;
  content: "";
  flex: 0 0 6px;
  height: 6px;
  width: 6px;
}

.requirement-list li:last-child {
  border-bottom: 0;
}

.requirement-group {
  margin-bottom: 20px;
}

.requirement-group > strong {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
}

.advancement-parent {
  font-weight: 650;
}

.advancement-footer {
  margin-top: 34px;
}

.tool-view {
  margin: 0 auto;
  max-width: 1240px;
  padding: 40px 34px 80px;
}

.tool-header {
  align-items: end;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-bottom: 26px;
}

.tool-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 600;
  margin: 0 0 7px;
}

.tool-header p {
  color: var(--muted);
  margin: 0;
}

.tool-search {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 8px;
  min-width: 290px;
  padding: 0 12px;
}

.tool-search input {
  border: 0;
  height: 40px;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.split-view {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  grid-template-columns: minmax(260px, 38%) minmax(0, 1fr);
  min-height: 590px;
  overflow: hidden;
}

.result-list {
  border-right: 1px solid var(--line);
  max-height: calc(100vh - 190px);
  min-height: 590px;
  overflow: auto;
}

.result-list-meta {
  background: var(--surface-muted);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.result-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 12px;
  min-height: 70px;
  padding: 13px 15px;
  text-align: left;
  width: 100%;
}

.result-row:hover {
  background: var(--hover-solid);
}

.result-row.active {
  background: var(--green-soft);
  box-shadow: inset 3px 0 var(--green);
}

.result-row strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.result-row span {
  color: var(--muted);
  font-size: 11px;
}

.item-texture {
  image-rendering: pixelated;
  object-fit: contain;
}

.result-row-texture {
  flex: 0 0 38px;
  height: 38px;
  width: 38px;
}

.result-row-copy {
  min-width: 0;
}

.detail-panel {
  min-width: 0;
  padding: 34px;
}

.detail-panel h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 600;
  margin: 0 0 8px;
}

.detail-kicker {
  align-items: center;
  color: var(--green-dark);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 720;
  gap: 8px;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.recipe-modification-label {
  border-left: 1px solid var(--line-strong);
  color: var(--modification);
  font-size: 10px;
  font-weight: 700;
  padding-left: 8px;
}

.result-row .recipe-modification-label {
  color: var(--green-dark);
  display: inline-block;
  margin-left: 6px;
}

.detail-section {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
}

.detail-section h3 {
  font-size: 12px;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.detail-section-heading {
  align-items: baseline;
  display: flex;
  gap: 10px;
}

.recipe-mode {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: capitalize;
}

.ingredient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ingredient {
  align-items: center;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: 4px;
  color: var(--gold-ink);
  display: inline-flex;
  font-size: 13px;
  gap: 8px;
  padding: 7px 9px;
}

.ingredient-link {
  cursor: pointer;
  text-decoration: none;
}

.ingredient-link:hover {
  background: var(--gold-hover);
  border-color: var(--gold-line-strong);
}

.ingredient-link:focus-visible,
.crafting-cell-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.ingredient small {
  color: var(--gold-muted);
  display: block;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

.ingredient-texture {
  height: 26px;
  width: 26px;
}

.crafting-grid {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(3, 52px);
  margin-top: 8px;
}

.crafting-cell {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--line-strong);
  display: flex;
  font-size: 18px;
  font-weight: 700;
  height: 52px;
  justify-content: center;
}

.crafting-cell-link {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.crafting-cell-link:hover {
  background: var(--green-soft);
  border-color: var(--green);
}

.grid-texture {
  height: 38px;
  width: 38px;
}

.grid-fallback {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.result-output {
  align-items: center;
  background: var(--green-soft);
  border: 1px solid var(--green-line);
  border-radius: 5px;
  display: inline-flex;
  font-weight: 680;
  gap: 10px;
  padding: 11px 13px;
}

.output-texture {
  height: 42px;
  width: 42px;
}

.output-count {
  align-items: center;
  background: var(--green);
  border-radius: 50%;
  color: var(--on-accent);
  display: inline-flex;
  font-size: 11px;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.enchantment-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.enchantment-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 128px;
  padding: 17px;
}

.enchantment-item h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px;
}

.enchantment-item p {
  color: var(--secondary-ink);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px;
}

.enchantment-meta {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 7px;
}

.enchantment-meta strong {
  color: var(--ink);
  font-weight: 650;
}

.empty-state,
.loading-state {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  padding: 40px;
  text-align: center;
}

.empty-state h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  margin: 14px 0 7px;
}

.empty-state p,
.loading-state p {
  color: var(--muted);
  max-width: 480px;
}

.empty-mark {
  align-items: center;
  background: var(--error-soft);
  border-radius: 50%;
  color: var(--red);
  display: flex;
  font-size: 24px;
  font-weight: 750;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.loader {
  animation: spin 0.8s linear infinite;
  border: 3px solid var(--line);
  border-radius: 50%;
  border-top-color: var(--green);
  height: 28px;
  width: 28px;
}

.command-button {
  background: var(--green);
  border: 0;
  border-radius: 5px;
  color: var(--on-accent);
  cursor: pointer;
  font-weight: 680;
  padding: 10px 14px;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.theme-toggle {
  border-radius: 5px;
  font-size: 19px;
}

.theme-toggle:hover {
  background: var(--surface-muted);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.theme-icon {
  line-height: 1;
}

.theme-icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
  display: inline;
}

.mobile-only {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1400px) {
  .article-layout {
    grid-template-columns: 160px minmax(0, 760px);
    max-width: 1020px;
  }

  .article-aside {
    display: grid;
    gap: 24px;
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }
}

@media (max-width: 1050px) {
  :root {
    --sidebar-width: 250px;
  }

  .topbar {
    gap: 14px;
    grid-template-columns: var(--sidebar-width) auto minmax(190px, 300px) 38px;
    padding-right: 16px;
  }

  .article-layout {
    gap: 26px;
    grid-template-columns: 150px minmax(0, 1fr);
    padding-inline: 32px;
  }

  .advancement-view {
    padding: 36px 22px 76px;
  }

  .enchantment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 58px;
  }

  .mobile-only {
    display: inline-flex;
  }

  .topbar {
    gap: 8px;
    grid-template-columns: 38px 1fr minmax(130px, 220px) 38px;
    padding: 0 10px;
  }

  .brand span {
    font-size: 16px;
  }

  .brand img {
    height: 34px;
    width: 34px;
  }

  .view-tabs {
    bottom: 0;
    height: 46px;
    justify-content: space-around;
    left: 0;
    position: fixed;
    right: 0;
    top: auto;
    z-index: 25;
    background: var(--surface);
    border-top: 1px solid var(--line);
  }

  .view-tabs a {
    border-bottom: 0;
    border-top: 2px solid transparent;
    justify-content: center;
    min-width: 0;
    padding: 0 10px 2px;
  }

  .view-tabs a.active {
    border-bottom: 0;
    border-top-color: var(--green);
  }

  .sidebar {
    box-shadow: var(--shadow);
    top: 0;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    width: min(310px, 86vw);
    z-index: 60;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    background: var(--scrim);
    border: 0;
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 55;
  }

  #main-content {
    margin-left: 0;
    padding-bottom: 46px;
  }

  .article-layout {
    display: block;
    max-width: 100%;
    padding: 36px 22px 72px;
  }

  .wiki-article,
  .article-body {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .article-page-toc {
    margin-bottom: 30px;
    max-height: none;
    position: static;
  }

  .article-aside {
    display: block;
    margin-top: 40px;
    position: static;
  }

  .tool-view {
    padding: 30px 18px 70px;
  }

  .tool-header {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .tool-search {
    min-width: 0;
  }

  .split-view {
    display: block;
  }

  .result-list {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    max-height: 330px;
    min-height: 0;
  }

  .enchantment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .topbar {
    grid-template-columns: 38px auto 1fr 38px;
  }

  .brand span {
    display: none;
  }

  .global-search {
    justify-self: end;
    min-width: 0;
    width: 100%;
  }

  .view-tabs a {
    font-size: 12px;
    padding-inline: 6px;
  }

  .wiki-article > h1 {
    font-size: 34px;
  }

  .advancement-heading {
    align-items: flex-start;
    gap: 14px;
  }

  .advancement-heading h1 {
    font-size: 32px;
  }

  .advancement-icon {
    flex-basis: 54px;
    height: 54px;
    width: 54px;
  }

  .article-summary {
    font-size: 16px;
  }

  .article-body {
    font-size: 16px;
  }

  .tool-header h1 {
    font-size: 32px;
  }

  .detail-panel {
    padding: 24px 18px;
  }

  .enchantment-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sidebar {
    transition: none;
  }

  .loader {
    animation: none;
  }
}
