/* DAT Editor — site styles
   Palette: dusk over the Overworld (from the site's sunset scene).
   One bold element: the editor window, built like a Minecraft GUI panel. */

:root {
  --night-950: #100e1e;
  --night-900: #17152b;
  --night-850: #1c1a33;
  --night-800: #221f3b;
  --night-700: #2c2849;
  --night-600: #3a3560;
  --night-500: #4d477a;
  --edge: #07060f;

  --ink-100: #f3efe6;
  --ink-300: #c9c2da;
  --ink-400: #a59fbd;

  --sun-400: #f6ab45;
  --sun-300: #ffc977;
  --sun-700: #a86312;
  --grass: #8fd16f;
  --redstone: #ff7b72;
  --amber: #ffd27a;

  /* NBT tag type colors: shared by the editor and the guides */
  --t-byte: #ff9f6b;
  --t-short: #ffd36b;
  --t-int: #9be37d;
  --t-long: #56d6b4;
  --t-float: #6fc3ff;
  --t-double: #9aa8ff;
  --t-string: #f4a3c9;
  --t-list: #c9a2ff;
  --t-compound: #cfc9de;

  --display: 'Orbitron', 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Atkinson Hyperlegible Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --measure: 68ch;
  --page: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--night-900);
  color: var(--ink-100);
  font: 400 16px/1.55 var(--body);
  font-variant-ligatures: no-common-ligatures;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--sun-300); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #ffe0a8; text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--sun-300); outline-offset: 2px; }

code, kbd, pre { font-family: var(--mono); }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 10;
  background: var(--sun-400); color: #1b1405; padding: 8px 12px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(100% - 32px, var(--page)); margin-inline: auto; }

/* ---------------------------------------------------------------- */
/* Header and footer                                                */
/* ---------------------------------------------------------------- */

.site-header { position: relative; z-index: 2; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px;
  flex-wrap: wrap; padding-block: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-100); text-decoration: none;
  font: 600 19px/1 var(--display); letter-spacing: .02em;
}
.brand:hover { color: var(--ink-100); }
.brand img { width: 34px; height: 34px; image-rendering: auto; }

.site-nav ul { display: flex; gap: 4px 22px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a {
  display: inline-block; padding: 6px 0; color: var(--ink-300); text-decoration: none; font-weight: 700; font-size: 15px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink-100); border-bottom-color: var(--night-500); }
.site-nav a[aria-current="page"] { color: var(--ink-100); border-bottom-color: var(--sun-400); }

.site-footer {
  margin-top: 96px; background: var(--night-950); border-top: 2px solid var(--edge);
  color: var(--ink-400); font-size: 15px;
}
.site-footer .wrap { padding-block: 40px 48px; display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr; }
.site-footer h2 { font: 600 15px/1.3 var(--display); color: var(--ink-100); margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--ink-300); }
.site-footer a:hover { color: var(--ink-100); }
.site-footer p { margin: 0 0 10px; max-width: 46ch; }
.site-footer .disclaimer { grid-column: 1 / -1; border-top: 1px solid var(--night-700); padding-top: 20px; font-size: 13.5px; }

/* ---------------------------------------------------------------- */
/* Buttons and form controls                                        */
/* ---------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px;
  font: 700 15px/1 var(--body); color: var(--ink-100); text-decoration: none;
  background: #3b3757; border: 2px solid var(--edge); border-radius: 0;
  box-shadow: inset 2px 2px 0 #5a557f, inset -2px -2px 0 #25223b;
  cursor: pointer;
}
.btn:hover { background: #48436b; color: #fff; }
.btn:active { box-shadow: inset -2px -2px 0 #5a557f, inset 2px 2px 0 #25223b; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  color: #1d1406; background: var(--sun-400);
  box-shadow: inset 2px 2px 0 #ffd895, inset -2px -2px 0 var(--sun-700);
}
.btn-primary:hover { background: #ffbb5c; color: #1d1406; }
.btn-primary:active { box-shadow: inset -2px -2px 0 #ffd895, inset 2px 2px 0 var(--sun-700); }

.btn-quiet {
  background: transparent; box-shadow: none; border-color: transparent; color: var(--ink-300);
  text-decoration: underline; text-underline-offset: 3px; padding-inline: 6px;
}
.btn-quiet:hover { background: transparent; color: var(--ink-100); }
.btn-quiet:active { box-shadow: none; }

.btn-small { min-height: 34px; padding: 0 12px; font-size: 14px; }

.field {
  min-height: 42px; padding: 0 12px;
  font: 400 15px/1 var(--mono); color: var(--ink-100);
  background: #0d0b18; border: 2px solid #5f5a80; border-radius: 0;
}
.field:focus { border-color: var(--sun-300); outline: none; }

/* ---------------------------------------------------------------- */
/* Home: hero and editor window                                     */
/* ---------------------------------------------------------------- */

.home .site-header { position: absolute; top: 0; left: 0; right: 0; }

.hero {
  position: relative;
  padding: 120px 0 150px;
  background:
    linear-gradient(180deg, rgba(23, 21, 43, .30) 0%, rgba(23, 21, 43, .62) 55%, var(--night-900) 100%),
    url('/assets/img/hero-dusk.webp') center 38% / cover no-repeat,
    var(--night-850);
}
.hero h1 {
  margin: 0; max-width: 22ch;
  font: 600 clamp(30px, 4.4vw, 50px)/1.12 var(--display); letter-spacing: 0;
  text-shadow: 0 3px 0 rgba(7, 6, 15, .55);
}
.hero p { margin: 18px 0 0; max-width: 58ch; font-size: 19px; line-height: 1.5; color: #ece6f6; text-shadow: 0 1px 2px rgba(7, 6, 15, .6); }

.tool { margin-top: -112px; position: relative; z-index: 1; }

.window {
  background: var(--night-800);
  border: 2px solid var(--edge);
  box-shadow:
    inset 3px 3px 0 var(--night-600),
    inset -3px -3px 0 #13112a,
    8px 8px 0 rgba(7, 6, 15, .55);
}
.window.is-dragging { outline: 3px dashed var(--sun-300); outline-offset: 6px; }

.window-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  padding: 14px 16px; border-bottom: 2px solid var(--edge);
  background: var(--night-700);
  box-shadow: inset 3px 3px 0 #48426f;
}
.file-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.file-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.file-name { font: 500 15px/1.2 var(--mono); color: var(--ink-100); overflow-wrap: anywhere; }
.chip {
  display: inline-block; padding: 3px 8px; font-size: 13px; font-weight: 700; color: var(--ink-300);
  background: var(--night-800); border: 1px solid var(--night-500);
}
.chip-edited { color: #1d1406; background: var(--amber); border-color: var(--amber); }

.dropzone {
  margin: 18px; padding: 56px 24px; text-align: center;
  border: 2px dashed var(--night-500); background: rgba(13, 11, 24, .45);
}
.window.is-dragging .dropzone { border-color: var(--sun-300); background: rgba(246, 171, 69, .08); }
.dropzone svg { display: block; margin: 0 auto 18px; }
.dropzone h2 { margin: 0; font: 600 22px/1.25 var(--display); }
.dropzone p { margin: 10px auto 0; max-width: 54ch; color: var(--ink-300); }
.dropzone .actions { margin-top: 22px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.dropzone .files { font-size: 14.5px; color: var(--ink-400); }
.dropzone .files code { color: var(--ink-300); }

.view-tabs {
  display: flex; align-items: flex-end; gap: 4px; padding: 14px 16px 0;
  border-bottom: 2px solid var(--edge);
}
.view-tabs [role="tab"] {
  font: 700 15px/1 var(--body); color: var(--ink-300); cursor: pointer;
  padding: 10px 16px 9px; margin-bottom: -2px;
  background: var(--night-850); border: 2px solid var(--edge); border-bottom: 0;
}
.view-tabs [role="tab"][aria-selected="true"] {
  color: var(--ink-100); background: var(--night-800); padding-bottom: 11px;
  box-shadow: inset 2px 2px 0 var(--night-600);
}
.view-tabs .spacer { flex: 1; }
.view-tabs .btn-quiet { margin-bottom: 8px; }

.panel { padding: 0; }
#tree { height: min(68vh, 640px); min-height: 380px; }

#snbtText {
  display: block; width: 100%; height: min(68vh, 640px); min-height: 380px; resize: vertical;
  padding: 16px; border: 0; border-bottom: 2px solid var(--edge);
  font: 400 14.5px/1.55 var(--mono); color: var(--ink-100); background: #0f0d1c; tab-size: 2;
}
#snbtText:focus { outline: 2px solid var(--sun-300); outline-offset: -2px; }
.snbt-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; font-size: 14.5px; color: var(--ink-400); }

.save-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; border-top: 2px solid var(--edge); background: var(--night-700);
  box-shadow: inset 3px 3px 0 #48426f;
}
.save-bar label { font-weight: 700; font-size: 15px; }
.save-bar .field[type="text"] { flex: 1 1 220px; min-width: 0; }
.save-bar select.field { flex: 0 0 auto; padding-right: 8px; font-family: var(--mono); }
.save-bar .hint { flex-basis: 100%; margin: 0; font-size: 13.5px; color: var(--ink-400); }

.status { margin: 0; padding: 0 16px; font-size: 15px; }
.status:empty { display: none; }
.status p { margin: 0; padding: 12px 0; }
.status ul { margin: -4px 0 12px; padding-left: 20px; }
.status li { margin: 4px 0; }
.status code { color: var(--ink-100); font-size: 13.5px; background: #0d0b18; padding: 1px 5px; }
.status-ok p { color: var(--grass); }
.status-warn p { color: var(--amber); }
.status-error p { color: var(--redstone); }
.status-error, .status-warn { border-top: 2px solid var(--edge); }

/* Legend under the editor */
.legend { margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 14px; color: var(--ink-300); }
.legend h2 { flex-basis: 100%; margin: 0; font: 700 15px/1.2 var(--body); color: var(--ink-100); }
.legend span { display: inline-flex; align-items: center; }

/* ---------------------------------------------------------------- */
/* NBT tag badges (guides, legend, tree figures)                    */
/* ---------------------------------------------------------------- */

.badge {
  --tc: var(--t-compound);
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 19px; padding: 0 4px; margin-right: 7px;
  font: 700 11px/1 var(--mono); letter-spacing: .02em; white-space: nowrap;
  color: var(--tc);
  background: color-mix(in srgb, var(--tc) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent);
  vertical-align: 1px;
}
.t-byte { --tc: var(--t-byte); }
.t-short { --tc: var(--t-short); }
.t-int { --tc: var(--t-int); }
.t-long { --tc: var(--t-long); }
.t-float { --tc: var(--t-float); }
.t-double { --tc: var(--t-double); }
.t-string { --tc: var(--t-string); }
.t-list { --tc: var(--t-list); }
.t-compound { --tc: var(--t-compound); }
.t-byteArray { --tc: var(--t-byte); }
.t-intArray { --tc: var(--t-int); }
.t-longArray { --tc: var(--t-long); }

code.tag { font-size: .92em; white-space: nowrap; color: var(--ink-100); }
code.tag .badge { font-size: 10.5px; height: 18px; min-width: 24px; margin-right: 5px; }

.nbt-tree {
  margin: 24px 0; padding: 16px 18px; overflow-x: auto;
  background: #0f0d1c; border: 2px solid var(--edge); box-shadow: inset 2px 2px 0 var(--night-700);
  font: 400 14.5px/1.9 var(--mono);
}
.nbt-tree figcaption { margin: -4px 0 8px; font: 700 13.5px/1.4 var(--body); color: var(--ink-400); }
.nbt-tree ul { list-style: none; margin: 0; padding: 0; }
.nbt-tree ul ul { margin-left: 9px; padding-left: 20px; border-left: 1px dotted var(--night-500); }
.nbt-tree li { white-space: nowrap; }
.nbt-tree .k { color: var(--ink-100); }
.nbt-tree .v { color: var(--tc); margin-left: 10px; }
.nbt-tree .c { color: var(--ink-400); margin-left: 12px; font-family: var(--body); font-size: 13.5px; white-space: normal; }
.nbt-tree li.hl > .k { background: rgba(246, 171, 69, .16); outline: 1px solid rgba(246, 171, 69, .45); padding: 0 3px; }

/* ---------------------------------------------------------------- */
/* Home sections                                                    */
/* ---------------------------------------------------------------- */

.section { margin-top: 88px; }
.section > h2, .section-head h2 { margin: 0 0 8px; font: 600 29px/1.2 var(--display); }
.section-head p, .section > p.lead { margin: 0 0 28px; color: var(--ink-300); max-width: 62ch; font-size: 17px; }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(3, 1fr); }
.steps li { counter-increment: step; position: relative; padding-top: 54px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; display: grid; place-items: center;
  font: 600 22px/1 var(--display); color: #1d1406; background: var(--sun-400);
  box-shadow: inset 2px 2px 0 #ffd895, inset -2px -2px 0 var(--sun-700);
}
.steps h3 { margin: 0 0 6px; font-size: 19px; }
.steps p { margin: 0; color: var(--ink-300); }

.file-table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.file-table th, .file-table td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--night-700); }
.file-table th { font-size: 13.5px; color: var(--ink-400); font-weight: 700; border-bottom: 2px solid var(--night-600); }
.file-table td:first-child { white-space: nowrap; }
.file-table code { font-size: 14px; color: var(--ink-100); }
.file-table td:last-child { white-space: nowrap; }

.faq details { border-bottom: 1px solid var(--night-700); }
.faq summary {
  cursor: pointer; padding: 18px 32px 18px 0; position: relative; list-style: none;
  font-weight: 700; font-size: 17.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 4px; top: 14px;
  font: 600 24px/1 var(--display); color: var(--sun-300);
}
.faq details[open] summary::after { content: '–'; }
.faq details > div { padding: 0 0 18px; color: var(--ink-300); max-width: 72ch; }
.faq details > div p { margin: 0 0 10px; }

.guide-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--night-700); }
.guide-list li { border-bottom: 1px solid var(--night-700); }
.guide-list a {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; align-items: baseline;
  padding: 18px 0; color: var(--ink-100); text-decoration: none;
}
.guide-list a:hover .g-title { color: var(--sun-300); text-decoration: underline; text-underline-offset: 3px; }
.guide-list .g-title { font-weight: 700; font-size: 18px; }
.guide-list .g-file { grid-row: span 2; font: 400 13.5px/1.4 var(--mono); color: var(--ink-400); text-align: right; }
.guide-list .g-desc { color: var(--ink-300); font-size: 15.5px; }

.guide-groups { display: grid; gap: 56px; }
.guide-groups h2 { margin: 0 0 14px; font: 600 22px/1.25 var(--display); }

/* ---------------------------------------------------------------- */
/* Articles                                                         */
/* ---------------------------------------------------------------- */

.page-head { padding: 34px 0 8px; }
.crumbs { font-size: 14px; color: var(--ink-400); margin-bottom: 18px; }
.crumbs a { color: var(--ink-300); }
.crumbs span[aria-hidden] { margin: 0 8px; }
.page-head h1 { margin: 0; max-width: 28ch; font: 600 clamp(26px, 3.8vw, 42px)/1.18 var(--display); }
.page-head .dek { margin: 16px 0 0; max-width: 60ch; font-size: 20px; line-height: 1.5; color: var(--ink-300); }
.byline { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14.5px; color: var(--ink-400); }
.byline a { color: var(--ink-300); }

.article { max-width: var(--measure); font-size: 18px; line-height: 1.65; }
.article > * + * { margin-top: 1.1em; }
.article p, .article ul, .article ol { margin-bottom: 0; }
.article h2 { margin: 2.1em 0 0; font: 600 23px/1.3 var(--display); scroll-margin-top: 24px; }
.article h3 { margin: 1.7em 0 0; font-size: 20px; line-height: 1.3; }
.article li + li { margin-top: .4em; }
.article ol.steps-inline { padding-left: 1.3em; }
.article ol.steps-inline > li::marker { font-weight: 700; color: var(--sun-300); }
.article code { font-size: .86em; background: #0f0d1c; padding: .1em .35em; border: 1px solid var(--night-700); overflow-wrap: anywhere; }
.article code.tag { background: transparent; border: 0; padding: 0; overflow-wrap: normal; }
.article pre {
  margin: 1.4em 0; padding: 16px 18px; overflow-x: auto;
  font-size: 14.5px; line-height: 1.6; background: #0f0d1c; border: 2px solid var(--edge); box-shadow: inset 2px 2px 0 var(--night-700);
}
.article pre code { background: none; border: 0; padding: 0; font-size: inherit; overflow-wrap: normal; }
.article table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; margin: 1.4em 0; }
.article th, .article td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--night-700); }
.article th { color: var(--ink-400); font-size: 14px; border-bottom: 2px solid var(--night-600); }
.article td code { font-size: 13.5px; }
.table-wrap { overflow-x: auto; }

.article aside {
  margin: 1.6em 0; padding: 14px 18px; font-size: 16.5px;
  background: var(--night-850); border-left: 4px solid var(--sun-400);
}
.article aside.warn { border-left-color: var(--redstone); }
.article aside.tip { border-left-color: var(--grass); }
.article aside > :first-child { margin-top: 0; }
.article aside > :last-child { margin-bottom: 0; }
.article aside strong:first-child { color: var(--ink-100); }

.toc { margin: 32px 0 8px; padding: 16px 20px; max-width: var(--measure); background: var(--night-850); border: 2px solid var(--edge); }
.toc h2 { margin: 0 0 8px; font: 700 15px/1.3 var(--body); color: var(--ink-400); }
.toc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; font-size: 16px; }

.cta {
  margin: 2.4em 0 0; padding: 22px; max-width: var(--measure);
  display: flex; gap: 16px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--night-800); border: 2px solid var(--edge); box-shadow: inset 3px 3px 0 var(--night-600), 6px 6px 0 rgba(7, 6, 15, .5);
}
.cta p { margin: 0; max-width: 42ch; }
.cta strong { display: block; font: 600 18px/1.3 var(--display); margin-bottom: 4px; }
.cta .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.related { margin-top: 64px; max-width: var(--measure); }
.related h2 { margin: 0 0 6px; font: 600 21px/1.3 var(--display); }

.prose-page .article { margin-top: 24px; }

.ad-slot:not(:empty) { margin: 32px 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.uuid-tool {
  margin: 1.4em 0; padding: 16px 18px; display: grid; gap: 10px;
  background: var(--night-850); border: 2px solid var(--edge); box-shadow: inset 2px 2px 0 var(--night-700);
}
.uuid-tool label { font-weight: 700; font-size: 16px; }
.uuid-tool .field { width: 100%; font-size: 14px; }
.uuid-tool p { margin: 0; font-size: 15.5px; color: var(--ink-300); }
.uuid-tool output { font-family: var(--mono); color: var(--t-long); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- */
/* JSONEditor dark theme + NBT badges                               */
/* ---------------------------------------------------------------- */

#tree .jsoneditor { border: 0; color: var(--ink-100); }
#tree .jsoneditor-menu {
  background: var(--night-850); border-bottom: 2px solid var(--edge); height: 38px;
}
#tree .jsoneditor-menu > button.jsoneditor-button { opacity: .85; border-radius: 0; }
#tree .jsoneditor-menu > button.jsoneditor-button:hover { background-color: rgba(255, 255, 255, .12); border-color: transparent; opacity: 1; }
#tree .jsoneditor-menu > button.jsoneditor-button:disabled { opacity: .3; }
#tree .jsoneditor-search { right: 6px; top: 6px; }
#tree .jsoneditor-search .jsoneditor-frame { background: #0d0b18; border: 1px solid var(--night-500); border-radius: 0; }
#tree .jsoneditor-search input { color: var(--ink-100); font: 400 14px/1 var(--body); background: transparent; }
#tree .jsoneditor-search .jsoneditor-results { color: var(--ink-400); }
#tree .jsoneditor-search button { filter: invert(.85); }
#tree .jsoneditor-navigation-bar {
  background: var(--night-800); border-bottom: 1px solid var(--night-700); color: var(--ink-400);
  font: 400 13px/26px var(--mono); height: 28px;
}
#tree .jsoneditor-treepath-element { color: var(--ink-300); }
#tree .jsoneditor-treepath-element:hover { color: var(--sun-300); }
#tree .jsoneditor-treepath-seperator { color: var(--night-500); }
#tree .jsoneditor-treepath-show-all-btn { filter: invert(.8); }
#tree div.jsoneditor-tree { background: #0f0d1c; }
#tree .jsoneditor-outer.has-main-menu-bar { margin-top: -38px; padding-top: 38px; }
#tree .jsoneditor-outer.has-nav-bar { margin-top: -66px; padding-top: 66px; }
#tree .jsoneditor-outer.has-main-menu-bar.has-nav-bar { margin-top: -66px; padding-top: 66px; }
#tree div.jsoneditor-tree-inner { padding-bottom: 120px; }
#tree table.jsoneditor-tree { font: 400 14.5px/1.5 var(--mono); }
#tree div.jsoneditor-field,
#tree div.jsoneditor-value,
#tree div.jsoneditor-readonly,
#tree div.jsoneditor-default { font: 400 14.5px/22px var(--mono); padding: 1px 3px; min-height: 22px; }
#tree div.jsoneditor-field { color: var(--ink-100); white-space: nowrap; }
#tree td.jsoneditor-tree > div.jsoneditor-readonly { white-space: nowrap; }
#tree div.jsoneditor-readonly { color: var(--ink-400); }
#tree div.jsoneditor-value { color: var(--ink-100); }
#tree .jsoneditor-separator { color: var(--night-500); }
#tree div.jsoneditor-field[contenteditable=true]:focus,
#tree div.jsoneditor-field[contenteditable=true]:hover,
#tree div.jsoneditor-value[contenteditable=true]:focus,
#tree div.jsoneditor-value[contenteditable=true]:hover {
  background: #1d1a33; border: 1px solid var(--night-500); border-radius: 0; color: var(--ink-100);
}
#tree div.jsoneditor-field[contenteditable=true]:focus,
#tree div.jsoneditor-value[contenteditable=true]:focus { border-color: var(--sun-300); }
#tree div.jsoneditor-value.jsoneditor-empty::after,
#tree div.jsoneditor-field.jsoneditor-empty::after { color: var(--ink-400); }
#tree tr.jsoneditor-highlight, #tree tr.jsoneditor-selected { background: rgba(246, 171, 69, .12); }
#tree tr.jsoneditor-selected.jsoneditor-first { border-top: 0; }
#tree div.jsoneditor-field.jsoneditor-highlight,
#tree div.jsoneditor-value.jsoneditor-highlight { background: rgba(246, 171, 69, .28); border-color: transparent; }
#tree div.jsoneditor-field.jsoneditor-highlight-active,
#tree div.jsoneditor-value.jsoneditor-highlight-active { background: rgba(246, 171, 69, .55); color: #fff; }
#tree .jsoneditor-tree button.jsoneditor-button { filter: invert(.82) hue-rotate(180deg); opacity: .85; }
#tree .jsoneditor-tree button.jsoneditor-button:focus { outline: 2px solid var(--sun-300); background-color: transparent; }
#tree .jsoneditor-tree button.jsoneditor-dragarea { opacity: .45; }
#tree .jsoneditor-tree tr:hover button.jsoneditor-dragarea { opacity: .8; }
#tree .jsoneditor-tree .jsoneditor-show-more { color: var(--ink-300); }
#tree .jsoneditor-tree .jsoneditor-show-more a { color: var(--sun-300); }

/* Badge before each key, color by NBT type */
#tree table.nbt > tbody > tr > td:nth-child(2) > div::before {
  content: var(--code); display: inline-block; min-width: 26px; height: 17px; margin: 0 8px 0 0; padding: 0 4px;
  font: 700 10.5px/15px var(--mono); text-align: center; vertical-align: 1px;
  color: var(--tc);
  background: color-mix(in srgb, var(--tc) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent);
}
#tree table.nbt div.jsoneditor-value { color: var(--tc); }
#tree table.nbt-t-byte { --tc: var(--t-byte); --code: "B"; }
#tree table.nbt-t-short { --tc: var(--t-short); --code: "S"; }
#tree table.nbt-t-int { --tc: var(--t-int); --code: "I"; }
#tree table.nbt-t-long { --tc: var(--t-long); --code: "L"; }
#tree table.nbt-t-float { --tc: var(--t-float); --code: "F"; }
#tree table.nbt-t-double { --tc: var(--t-double); --code: "D"; }
#tree table.nbt-t-string { --tc: var(--t-string); --code: "Str"; }
#tree table.nbt-t-list { --tc: var(--t-list); --code: "[ ]"; }
#tree table.nbt-t-compound { --tc: var(--t-compound); --code: "{ }"; }
#tree table.nbt-t-byteArray { --tc: var(--t-byte); --code: "B[ ]"; }
#tree table.nbt-t-intArray { --tc: var(--t-int); --code: "I[ ]"; }
#tree table.nbt-t-longArray { --tc: var(--t-long); --code: "L[ ]"; }
#tree table.nbt-t-new { --tc: var(--ink-400); --code: "new"; }

/* Context menu */
.jsoneditor-contextmenu .jsoneditor-menu {
  background: var(--night-800); border: 2px solid var(--edge); border-radius: 0;
  box-shadow: inset 2px 2px 0 var(--night-600), 6px 6px 0 rgba(7, 6, 15, .5);
}
.jsoneditor-contextmenu .jsoneditor-menu button { color: var(--ink-100); font: 400 14px/1 var(--body); }
.jsoneditor-contextmenu .jsoneditor-menu button:hover,
.jsoneditor-contextmenu .jsoneditor-menu button:focus { background-color: var(--night-600); color: #fff; }
.jsoneditor-contextmenu .jsoneditor-menu li ul { background: var(--night-850); border-color: var(--night-700); box-shadow: inset 0 4px 4px -4px rgba(0, 0, 0, .6); }
.jsoneditor-contextmenu .jsoneditor-menu li ul li button { padding-left: 24px; }
.jsoneditor-contextmenu .jsoneditor-separator { border-top: 1px solid var(--night-600); }
.jsoneditor-contextmenu .jsoneditor-icon { filter: invert(.85) hue-rotate(180deg); }
.jsoneditor-contextmenu button.nbt-menu-type .jsoneditor-icon { filter: none; background: none; }
.jsoneditor-contextmenu button.nbt-menu-type .jsoneditor-icon::before { content: 'T'; display: block; text-align: center; font: 700 12px/24px var(--mono); color: var(--sun-300); }
.jsoneditor-contextmenu button.nbt-menu-item .jsoneditor-icon { display: none; }
.jsoneditor-contextmenu button.nbt-menu-item .jsoneditor-text { padding-left: 14px; }
.jsoneditor-contextmenu button.is-current { color: var(--sun-300); }
.jsoneditor-contextmenu button.is-current:hover { color: var(--sun-300); }
.jsoneditor-modal, .jsoneditor-popover { color: #1c1c1c; }

/* Folder access ---------------------------------------------------- */

.window.has-folder .window-body { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); }
.window-main { min-width: 0; }
.folder-panel { border-right: 2px solid var(--edge); background: var(--night-850); display: flex; flex-direction: column; min-height: 0; }
.folder-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 10px; border-bottom: 1px solid var(--night-600); }
.folder-name { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.folder-list { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; max-height: min(78vh, 760px); }
.folder-file {
  display: block; width: 100%; text-align: left; cursor: pointer; padding: 7px 12px;
  background: none; border: 0; border-left: 3px solid transparent; color: var(--ink-300); font: inherit;
}
.folder-file:hover { background: var(--night-800); color: var(--ink-100); }
.folder-file:focus-visible { outline: 2px solid var(--sun-300); outline-offset: -2px; }
.folder-file.is-open { border-left-color: var(--sun-400); background: var(--night-800); color: var(--ink-100); }
.ff-path { display: block; font: 400 13px/1.35 var(--mono); overflow-wrap: anywhere; }
.ff-hint { display: block; font-size: 12.5px; color: var(--ink-400); margin-top: 2px; }
.dropzone .folder-note { font-size: 14.5px; color: var(--ink-400); }
.save-bar .backup { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 14.5px; color: var(--ink-300); }
.save-bar .backup .backup-where { font: 400 13px var(--mono); color: var(--ink-400); }
.save-bar .backup input { accent-color: var(--sun-400); width: 16px; height: 16px; }

/* Visual view (beta) ---------------------------------------------- */

.view-tabs .beta {
  margin-left: 4px; padding: 1px 5px; font-size: 11px; font-weight: 700; vertical-align: 2px;
  color: #1d1406; background: var(--sun-300);
}
#visualPanel { height: min(68vh, 640px); min-height: 380px; overflow-y: auto; background: #12101f; }
.visual { padding: 6px 18px 22px; max-width: 980px; }
.vsection { padding: 16px 0 18px; border-bottom: 1px solid var(--night-700); }
.vsection:last-child { border-bottom: 0; }
.vsection h3, .vsub-title { margin: 0 0 12px; font: 600 16px/1.3 var(--display); color: var(--ink-100); }
.vsub { margin-top: 10px; padding: 4px 16px 0; border: 2px solid var(--night-700); background: rgba(34, 31, 59, .35); }
.vsub-title { margin-top: 14px; color: var(--sun-300); }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 18px; align-items: start; }
.vtoggles { margin-top: 14px; }
.vgrid-4 { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.vfield { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.vfield .field { width: 100%; min-width: 0; }
.vlabel { font-weight: 700; font-size: 14.5px; color: var(--ink-300); overflow-wrap: anywhere; }
.vhint { font-size: 13px; line-height: 1.4; color: var(--ink-400); margin: 0; }
.vnote { margin: 14px 0 0; padding: 10px 12px; font-size: 14px; color: var(--ink-300); background: var(--night-850); border-left: 3px solid var(--sun-400); }
.vnote a { color: var(--sun-300); }
.vseed { margin: 0 0 6px; }
.vseed code { font: 500 15px var(--mono); color: var(--t-long); }
.vempty { padding: 40px 0; color: var(--ink-300); }

.vtoggle {
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; row-gap: 3px;
  padding: 8px 10px; background: var(--night-850); border: 1px solid var(--night-600); cursor: pointer;
}
.vtoggle .vhint { grid-column: 2; }
.vswitch {
  appearance: none; margin: 0; flex: none; cursor: pointer; position: relative;
  width: 38px; height: 20px; background: var(--night-600); border: 2px solid var(--edge);
}
.vswitch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; background: var(--ink-400); transition: transform .12s; }
.vswitch:checked { background: #3f7a2c; }
.vswitch:checked::after { transform: translateX(18px); background: var(--grass); }
.vswitch:focus-visible { outline: 2px solid var(--sun-300); outline-offset: 2px; }

.vfilter { width: min(320px, 100%); margin-bottom: 12px; }
.vrules { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.vrules .vfield { padding: 8px 10px; background: var(--night-850); border: 1px solid var(--night-600); }
.vrules .vlabel, .vrules .vtoggle .vlabel { font: 400 13.5px/1.3 var(--mono); color: var(--ink-100); }

.inv { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.inv-main { display: flex; flex-direction: column; gap: 10px; }
.inv-grid { display: grid; grid-template-columns: repeat(9, 58px); gap: 4px; }
.inv-armor { display: grid; grid-template-columns: 58px; gap: 4px; }
.slot {
  position: relative; width: 58px; height: 58px; padding: 3px; cursor: pointer; overflow: hidden;
  background: #2a2640; border: 2px solid var(--edge);
  box-shadow: inset 2px 2px 0 #14121f, inset -2px -2px 0 #4a4570;
  color: var(--ink-100); font: 700 10.5px/1.1 var(--body); text-align: center;
  display: flex; align-items: center; justify-content: center;
}
.slot:hover { background: #363152; }
.slot:focus-visible { outline: 2px solid var(--sun-300); outline-offset: 1px; z-index: 1; }
.slot.has-item { background: hsl(var(--hue) 32% 26%); box-shadow: inset 2px 2px 0 hsl(var(--hue) 30% 16%), inset -2px -2px 0 hsl(var(--hue) 35% 40%); }
.slot.has-item:hover { background: hsl(var(--hue) 34% 32%); }
.slot-name { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; hyphens: auto; }
.slot-count { position: absolute; right: 3px; bottom: 1px; font: 700 13px/1 var(--mono); text-shadow: 1px 1px 0 var(--edge); }
.slot-extra { position: absolute; left: 3px; top: 1px; font-size: 11px; color: #d9b8ff; }
.slot-caption { font-weight: 400; font-size: 10.5px; color: var(--ink-400); }
.inv-hotbar { padding-top: 6px; border-top: 2px dashed var(--night-600); }
.slot-editor { margin-top: 14px; padding: 14px; background: var(--night-850); border: 2px solid var(--night-600); max-width: 560px; }
.slot-editor-title { margin: 0 0 10px; font-weight: 700; }
.slot-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.inv + .slot-editor + .vhint, .inv + .vhint { margin-top: 10px; }

.vservers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.vserver {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 140px auto; gap: 10px; align-items: end;
  padding: 10px 12px; background: var(--night-850); border: 1px solid var(--night-600);
}
.vserver-actions { display: flex; gap: 6px; }

/* JSONEditor autocomplete in the dark theme */
div.jsoneditor-tree div.autocomplete.dropdown, .autocomplete.dropdown {
  background: var(--night-850) !important; border: 2px solid var(--edge) !important; color: var(--ink-100) !important;
  font: 400 13.5px/1.6 var(--mono) !important; max-height: 260px; overflow-y: auto; box-shadow: 4px 4px 0 rgba(7, 6, 15, .5) !important;
}
.autocomplete.dropdown .item { color: var(--ink-100) !important; padding: 0 8px; }
.autocomplete.dropdown .item.hover { background: var(--night-600) !important; }
.autocomplete.hint { display: none !important; }

/* Item editor ------------------------------------------------------ */

.slot-editor { max-width: 720px; }
.vtoggle-inline { display: inline-grid; margin-top: 12px; }
.ench { margin-top: 14px; }
.ench > .vlabel { margin: 0 0 6px; }
.ench-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ench-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px auto; gap: 8px; align-items: center; }
.ench-row .field { min-width: 0; width: 100%; }
.ench + .slot-actions { margin-top: 16px; }
.give-out, .give-in { width: 100%; margin-top: 10px; font: 400 13px/1.45 var(--mono); resize: vertical; }
.give-import { margin-top: 12px; }
.give-import summary { cursor: pointer; font-weight: 700; color: var(--ink-300); }
.give-import[open] summary { margin-bottom: 6px; }
.give-import .btn { margin-top: 8px; }

/* Dialogs, change lists and history -------------------------------- */

.vdialog {
  width: min(760px, calc(100vw - 32px)); max-height: min(82vh, 820px); padding: 0;
  color: var(--ink-100); background: var(--night-850); border: 2px solid var(--edge);
  box-shadow: 6px 6px 0 rgba(7, 6, 15, .55);
}
.vdialog[open] { display: flex; flex-direction: column; }
.vdialog::backdrop { background: rgba(10, 8, 22, .72); }
.vdialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--night-600); }
.vdialog-head h2 { margin: 0; font: 600 18px/1.3 var(--display); overflow-wrap: anywhere; }
.vdialog-body { padding: 14px 18px 18px; overflow-y: auto; }
.vdialog-body > div > p:first-child { margin-top: 0; }
.vdialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--night-600); }
.diff-summary { margin: 0 0 10px; color: var(--ink-300); }
.diff-none { margin: 0; color: var(--ink-300); }
.diff-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.diff-list li {
  display: grid; grid-template-columns: 74px minmax(0, 1fr); column-gap: 10px; row-gap: 2px;
  padding: 7px 10px; background: var(--night-900); border-left: 3px solid var(--night-500);
}
.diff-kind { grid-row: span 2; font-size: 13px; font-weight: 700; }
.diff-added { border-left-color: var(--grass) !important; }
.diff-added .diff-kind { color: var(--grass); }
.diff-removed { border-left-color: var(--redstone) !important; }
.diff-removed .diff-kind { color: var(--redstone); }
.diff-changed { border-left-color: var(--sun-400) !important; }
.diff-changed .diff-kind { color: var(--sun-300); }
.diff-path { font: 400 13.5px/1.4 var(--mono); color: var(--ink-100); overflow-wrap: anywhere; }
.diff-vals { font-size: 13.5px; color: var(--ink-400); overflow-wrap: anywhere; }
.diff-vals code { font: 400 13px var(--mono); color: var(--ink-300); }
.review-toggle { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14.5px; color: var(--ink-300); }
.review-toggle input { accent-color: var(--sun-400); width: 16px; height: 16px; }
.versions { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.versions li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 12px; background: var(--night-900); border: 1px solid var(--night-600); }
.version-info { display: flex; flex-direction: column; gap: 2px; }
.version-actions { display: flex; gap: 6px; }
.folder-file.is-broken { border-left-color: var(--redstone); }
.folder-file.is-broken .ff-hint { color: var(--redstone); }

/* Players across a folder ------------------------------------------ */

.folder-head .folder-name { flex: 1; }
.vdialog.vdialog-wide { width: min(1080px, calc(100vw - 32px)); }
.players-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.players-search .field { flex: 1 1 260px; min-width: 0; }
.players-table { margin: 10px 0 14px; max-height: 46vh; overflow: auto; border: 1px solid var(--night-600); }
.players-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.players-table th, .players-table td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--night-700); vertical-align: middle; }
.players-table thead th { position: sticky; top: 0; background: var(--night-800); font-size: 13px; color: var(--ink-300); z-index: 1; }
.players-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.players-table input[type="checkbox"], .review-toggle input { accent-color: var(--sun-400); width: 16px; height: 16px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--sun-300); font: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.link-btn:focus-visible { outline: 2px solid var(--sun-300); outline-offset: 2px; }
.players-actions { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--night-900); border: 1px solid var(--night-600); }
.players-actions-title { margin: 0; font-weight: 700; }
.players-action { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.players-action .field { width: 90px; }
.players-action .field[list="dl-dimension"] { width: 190px; }
.players-action select.field { width: auto; }
.players-confirm { margin: 6px 0 10px; padding-left: 20px; max-height: 180px; overflow: auto; font-size: 14px; }

/* Region files ------------------------------------------------------ */

#regionPanel { min-height: 380px; background: #12101f; }
.region { padding: 6px 18px 22px; }
.region-head h3 { margin: 14px 0 4px; font: 600 16px/1.3 var(--display); }
.region-head p { margin: 0 0 14px; }
.region-body { display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: 22px; align-items: start; }
.region-map { width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; border: 2px solid var(--edge); cursor: pointer; display: block; }
.region-hover { min-height: 2.8em; margin-top: 6px; }
.region-search > .vlabel { margin: 0 0 8px; }
.region-search > .vhint { margin: 8px 0 0; }
.region-hits { list-style: none; margin: 8px 0 0; padding: 0; max-height: 420px; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.region-hit { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; cursor: pointer; padding: 8px 10px; color: var(--ink-100); background: var(--night-850); border: 1px solid var(--night-600); font: inherit; }
.region-hit:hover { background: var(--night-800); border-color: var(--sun-400); }
.region-hit:focus-visible { outline: 2px solid var(--sun-300); outline-offset: 1px; }
.rh-what { font-weight: 700; overflow-wrap: anywhere; }
.region-files { max-height: 56vh; overflow: auto; }
.window.is-readonly .save-bar, .window.is-readonly #changesBtn, .window.is-readonly #resetBtn { display: none; }
.view-tabs [role="tab"]:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------------------------------------------------------- */
/* Responsive                                                       */
/* ---------------------------------------------------------------- */

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .about-col { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .hero { padding: 150px 0 136px; }
  .hero p { font-size: 17px; }
  .tool { margin-top: -104px; }
  .window { box-shadow: inset 3px 3px 0 var(--night-600), inset -3px -3px 0 #13112a, 5px 5px 0 rgba(7, 6, 15, .55); }
  .dropzone { margin: 12px; padding: 36px 16px; }
  .dropzone h2 { font-size: 19px; }
  .view-tabs { padding: 10px 10px 0; }
  .view-tabs [role="tab"] { padding-inline: 12px; }
  .view-tabs { flex-wrap: wrap; row-gap: 0; }
  .view-tabs .btn-quiet { order: -2; margin-bottom: 6px; padding-inline: 8px; }
  .view-tabs .spacer { order: -1; flex-basis: 100%; height: 0; }
  #tree, #snbtText, #visualPanel { height: 64vh; min-height: 340px; }
  .window.has-folder .window-body { grid-template-columns: 1fr; }
  .folder-panel { border-right: 0; border-bottom: 2px solid var(--edge); }
  .folder-list { max-height: 180px; }
  .visual { padding: 4px 12px 18px; }
  .inv-grid { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; }
  .inv, .inv-main, .inv > .inv-grid { width: 100%; }
  .inv-armor { grid-template-columns: repeat(5, 54px); }
  .slot { width: auto; height: auto; aspect-ratio: 1; min-width: 0; font-size: 8.5px; }
  .inv-armor .slot { width: 54px; }
  .slot-count { font-size: 11px; }
  .vserver { grid-template-columns: 1fr; }
  .diff-list li { grid-template-columns: 1fr; }
  .diff-kind { grid-row: auto; }
  .vdialog-head, .vdialog-body, .vdialog-actions { padding-inline: 14px; }
  .region { padding: 4px 12px 18px; }
  .region-body { grid-template-columns: 1fr; }
  .players-table th:nth-child(4), .players-table td:nth-child(4), .players-table th:nth-child(5), .players-table td:nth-child(5) { display: none; }
  .save-bar .field[type="text"] { flex-basis: 100%; }
  .save-bar select.field { flex: 1 1 40%; min-width: 0; }
  .save-bar .btn-primary { flex: 1 1 100%; }
  .section { margin-top: 64px; }
  .section > h2, .section-head h2 { font-size: 23px; }
  .file-table thead { display: none; }
  .file-table tr { display: grid; padding: 12px 0; border-bottom: 1px solid var(--night-700); }
  .file-table td { border: 0; padding: 2px 0; }
  .file-table td:first-child, .file-table td:last-child { white-space: normal; }
  .guide-list a { grid-template-columns: 1fr; }
  .guide-list .g-file { grid-row: auto; text-align: left; }
  .article { font-size: 17px; }
  .article h2 { font-size: 20px; }
  .page-head .dek { font-size: 18px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* UUID migration and account transfer ------------------------------ */
.players-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.vwarn { font-size: 13px; line-height: 1.4; margin: 0; color: var(--redstone); }
.vactions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 0; }
.mig-detect { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; margin-bottom: 12px; background: var(--night-850); border: 1px solid var(--night-500); }
.mig-detect p { margin: 0; }
.mig-check, .mig-radio, .mig-part { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.mig-check { font-weight: 700; }
.mig-check input, .mig-radio input, .mig-part input { accent-color: var(--sun-400); width: 16px; height: 16px; flex: none; }
.mig-indent { margin-left: 26px; }
.mig-lookup { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 0 26px; padding: 10px 12px; background: var(--night-900); border: 1px solid var(--night-600); }
.mig-dupes { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; margin-bottom: 12px; background: #221a12; border: 1px solid var(--sun-700); }
.mig-dupes > p { margin: 0; }
.mig-dupe { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; align-items: center; padding: 6px 0; border-top: 1px solid #3a2a14; }
.mig-name { width: 150px; min-height: 34px; }
.mig-paste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mig-paste .field { width: 220px; min-height: 34px; font-size: 13px; }
.players-table td.mig-ok { color: var(--grass); font-weight: 700; white-space: nowrap; }
.players-table td.mig-warn { color: var(--amber); font-weight: 700; white-space: nowrap; }
.mig-badge { padding: 3px 8px; font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--ink-300); border: 1px solid #5f5a80; }
.mig-badge.is-new { color: var(--grass); border-color: var(--grass); }
.mig-badge.is-update { color: #1d1406; background: var(--amber); border-color: var(--amber); }
.mig-xfer { display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); gap: 0; margin-bottom: 14px; }
.mig-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--night-850); border: 1px solid var(--night-500); min-width: 0; }
.mig-card p { margin: 0; }
.mig-card code { overflow-wrap: anywhere; }
.mig-arrow { display: flex; align-items: center; justify-content: center; color: var(--sun-400); font-size: 22px; font-weight: 700; }
.mig-row { display: flex; align-items: center; gap: 8px; }
.mig-row .field { flex: 1; min-width: 0; }
.mig-parts { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; margin: 0 0 12px; border: 1px solid var(--night-600); }
.mig-parts legend { padding: 0 6px; font-weight: 700; }
.mig-steps { margin: 12px 0; padding-left: 20px; color: var(--ink-300); font-size: 14.5px; }
.mig-go { flex-direction: row; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 720px) {
  .mig-xfer { grid-template-columns: 1fr; }
  .mig-arrow { transform: rotate(90deg); padding: 4px 0; }
  .mig-dupe { grid-template-columns: 1fr; }
}

/* Fix this world (level.dat) --------------------------------------- */
.vfixes { border: 1px solid var(--night-500); background: var(--night-850); padding: 14px 16px; }
.vfix-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.vfix { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vfix > p { margin: 0; }
.vpacks { display: flex; flex-direction: column; gap: 4px; }
.vpacks .vlabel { font: 400 13.5px/1.3 var(--mono); color: var(--ink-100); }
@media (max-width: 720px) { .vfix-grid { grid-template-columns: 1fr; } }

/* Folder tools, maps and stats ------------------------------------- */
.folder-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--night-600); }
.map-one { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.map-single { width: min(100%, 512px); height: auto; aspect-ratio: 1; image-rendering: pixelated; border: 6px solid #d9c9a0; box-shadow: 0 0 0 2px var(--edge); }
.map-info { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; }
.map-info dt { color: var(--ink-400); }
.map-info dd { margin: 0; }
.vdialog.vdialog-maps { width: min(1200px, calc(100vw - 32px)); }
.maps-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.maps-dims, .maps-zoombar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.maps-zoom { min-width: 120px; text-align: center; font: 400 13px/1 var(--mono); color: var(--ink-300); }
.maps-main { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 12px; }
.maps-stage { position: relative; min-width: 0; }
.maps-canvas { display: block; width: 100%; height: auto; aspect-ratio: 820 / 560; background: #0d0b18; border: 2px solid var(--edge); cursor: grab; touch-action: none; image-rendering: pixelated; }
.maps-canvas:active { cursor: grabbing; }
.maps-coords, .maps-help { position: absolute; bottom: 10px; padding: 4px 8px; font-size: 12.5px; background: rgba(16, 14, 30, .85); border: 1px solid var(--night-600); pointer-events: none; }
.maps-coords { left: 10px; font-family: var(--mono); }
.maps-help { right: 10px; color: var(--ink-300); }
.maps-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.maps-side > p { margin: 0; }
.maps-layers { list-style: none; margin: 4px 0; padding: 0; max-height: 330px; overflow: auto; border: 1px solid var(--night-600); }
.maps-layers li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-left: 3px solid transparent; flex-wrap: wrap; }
.maps-layers li.is-sel { background: var(--night-700); border-left-color: var(--sun-400); }
.maps-layers input { accent-color: var(--sun-400); }
.maps-sel { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--night-600); }
.maps-sel p { margin: 0; }
.stats-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.stats-main { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; }
.stats-side { display: flex; flex-direction: column; gap: 8px; }
.stats-side > p { margin: 0; }
.stats-preview { margin: 0; padding: 10px; white-space: pre-wrap; font: 400 13px/1.55 var(--mono); color: var(--ink-300); background: var(--night-950); border: 1px solid var(--night-600); }
.stats-rank { font-weight: 700; color: var(--ink-400); }
.stats-rank.is-top1 { color: var(--amber); }
.stats-rank.is-top2 { color: var(--t-compound); }
.stats-rank.is-top3 { color: var(--t-byte); }
.stats-time { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-family: var(--mono); }
.stats-bar-track { display: inline-block; width: 70px; height: 9px; background: var(--night-950); border: 1px solid var(--night-600); }
.stats-bar-track span { display: block; height: 100%; background: var(--sun-400); }
.players-table td.is-sorted { color: var(--ink-100); font-weight: 700; }
@media (max-width: 860px) {
  .maps-main, .stats-main { grid-template-columns: 1fr; }
  .maps-help { display: none; }
}
.folder-scope { margin: 0; padding: 8px 12px; font-size: 12.5px; line-height: 1.45; color: var(--ink-300); border-bottom: 1px solid var(--night-600); }
.folder-scope.is-warning { color: var(--amber); }
.folder-more { padding: 8px 12px; font-size: 12.5px; color: var(--ink-400); }
.slot-error { margin: 0 0 10px; padding: 8px 10px; font-size: 14px; color: #ffd5d0; background: #3a1414; border: 1px solid var(--redstone); }
.slot-editor [aria-invalid="true"] { border-color: var(--redstone); box-shadow: 0 0 0 1px var(--redstone); }
.problems { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.problems li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 8px 10px; background: var(--night-850); border-left: 3px solid var(--redstone); }
.problems code { grid-column: 1; overflow-wrap: anywhere; color: var(--ink-100); }
.problems span { grid-column: 1; font-size: 14px; color: var(--ink-300); }
.problems .btn { grid-column: 2; grid-row: 1 / span 2; }
.problems.is-warning li { border-left-color: var(--amber); }
.unusual { margin-bottom: 14px; }
.unusual > p { margin: 0; }
.ff-name { display: block; font-weight: 700; font-size: 14px; line-height: 1.3; }
.ff-name + .ff-hint { font-family: var(--mono); font-size: 11.5px; overflow-wrap: anywhere; }
.vswitch:disabled { opacity: .45; cursor: not-allowed; }
.vtoggle:has(.vswitch:disabled) { cursor: default; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1000; display: flex; align-items: center; gap: 10px; max-width: min(640px, calc(100vw - 24px)); padding: 10px 10px 10px 14px; font-size: 14.5px; line-height: 1.4; color: var(--ink-100); background: var(--night-850); border: 2px solid var(--edge); border-left: 4px solid var(--amber); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.toast-error { border-left-color: var(--redstone); }
@media (prefers-reduced-motion: no-preference) { .toast { animation: toast-in .18s ease-out; } @keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } } }
.mig-pastebox { width: 100%; box-sizing: border-box; font: 400 13px/1.45 var(--mono); }
