/* Monocraft: an open-source recreation of Minecraft's font (SIL Open Font License 1.1, see fonts/Monocraft-LICENSE.txt). */
@font-face { font-family: "Monocraft"; src: url("fonts/Monocraft.otf") format("opentype"); font-weight: 100 500; font-display: swap; }
@font-face { font-family: "Monocraft"; src: url("fonts/Monocraft-Bold.otf") format("opentype"); font-weight: 600 900; font-display: swap; }
/* The real Minecraft font, converted by BlockHost from the font sheet in the host's own Minecraft install (/mc/…). */
@font-face { font-family: "Minecraft"; src: url("/mc/minecraft.ttf") format("truetype"); font-weight: 100 500; font-display: swap; }
@font-face { font-family: "Minecraft"; src: url("/mc/minecraft-bold.ttf") format("truetype"); font-weight: 600 900; font-display: swap; }
/* BlockHost — built like Minecraft's own screens: bevelled inventory panels, Bedrock-style 3D buttons,
   a hotbar for tabs, a pixel redstone lamp for power, and advancement-style toasts. */
:root, body { /* on body too, so a theme on <body> flows into every derived colour */
  --ds-0: #17191f;          /* page (deepslate) */
  --ds-1: #1d2027;          /* sidebar / sunken */
  --ds-2: #262a33;          /* panels */
  --ds-3: #30353f;          /* raised */
  --ds-4: #3d4350;          /* strong borders */
  --bev-hi: #464d5c;        /* bevel light edge */
  --bev-lo: #0f1115;        /* bevel dark edge */
  --line: #333845;
  --text: #f1ede4;
  --text-2: #c3bfb5;
  --muted: #959cab;
  --grass: #4c9b30;         /* primary: grass block */
  --grass-hi: #63b843;
  --grass-lo: #2a5d1a;
  --lamp: #f6be4a;          /* redstone lamp: online */
  --lamp-hi: #ffdd8a;
  --lamp-glow: rgba(246, 190, 74, .38);
  --lamp-soft: rgba(246, 190, 74, .13);
  --redstone: #e5484d;
  --redstone-lo: #7e1c1f;
  --redstone-soft: rgba(229, 72, 77, .13);
  --diamond: #5fe0d2;       /* links, info, tunnel */
  --diamond-soft: rgba(95, 224, 210, .12);
  --gold: #f0c445;          /* advancement titles, splash */
  --copper: #e6935f;
  --copper-soft: rgba(230, 147, 95, .14);
  --pixel: "Minecraft", "Monocraft", "Consolas", monospace;
  --body: "Minecraft", "Monocraft", "Consolas", monospace;
  --mono: "Minecraft", "Monocraft", "Consolas", monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --bevel: inset 2px 2px 0 var(--bev-hi), inset -2px -2px 0 var(--bev-lo);
  --bevel-in: inset 2px 2px 0 var(--bev-lo), inset -2px -2px 0 var(--bev-hi);
  color-scheme: dark;
  /* aliases used by older inline styles */
  --accent: var(--grass-hi); --amber: var(--copper); --red: var(--redstone); --blue: var(--diamond);
  --accent-soft: var(--lamp-soft); --panel: var(--ds-2); --panel-2: var(--ds-3); --line-2: var(--ds-4); --bg: var(--ds-0);
  --prism: var(--diamond); --prism-soft: var(--diamond-soft); --lamp-ink: #2a1c00;
  /* derived surfaces (follow the theme) */
  --slot: color-mix(in srgb, var(--ds-0) 70%, #000); --tab: var(--ds-1); --select: #e9e9e9;
  --console: color-mix(in srgb, var(--ds-0) 55%, #000); --field: color-mix(in srgb, var(--ds-0) 65%, #000); --field-line: var(--ds-4);
  --bg-tex: url("/mc/deepslate.png");
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  color: var(--text);
  font: 14.5px/1.65 var(--body);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .55); /* Minecraft's hard text shadow */
  -webkit-font-smoothing: antialiased;
  background-color: var(--ds-0);
  /* deepslate block texture, 32px tiles, very faint */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' shape-rendering='crispEdges'%3E%3Cg fill='%23ffffff' fill-opacity='.018'%3E%3Crect x='0' y='0' width='8' height='4'/%3E%3Crect x='20' y='8' width='12' height='4'/%3E%3Crect x='44' y='4' width='8' height='4'/%3E%3Crect x='8' y='24' width='16' height='4'/%3E%3Crect x='36' y='28' width='12' height='4'/%3E%3Crect x='52' y='40' width='12' height='4'/%3E%3Crect x='4' y='48' width='12' height='4'/%3E%3Crect x='28' y='52' width='8' height='4'/%3E%3C/g%3E%3Cg fill='%23000000' fill-opacity='.12'%3E%3Crect x='12' y='12' width='8' height='4'/%3E%3Crect x='40' y='16' width='8' height='4'/%3E%3Crect x='24' y='36' width='12' height='4'/%3E%3Crect x='48' y='56' width='8' height='4'/%3E%3Crect x='0' y='60' width='8' height='4'/%3E%3C/g%3E%3C/svg%3E");
  image-rendering: pixelated;
}
a { color: var(--diamond); text-underline-offset: 2px; }
a:hover { color: #9af0e6; }
h1, h2, h3, h4 { font-family: var(--pixel); font-weight: 600; letter-spacing: .01em; color: var(--text); }
code { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: square; stroke-linejoin: miter; }
svg.i.px { stroke: none; width: 20px; height: 20px; image-rendering: pixelated; filter: drop-shadow(1px 1px 0 rgba(0,0,0,.6)); }
.tab svg.i.px, .btn svg.i.px { width: 20px; height: 20px; }
.btn-sm svg.i, .icon-btn svg.i { width: 16px; height: 16px; }
.user-mode .host-only { display: none !important; }

/* ---------- sidebar ---------- */
.sidebar {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 14px 14px; background: var(--ds-1); border-right: 3px solid var(--bev-lo);
  box-shadow: inset -2px 0 0 var(--bev-hi);
  height: 100vh; position: sticky; top: 0;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 6px 12px; }
.brand img { image-rendering: pixelated; }
.brand-name { font: 700 22px/1 var(--pixel); letter-spacing: .02em; text-shadow: 2px 2px 0 #000; }
.brand-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.side-label { color: var(--muted); font: 500 13px var(--pixel); padding: 10px 10px 2px; letter-spacing: .04em; }
.server-list { display: flex; flex-direction: column; gap: 4px; overflow: auto; flex: 1; margin: 0 -4px; padding: 2px 4px; }
.server-item {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 50px;
  padding: 8px 10px; border: 0; background: none; color: inherit;
  text-align: left; cursor: pointer; font: inherit; transition: background .12s;
}
.server-item:hover { background: var(--ds-2); box-shadow: var(--bevel); }
.server-item.active { background: var(--ds-3); box-shadow: var(--bevel), 0 0 0 2px var(--bev-lo); }
.server-item.active .si-name { color: var(--lamp-hi); }
.server-item .si-name { font: 600 15px var(--pixel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-item .si-sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-item > div { min-width: 0; flex: 1; }
.si-icon { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ds-0); box-shadow: var(--bevel-in); color: var(--text-2); flex: none; position: relative; }
.si-icon .dot { position: absolute; right: -4px; bottom: -4px; border: 2px solid var(--bev-lo); width: 12px; height: 12px; }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-top: 2px solid var(--bev-lo); box-shadow: 0 -2px 0 var(--bev-hi) inset; padding: 12px 4px 0; }
.side-foot .muted { font-size: 11px; line-height: 1.4; }

.dot { width: 10px; height: 10px; flex: none; background: #4d5466; display: inline-block; } /* square, like a pixel */
.dot.online { background: var(--lamp); box-shadow: 0 0 8px var(--lamp-glow); }
.dot.starting, .dot.stopping, .dot.installing { background: var(--lamp); animation: flicker 1s steps(2) infinite; }
.dot.error { background: var(--redstone); }
@keyframes flicker { 50% { opacity: .25; } }

/* ---------- buttons: Bedrock-style 3D blocks ---------- */
.btn {
  --b: #4a4f5c; --b-hi: #5a606e; --b-lo: #23262d;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px 4px; border: 2px solid #0c0d10; border-radius: 0;
  background: var(--b); color: var(--text); font: 600 15px/1 var(--pixel); letter-spacing: .02em; cursor: pointer;
  box-shadow: inset 0 -4px 0 var(--b-lo), inset 2px 2px 0 var(--b-hi);
  text-shadow: 1px 1px 0 rgba(0,0,0,.45); white-space: nowrap; text-decoration: none;
  transition: transform .06s, filter .12s;
}
.btn:hover:not(:disabled) { filter: brightness(1.12); color: var(--text); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 -2px 0 var(--b-lo), inset 2px 2px 0 var(--b-hi); padding-bottom: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.btn-primary { --b: var(--grass); --b-hi: var(--grass-hi); --b-lo: var(--grass-lo); color: #fff; }
.btn-danger { --b: #a83236; --b-hi: #c74a4e; --b-lo: var(--redstone-lo); color: #fff; }
.btn-ghost { --b: transparent; --b-hi: transparent; --b-lo: transparent; border-color: transparent; box-shadow: none; text-shadow: none; }
.btn-ghost:hover:not(:disabled) { background: var(--ds-3); filter: none; }
.btn-ghost:active:not(:disabled) { box-shadow: none; }
.btn-sm { min-height: 34px; padding: 0 12px 3px; font-size: 13.5px; box-shadow: inset 0 -3px 0 var(--b-lo), inset 2px 2px 0 var(--b-hi); }
.btn-ghost.btn-sm { box-shadow: none; }
.btn-lg { min-height: 52px; padding: 0 26px 5px; font-size: 18px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; background: none; border: 0; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--ds-3); box-shadow: var(--bevel); }
.spinner { width: 14px; height: 14px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s steps(8) infinite; display: inline-block; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- main ---------- */
main { min-width: 0; padding: 30px 40px 64px; max-width: 1260px; width: 100%; }

.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.head h1 { margin: 0; font-size: 32px; line-height: 1.1; text-shadow: 3px 3px 0 #000; }
.head .sub { color: var(--muted); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.head .sub span { display: inline-flex; align-items: center; gap: 6px; }
.head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; background: var(--ds-2); box-shadow: var(--bevel); font: 600 13px var(--pixel); }
.notice { padding: 11px 14px; border: 2px solid rgba(230,147,95,.5); background: var(--copper-soft); color: #f7cdb2; margin-bottom: 16px; font-size: 14px; }
.notice.err { border-color: rgba(229,72,77,.55); background: var(--redstone-soft); color: #ffc6c8; }

/* ---------- inventory panels ---------- */
.card, .hero, .dlg, .mod, .addr-row, .inst, .save, .prow, .known, .bk, .friend-row, .member, .pack, .vp, .advanced, .eula {
  border-radius: 0;
}
.card {
  background: var(--ds-2); border: 2px solid #0c0d10; padding: 20px;
  box-shadow: var(--bevel), 4px 4px 0 rgba(0,0,0,.25);
}
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card h4, .section h4 { margin: 0 0 6px; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.card > p.muted { margin: 0 0 14px; }
.section { margin-bottom: 16px; }

/* ---------- hero: the redstone lamp ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center;
  padding: 30px 30px 26px; margin-bottom: 28px;
  background: var(--ds-2); border: 2px solid #0c0d10; box-shadow: var(--bevel), 6px 6px 0 rgba(0,0,0,.3);
}
.hero::before { /* grass on top of the block */
  content: ""; position: absolute; left: -2px; right: -2px; top: -2px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='12' shape-rendering='crispEdges'%3E%3Crect width='32' height='6' fill='%234c9b30'/%3E%3Crect width='32' height='2' fill='%2363b843'/%3E%3Crect x='2' y='6' width='4' height='3' fill='%234c9b30'/%3E%3Crect x='10' y='6' width='2' height='5' fill='%234c9b30'/%3E%3Crect x='16' y='6' width='6' height='2' fill='%234c9b30'/%3E%3Crect x='26' y='6' width='2' height='4' fill='%234c9b30'/%3E%3Crect x='6' y='2' width='4' height='2' fill='%237acc56'/%3E%3Crect x='20' y='2' width='2' height='2' fill='%2337781f'/%3E%3C/svg%3E") repeat-x;
  background-size: 32px 12px; image-rendering: pixelated; pointer-events: none;
}
.hero::after { /* lamp light spilling over the panel when online */
  content: ""; position: absolute; left: -100px; top: 50%; width: 440px; height: 440px; transform: translateY(-50%);
  background: radial-gradient(circle, var(--lamp-glow), transparent 62%); opacity: 0; transition: opacity .6s var(--ease); pointer-events: none;
}
.hero.lit::after { opacity: .5; }
.power {
  --lf: #2a1a12; --lb: #5b3a29; --lg: #7d5640; --ld: #3f281c;   /* lamp off: frame, body, glint, shade */
  position: relative; z-index: 1; width: 136px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-2);
  font: 700 17px var(--pixel); text-shadow: 2px 2px 0 #000;
}
.power .lamp { width: 128px; height: 128px; display: block; image-rendering: pixelated; filter: drop-shadow(5px 5px 0 rgba(0,0,0,.45)); transition: transform .12s var(--ease), filter .3s; }
.power .lamp .lf { fill: var(--lf); } .power .lamp .lb { fill: var(--lb); } .power .lamp .lg { fill: var(--lg); } .power .lamp .ld { fill: var(--ld); }
.power .lamp rect { transition: fill .35s; }
.power:hover:not(:disabled) .lamp { transform: translateY(-3px); }
.power:active:not(:disabled) .lamp { transform: translateY(2px) scale(.98); }
.power:disabled { cursor: not-allowed; }
.power .plabel { display: inline-flex; align-items: center; gap: 7px; }
.power .plabel svg.i { width: 16px; height: 16px; stroke-width: 2.6; }
.power.lit { --lf: #b46a12; --lb: #f7c24c; --lg: #fff0b3; --ld: #e09a2a; color: var(--lamp-hi); }
.power.lit .lamp { filter: drop-shadow(0 0 22px var(--lamp-glow)) drop-shadow(5px 5px 0 rgba(0,0,0,.4)); }
.power.busy .lamp { animation: lampflick 1.2s steps(2) infinite; }
@keyframes lampflick { 50% { filter: brightness(1.6) drop-shadow(0 0 14px var(--lamp-glow)); } }
.hero-body { min-width: 0; position: relative; z-index: 1; }
.hero-status { font: 600 17px var(--pixel); display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.hero-status.lit { color: var(--lamp-hi); }
.addr-big { display: flex; align-items: stretch; margin: 14px 0 14px; max-width: 660px; }
.addr-big code {
  flex: 1; min-width: 0; font: 600 22px/1.3 var(--mono); color: var(--text);
  background: var(--ds-0); box-shadow: var(--bevel-in); border: 2px solid #0c0d10; border-right: 0;
  padding: 16px 18px; white-space: nowrap; overflow-x: auto; font-size: clamp(15px, 1.55vw, 22px); scrollbar-width: none;
}
.addr-big code.placeholder { color: var(--muted); font: 500 16px/1.4 var(--body); display: flex; align-items: center; white-space: normal; overflow-wrap: anywhere; }
.addr-big .btn { min-height: auto; padding: 0 20px 4px; font-size: 16px; }
.addr-big:has(#addrCopy[hidden]) code { border-right: 2px solid #0c0d10; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; padding-top: 14px; border-top: 2px dashed var(--ds-4); color: var(--muted); font-size: 14px; }
.hero-stats b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.hero-stats span { display: inline-flex; align-items: center; gap: 7px; }
.hero-stats svg.i { width: 16px; height: 16px; color: var(--muted); }
.more-ways { margin-top: 14px; }
.more-ways > summary { cursor: pointer; color: var(--text-2); font: 600 15px var(--pixel); list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.more-ways > summary::-webkit-details-marker { display: none; }
.more-ways > summary svg.i { transition: transform .15s steps(3); width: 16px; height: 16px; }
.more-ways[open] > summary svg.i { transform: rotate(90deg); }

.addr-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.addr-row { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 14px; background: var(--ds-1); box-shadow: var(--bevel-in); }
.addr-row .lbl { font: 600 15px var(--pixel); }
.addr-row .desc { color: var(--muted); font-size: 13.5px; grid-column: 1 / -1; }
.addr-row code { font-family: var(--mono); color: var(--diamond); font-size: 14px; }
.tag { font: 600 12px var(--pixel); padding: 2px 8px; margin-left: 8px; white-space: nowrap; }
.tag.ok { background: var(--diamond-soft); color: var(--diamond); }
.tag.warn { background: var(--copper-soft); color: var(--copper); }
.steps { margin: 8px 0 0; padding-left: 20px; color: var(--text-2); font-size: 14px; }
.steps li { margin: 5px 0; }
.player-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.player-chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 3px 11px 3px 3px; background: var(--ds-3); box-shadow: var(--bevel); font: 600 13px var(--pixel); }
.chip img { width: 22px; height: 22px; image-rendering: pixelated; }
code.secret { filter: blur(6px); user-select: none; transition: filter .15s; }

/* ---------- hotbar tabs ---------- */
.tabs {
  display: flex; gap: 0; margin-bottom: 22px; overflow-x: auto; scrollbar-width: none;
  background: var(--slot); padding: 4px; border: 2px solid #000; width: fit-content; max-width: 100%;
  box-shadow: inset 0 0 0 2px var(--line);
}
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; flex: none;
  min-height: 48px; background: var(--tab); border: 0; margin: 2px; color: var(--muted); font: 600 15px var(--pixel); padding: 0 14px; cursor: pointer;
  box-shadow: inset 2px 2px 0 var(--bev-hi), inset -2px -2px 0 var(--bev-lo);
}
.tab svg.i { width: 18px; height: 18px; }
.tab:hover { color: var(--text); background: var(--ds-2); }
.tab.active { color: var(--text); background: var(--ds-3); outline: 3px solid var(--select); outline-offset: -1px; z-index: 1; }
.tab.active svg.i { color: var(--gold); }

/* ---------- console ---------- */
.console {
  background: var(--console); border: 2px solid #000; box-shadow: var(--bevel-in);
  height: 480px; overflow: auto; padding: 14px 16px; margin: 0;
  font: 12.8px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; color: #cfd4dd;
}
.console .warn { color: #ffd166; }
.console .error { color: #ff8589; }
.console .bh { color: var(--grass-hi); }
.console .cmd { color: var(--diamond); }
.cmd-row { display: flex; gap: 8px; margin-top: 10px; position: relative; }
.cmd-row input { flex: 1; font-family: var(--mono); font-size: 14px; padding-left: 30px; }
.cmd-row::before { content: "/"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--gold); font: 700 16px var(--mono); pointer-events: none; z-index: 1; }

/* ---------- forms: chat-box style inputs ---------- */
input, select, textarea {
  width: 100%; min-height: 42px; background: var(--field); color: var(--text); border: 2px solid #000; border-radius: 0;
  box-shadow: inset 0 0 0 1px var(--field-line); padding: 9px 12px; font: inherit; font-size: 15px; outline: none; transition: box-shadow .12s;
}
input::placeholder, textarea::placeholder { color: #737b8a; }
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 2px var(--gold); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--grass); box-shadow: none; }
input[type=checkbox] { width: 18px; height: 18px; }
input[type=range] { padding: 0; border: 0; background: none; box-shadow: none; accent-color: var(--grass-hi); min-height: 0; }
input[type=file] { padding: 6px; }
textarea { font-family: var(--mono); font-size: 12.8px; min-height: 340px; resize: vertical; line-height: 1.6; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field > span { font: 600 15px var(--pixel); }
.check { display: flex; align-items: center; gap: 9px; margin: 6px 0; }

.ram { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: center; }
.ram-num { position: relative; }
.ram-num input { padding-right: 38px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.ram-num::after { content: "GB"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font: 600 13px var(--pixel); pointer-events: none; }
.ram-hint { grid-column: 1 / -1; font-size: 13.5px; color: var(--muted); }
.ram-hint.warn { color: var(--copper); }
.ram-hint.bad { color: #ff8f92; }
.ram-presets { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.ram-presets button { min-height: 30px; padding: 0 10px 3px; font-size: 13px; }

.type-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.type-card { position: relative; }
.type-card input { position: absolute; opacity: 0; }
.type-card span { display: flex; flex-direction: column; gap: 3px; padding: 12px; background: #15171c; box-shadow: var(--bevel); border: 2px solid #000; cursor: pointer; height: 100%; }
.type-card span:hover { background: #1c1f25; }
.type-card b { font: 600 16px var(--pixel); }
.type-card small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.type-card input:checked + span { outline: 3px solid #e9e9e9; outline-offset: -1px; background: #22262e; }
.type-card input:checked + span b { color: var(--gold); }
.type-card input:focus-visible + span { box-shadow: 0 0 0 3px var(--gold); }

.seg { display: inline-flex; background: #111317; border: 2px solid #000; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 8px 14px; cursor: pointer; font: 600 14px var(--pixel); color: var(--muted); min-height: 38px; }
.seg span:hover { color: var(--text); background: #1e2127; }
.seg input:checked + span { background: var(--ds-3); color: var(--text); box-shadow: var(--bevel); }
.seg input:focus-visible + span { outline: 2px solid var(--gold); }
.world-opt { margin-top: 10px; }
.advanced { border: 2px solid #000; box-shadow: var(--bevel-in); padding: 12px 14px; margin-bottom: 16px; background: var(--ds-1); }
.advanced summary { cursor: pointer; font: 600 15px var(--pixel); color: var(--text-2); }
.advanced[open] summary { margin-bottom: 14px; }
.adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.eula { padding: 12px 14px; background: var(--ds-3); box-shadow: var(--bevel); }

/* version picker */
.vp { border: 2px solid #000; background: #111317; overflow: hidden; }
.vp-top { display: flex; align-items: center; gap: 10px; padding: 8px; border-bottom: 2px solid #000; }
.vp-top input { flex: 1; }
.vp-sel { font: 600 14px var(--pixel); white-space: nowrap; padding-right: 4px; }
.vp-sel b { color: var(--gold); }
.vp-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; max-height: 176px; overflow: auto; }
.vp-item { min-height: 34px; padding: 0 12px; background: var(--ds-3); box-shadow: var(--bevel); border: 2px solid #000; color: var(--text); font: 600 13px var(--mono); cursor: pointer; }
.vp-item:hover { filter: brightness(1.15); }
.vp-item.on { background: var(--grass); box-shadow: inset 2px 2px 0 var(--grass-hi), inset -2px -2px 0 var(--grass-lo); color: #fff; }
.vp-item small { font: 600 10.5px var(--pixel); opacity: .8; margin-left: 5px; }

/* lever-style switch */
.switch { position: relative; width: 50px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #3a3f4a; border: 2px solid #000; box-shadow: var(--bevel-in); cursor: pointer; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; background: #c9c9c9; box-shadow: inset -2px -2px 0 #7a7a7a, inset 2px 2px 0 #fff; transition: transform .15s steps(3); }
.switch input:checked + span { background: var(--grass); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 3px solid var(--gold); }

/* ---------- dialogs ---------- */
.dlg { border: 2px solid #000; background: var(--ds-2); color: var(--text); padding: 0; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 40px); box-shadow: var(--bevel), 0 30px 80px rgba(0,0,0,.6); }
.dlg[open] { animation: dlgin .18s var(--ease); }
@keyframes dlgin { from { opacity: 0; transform: translateY(8px); } }
.dlg::backdrop { background: rgba(8, 9, 12, .75); }
.dlg form { display: flex; flex-direction: column; max-height: calc(100vh - 42px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 2px solid #000; background: var(--ds-3); }
.dlg-head h2 { margin: 0; font-size: 24px; text-shadow: 2px 2px 0 #000; }
.dlg-body { padding: 20px 22px; overflow: auto; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 2px solid #000; background: var(--ds-1); }

/* ---------- mods ---------- */
.mods-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.search-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.search-row input { flex: 1; min-width: 200px; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.mod { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 14px; background: var(--ds-2); border: 2px solid #000; box-shadow: var(--bevel); }
.mod:hover { background: #2a2e38; }
.mod img, .mod .noimg { width: 48px; height: 48px; background: var(--ds-0); object-fit: cover; box-shadow: var(--bevel-in); }
.mod .t { font: 600 16px/1.2 var(--pixel); }
.mod .t a { color: inherit; text-decoration: none; }
.mod .t a:hover { color: var(--gold); }
.mod .a { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.mod .d { color: var(--text-2); font-size: 13.5px; margin: 6px 0 10px; grid-column: 1 / -1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mod .f { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; }
.installed-list { display: flex; flex-direction: column; gap: 6px; max-height: 560px; overflow: auto; }
.inst { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; background: var(--ds-1); box-shadow: var(--bevel-in); }
.inst .n { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inst .m { color: var(--muted); font-size: 12px; }
.inst > div { min-width: 0; }

/* pager */
.pager { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pg { min-width: 40px; min-height: 40px; padding: 0 8px 3px; background: var(--ds-3); color: var(--text); border: 2px solid #000; box-shadow: inset 0 -3px 0 #1d2026, inset 2px 2px 0 var(--bev-hi); font: 600 15px var(--pixel); cursor: pointer; }
.pg:hover:not(:disabled) { filter: brightness(1.15); }
.pg:active:not(:disabled) { transform: translateY(2px); }
.pg.on { background: var(--grass); color: #fff; box-shadow: inset 0 -3px 0 var(--grass-lo), inset 2px 2px 0 var(--grass-hi); }
.pg:disabled { opacity: .35; cursor: not-allowed; }
.pg-gap { color: var(--muted); padding: 0 4px; font-family: var(--pixel); }
.pager-info { margin-left: auto; color: var(--muted); font-size: 13.5px; }

/* ---------- world / settings ---------- */
.saves { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.save { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--ds-1); box-shadow: var(--bevel-in); }
.save .n { font: 600 15px var(--pixel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.save > div { min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row input { flex: 1; min-width: 200px; }
.settings-grid, .world-grid, .players-grid, .perf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.world-grid .wide { grid-column: 1 / -1; }

/* ---------- players / access ---------- */
.plist { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; max-height: 320px; overflow: auto; }
.prow, .known { display: flex; align-items: center; gap: 10px; padding: 7px 9px; background: var(--ds-1); box-shadow: var(--bevel-in); }
.known { display: grid; grid-template-columns: 30px 1fr auto; }
.prow img, .known img { width: 30px; height: 30px; image-rendering: pixelated; background: var(--ds-3); }
.prow .pn, .known .pn { font: 600 15px var(--pixel); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.prow .pr, .known .pr { color: var(--muted); font: 400 12.5px var(--body); display: block; }
.known select { width: auto; min-height: 34px; padding: 4px 8px; font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: 440px; overflow: auto; }
.member { padding: 12px; background: var(--ds-1); box-shadow: var(--bevel-in); }
.member-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.member-top img { width: 28px; height: 28px; image-rendering: pixelated; }
.member-top b { font: 600 16px var(--pixel); flex: 1; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; font-size: 14px; }

/* ---------- performance ---------- */
.live { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.live .k { color: var(--muted); font: 500 13.5px var(--pixel); }
.live .v { font: 700 30px/1.2 var(--pixel); font-variant-numeric: tabular-nums; text-shadow: 2px 2px 0 #000; }
.live .v small { font-size: 14px; color: var(--muted); font-weight: 600; font-family: var(--body); text-shadow: none; }
/* XP-bar meters */
.meter { height: 10px; background: #0d0f12; border: 2px solid #000; margin: 8px 0 5px; overflow: hidden; }
.meter span { display: block; height: 100%; transition: width .5s var(--ease); background-image: repeating-linear-gradient(90deg, transparent 0 18px, rgba(0,0,0,.35) 18px 20px) !important; background-color: var(--grass-hi); }
.checklist { display: flex; flex-direction: column; gap: 7px; }
.ck { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; font-size: 14px; }
.ck > span { color: var(--muted); font-weight: 700; }
.ck.ok > span { color: var(--grass-hi); }
.ck.skip > span { color: var(--copper); }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 2px dashed var(--ds-4); cursor: pointer; }
.check-row:first-of-type { border-top: 0; }

/* ---------- accounts page ---------- */
.friend-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 14px; background: var(--ds-1); box-shadow: var(--bevel-in); }
.friend-row + .friend-row { margin-top: 8px; }
.friend-row .fn { font: 600 17px var(--pixel); }
.srv-checks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.srv-checks label { display: inline-flex; align-items: center; gap: 7px; }
.pw-box { padding: 14px; border: 2px dashed var(--gold); background: var(--lamp-soft); margin-top: 14px; }
.pw-box code { font: 700 15px var(--mono); color: var(--lamp-hi); }
.link-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

/* ---------- modpacks / options / backups ---------- */
.pack-picker { display: flex; flex-direction: column; gap: 10px; }
.pack-results { display: flex; flex-direction: column; gap: 6px; max-height: 290px; overflow: auto; }
.pack { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 9px 11px; background: #15171c; border: 2px solid #000; box-shadow: var(--bevel); cursor: pointer; text-align: left; color: inherit; font: inherit; width: 100%; }
.pack:hover { background: #1c1f25; }
.pack.on { outline: 3px solid #e9e9e9; outline-offset: -1px; }
.pack img, .pack .noimg { width: 44px; height: 44px; object-fit: cover; background: var(--ds-3); }
.pack .t { font: 600 16px var(--pixel); }
.pack .d { color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pack .v { font: 600 12px var(--mono); color: var(--text-2); background: var(--ds-3); padding: 3px 8px; white-space: nowrap; }
.pack > div { min-width: 0; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 2px dashed var(--ds-4); }
.opt.wide { grid-column: 1 / -1; }
.opt .ol b { font: 600 15px var(--pixel); display: block; }
.opt .ol small { color: var(--muted); font-size: 12.5px; display: block; line-height: 1.4; margin-top: 2px; }
.opt > input:not([type=checkbox]), .opt > select { width: 200px; flex: none; }
.opt.wide > input { width: min(420px, 55%); }
.save-bar { position: sticky; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 16px; background: var(--ds-3); border: 2px solid #000; box-shadow: var(--bevel), 0 14px 40px rgba(0,0,0,.45); }
.bk { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 11px 14px; background: var(--ds-1); box-shadow: var(--bevel-in); }
.bk + .bk { margin-top: 6px; }
.bk .n { font: 600 15px var(--pixel); }
.bk .m { color: var(--muted); font-size: 12.5px; }
.kind { font: 600 12px var(--pixel); padding: 2px 8px; margin-left: 8px; background: var(--ds-3); color: var(--text-2); }
.kind.auto { background: var(--diamond-soft); color: var(--diamond); }
.kind.safety { background: var(--copper-soft); color: var(--copper); }

/* ---------- empty state + title screen (sign in) ---------- */
.empty { display: grid; place-items: center; min-height: 78vh; }
.empty-inner { max-width: 580px; position: relative; }
.empty h1 { font-size: 38px; line-height: 1.15; margin: 22px 0 14px; text-shadow: 4px 4px 0 #000; }
.empty p { color: var(--text-2); font-size: 17px; margin: 0 0 28px; max-width: 46ch; }
.empty img { image-rendering: pixelated; }
.empty-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 40px; }
.empty-steps div { background: var(--ds-2); box-shadow: var(--bevel); border: 2px solid #000; padding: 12px; color: var(--text-2); font-size: 14px; }
.empty-steps b { display: block; color: var(--text); font: 600 16px var(--pixel); margin-bottom: 4px; }
.splash {
  position: absolute; color: var(--gold); font: 700 18px var(--pixel); text-shadow: 2px 2px 0 #3f3000; white-space: nowrap;
  transform: rotate(-16deg); animation: splash .55s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes splash { from { scale: 1; } to { scale: 1.08; } }
body.auth-mode { display: block; }
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: linear-gradient(180deg, rgba(23,25,31,.2), rgba(23,25,31,.92) 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='60' shape-rendering='crispEdges'%3E%3Crect width='160' height='60' fill='%23243a52'/%3E%3Cpath d='M0 40h20v-8h20v-6h20v10h20v-14h20v8h20v-4h20v8h20v26H0z' fill='%2337781f'/%3E%3Cpath d='M0 44h20v-8h20v-6h20v10h20v-14h20v8h20v-4h20v8h20v22H0z' fill='%234c9b30'/%3E%3Cpath d='M0 48h160v12H0z' fill='%23593d29'/%3E%3C/svg%3E") bottom / 640px auto repeat-x, #243a52;
  image-rendering: pixelated;
}
.auth-card { position: relative; width: min(420px, 100%); text-align: center; background: var(--ds-2); border: 2px solid #000; box-shadow: var(--bevel), 8px 8px 0 rgba(0,0,0,.45); padding: 30px 26px 26px; }
.auth-card h1 { margin: 10px 0 6px; font-size: 38px; text-shadow: 3px 3px 0 #000; }
.auth-card > p { margin: 0 0 18px; }
.auth-card form { text-align: left; margin-top: 16px; }
.auth-card .splash { right: -14px; top: 64px; }
.auth-seg { width: 100%; }
.auth-seg label { flex: 1; text-align: center; }

/* ---------- Minecraft details: scrollbars, selection, item tooltips ---------- */
* { scrollbar-color: #5a606e #111317; }
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: #111317; box-shadow: inset 2px 2px 0 #000; }
::-webkit-scrollbar-thumb { background: #5a606e; border: 2px solid #000; box-shadow: inset 2px 2px 0 #7a8090, inset -2px -2px 0 #2c3038; }
::-webkit-scrollbar-thumb:hover { background: #6b7282; }
::-webkit-scrollbar-corner { background: #111317; }
::selection { background: #3f5fff; color: #fff; text-shadow: none; }
.mc-tip {
  position: fixed; z-index: 200; pointer-events: none; max-width: 300px;
  padding: 6px 9px; background: rgba(16, 0, 16, .94); color: #fff; font: 400 13.5px/1.5 var(--body);
  border: 2px solid #100010; box-shadow: inset 0 0 0 2px #2d0a63, inset 0 0 0 3px #1a0533; /* the purple item-tooltip border */
  text-shadow: 2px 2px 0 #3f3f3f;
}

/* ---------- Minecraft form controls ---------- */
input[type=checkbox] {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; flex: none; margin: 0; cursor: pointer;
  background: #0f1114; border: 2px solid #000; box-shadow: inset 0 0 0 2px #8b8b8b; image-rendering: pixelated;
}
input[type=checkbox]:checked {
  background: #0f1114 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cpath fill='%23ffffff' d='M6 1h1v2H6zM5 3h1v1H5zM4 4h1v1H4zM1 4h1v1H1zM2 5h1v1H2zM3 5h1v2H3z'/%3E%3C/svg%3E") center / 14px no-repeat;
}
input[type=checkbox]:hover { box-shadow: inset 0 0 0 2px #c6c6c6; }
.switch input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; min-height: 0; padding: 0; border: 0; box-shadow: none; }
input[type=checkbox]:disabled { opacity: .45; cursor: not-allowed; }
input[type=checkbox]:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }

input[type=range] { -webkit-appearance: none; appearance: none; height: 28px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 20px; background: #1a1d22; border: 2px solid #000; box-shadow: inset 2px 2px 0 #0b0c0f, inset -2px -2px 0 #2d313a; }
input[type=range]::-moz-range-track { height: 16px; background: #1a1d22; border: 2px solid #000; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 28px; margin-top: -6px;
  background: #8b8b8b; border: 2px solid #000; box-shadow: inset 2px 2px 0 #c6c6c6, inset -2px -2px 0 #555;
}
input[type=range]::-moz-range-thumb { width: 10px; height: 24px; border-radius: 0; background: #8b8b8b; border: 2px solid #000; box-shadow: inset 2px 2px 0 #c6c6c6, inset -2px -2px 0 #555; }
input[type=range]:hover::-webkit-slider-thumb { background: #a5a5a5; }
input[type=range]:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

select {
  -webkit-appearance: none; appearance: none; padding-right: 38px; cursor: pointer;
  background: #0f1114 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 4' shape-rendering='crispEdges'%3E%3Cpath fill='%23e8e8e8' d='M0 0h7v1H0zM1 1h5v1H1zM2 2h3v1H2zM3 3h1v1H3z'/%3E%3C/svg%3E") right 12px center / 14px 8px no-repeat;
}
select option { background: #1d2027; color: var(--text); }

input[type=file] { color: var(--muted); min-height: 0; padding: 4px; }
input[type=file]::file-selector-button {
  margin-right: 10px; padding: 6px 12px 8px; border: 2px solid #000; background: #4a4f5c; color: var(--text); cursor: pointer;
  font: 600 13px var(--pixel); box-shadow: inset 0 -3px 0 #23262d, inset 2px 2px 0 #5a606e; text-shadow: 1px 1px 0 #000;
}
input[type=file]::file-selector-button:hover { filter: brightness(1.12); }

/* ---------- advancement toasts ---------- */
.toasts { position: fixed; right: 18px; top: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast {
  display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; max-width: 380px;
  background: #212121; border: 2px solid #000; box-shadow: inset 2px 2px 0 #555, inset -2px -2px 0 #111, 0 10px 30px rgba(0,0,0,.45);
  padding: 10px 14px 10px 10px; font-size: 14px; animation: tin .3s var(--ease);
}
.toast::before {
  content: ""; width: 32px; height: 32px; image-rendering: pixelated;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='2' y='2' width='12' height='12' fill='%2363b843'/%3E%3Crect x='2' y='2' width='12' height='4' fill='%237acc56'/%3E%3Crect x='2' y='8' width='12' height='6' fill='%23593d29'/%3E%3Crect x='4' y='10' width='2' height='2' fill='%23704c33'/%3E%3Crect x='10' y='11' width='2' height='2' fill='%23704c33'/%3E%3C/svg%3E") center / 32px;
}
.toast.err::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='3' y='3' width='10' height='10' fill='%23b52a2e'/%3E%3Crect x='4' y='4' width='3' height='3' fill='%23e5484d'/%3E%3Crect x='7' y='7' width='2' height='2' fill='%23ffd166'/%3E%3C/svg%3E"); }
.toast b { display: block; color: var(--gold); font: 600 14px var(--pixel); }
.toast.err b { color: #ff8a8e; }
@keyframes tin { from { transform: translateX(110%); } }

.hotbar-name { display: none; }

/* =========================================================================================
   REAL MINECRAFT ASSETS (body.real): textures, GUI widgets and font from the host's game install.
   Pixel art is drawn at 2× (Minecraft's "GUI scale 2"), text at multiples of 8px so it stays crisp.
   ========================================================================================= */
body.real {
  --mc-text: #ffffff; --mc-shadow: #3f3f3f; --mc-gray: #a0a0a0; --mc-yellow: #ffff55; --mc-green: #55ff55; --mc-red: #ff5555; --mc-aqua: #55ffff; --mc-gold: #ffaa00;
  font-size: 16px; line-height: 1.5; text-shadow: 2px 2px 0 var(--mc-shadow);
  -webkit-font-smoothing: none; font-smooth: never;
  background: linear-gradient(rgba(10, 10, 14, .62), rgba(10, 10, 14, .62)), var(--bg-tex) 0 0 / 64px 64px;
  image-rendering: pixelated;
}
body.real .muted, body.real .small, body.real .si-sub, body.real .brand-sub, body.real .mod .a, body.real .inst .m, body.real .bk .m, body.real .addr-row .desc, body.real .opt .ol small,
body.real .ram-hint, body.real .type-card small, body.real .pack .d, body.real .prow .pr, body.real .known .pr, body.real .live .k, body.real .pager-info, body.real .side-foot .muted { font-size: 16px; color: var(--mc-gray); }
body.real h1, body.real .head h1, body.real .empty h1, body.real .auth-card h1 { font-size: 32px; font-weight: 700; text-shadow: 4px 4px 0 var(--mc-shadow); letter-spacing: 0; }
body.real h2, body.real .dlg-head h2 { font-size: 24px; text-shadow: 2px 2px 0 var(--mc-shadow); }
body.real h3, body.real h4, body.real .card h3, body.real .card h4 { font-size: 24px; font-weight: 400; text-shadow: 2px 2px 0 var(--mc-shadow); }
body.real .brand-name { font-size: 24px; text-shadow: 2px 2px 0 var(--mc-shadow); }
body.real .field > span, body.real .opt .ol b, body.real .addr-row .lbl, body.real .server-item .si-name, body.real .mod .t, body.real .pack .t, body.real .type-card b,
body.real .friend-row .fn, body.real .member-top b, body.real .save .n, body.real .bk .n, body.real .prow .pn, body.real .known .pn, body.real .chip, body.real .tag, body.real .kind,
body.real .seg span, body.real .vp-sel, body.real .hero-status, body.real .more-ways > summary, body.real .side-label, body.real .inst .n, body.real .mod .d, body.real .steps { font-size: 16px; font-weight: 400; }
body.real .hero-status { color: var(--mc-gray); }
body.real .hero-status.lit, body.real .server-item.active .si-name { color: var(--mc-yellow); }
body.real .live .v { font-size: 32px; text-shadow: 2px 2px 0 var(--mc-shadow); }
body.real .console, body.real .cmd-row input, body.real textarea { font-size: 16px; line-height: 1.5; }
body.real .console { background: rgba(0, 0, 0, .78); }
body.real .console .bh { color: var(--mc-green); } body.real .console .warn { color: var(--mc-yellow); } body.real .console .error { color: var(--mc-red); } body.real .console .cmd { color: var(--mc-aqua); }
body.real a { color: var(--mc-aqua); }

/* panels: the in-game menu background */
body.real .sidebar { background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)), url("/mc/menu_background.png") 0 0 / 32px 32px; box-shadow: none; border-right: 4px solid #000; }
body.real .card, body.real .hero, body.real .dlg, body.real .auth-card, body.real .empty-steps div, body.real .save-bar {
  background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.35)), url("/mc/menu_list_background.png") 0 0 / 32px 32px;
  border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255,255,255,.08), 6px 6px 0 rgba(0,0,0,.35);
}
body.real .dlg-head { background: url("/mc/menu_background.png") 0 0 / 32px 32px; border-bottom: 0; }
body.real .dlg-head::after { content: ""; position: absolute; left: 0; right: 0; height: 4px; margin-top: 30px; }
body.real .dlg-foot { background: url("/mc/menu_background.png") 0 0 / 32px 32px; border-top: 4px solid transparent; border-image: url("/mc/footer_separator.png") 0 0 2 0 / 0 0 4px 0 repeat; border-image-slice: 2 0 0 0; }
body.real .addr-row, body.real .inst, body.real .save, body.real .prow, body.real .known, body.real .bk, body.real .friend-row, body.real .member, body.real .mod, body.real .pack, body.real .advanced, body.real .type-card span, body.real .vp {
  background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 2px rgba(255,255,255,.06); border: 2px solid #000;
}
body.real .mod:hover, body.real .pack:hover { background: rgba(255, 255, 255, .06); }
body.mc .hero::before { /* real grass block growing over the top edge */
  height: 14px; top: -2px; background: url("/mc/grass_side.png") 0 0 / 32px 32px repeat-x;
}
body.real .head { border-bottom: 4px solid transparent; padding-bottom: 14px; border-image: url("/mc/header_separator.png") 0 0 2 0 / 0 0 4px 0 repeat; border-image-slice: 0 0 2 0; }

/* the real redstone lamp */
body.mc .power .lamp-img { display: block; width: 128px; height: 128px; background: url("/mc/redstone_lamp_cube.png") center / 128px 128px no-repeat; filter: drop-shadow(4px 6px 0 rgba(0,0,0,.45)); transition: transform .12s var(--ease); }
body.mc .power.lit .lamp-img { background-image: url("/mc/redstone_lamp_on_cube.png"); filter: drop-shadow(0 0 26px var(--lamp-glow)) drop-shadow(4px 6px 0 rgba(0,0,0,.4)); }
body.mc .power:hover:not(:disabled) .lamp-img { transform: translateY(-3px); }
body.mc .power:active:not(:disabled) .lamp-img { transform: translateY(2px); }
body.mc .power.busy .lamp-img { animation: lampflick 1.2s steps(2) infinite; }
body.real .power { font-size: 16px; font-weight: 400; color: var(--mc-text); text-shadow: 2px 2px 0 var(--mc-shadow); }
body.real .power.lit { color: var(--mc-yellow); }

/* real Minecraft buttons (nine-slice of widget/button.png at 2×). Same box, padding and font size as Blend/Classic,
   so every style lays out identically: only the skin changes. */
body.real .btn, body.real .pg, body.real .vp-item, body.real .ram-presets button, body.real input[type=file]::file-selector-button {
  border-color: transparent; border-image: url("/mc/button.png") 3 fill / 6px stretch; background: none; box-shadow: none; filter: none;
  color: var(--mc-text); text-shadow: 2px 2px 0 var(--mc-shadow); padding-bottom: 2px;
}
body.real .btn-sm, body.real .btn-lg { box-shadow: none; }
body.real .btn:hover:not(:disabled), body.real .pg:hover:not(:disabled), body.real .vp-item:hover, body.real .ram-presets button:hover, body.real input[type=file]::file-selector-button:hover {
  border-image-source: url("/mc/button_highlighted.png"); filter: none; color: var(--mc-yellow);
}
body.real .btn:active:not(:disabled) { transform: translateY(1px); padding-bottom: 2px; box-shadow: none; }
body.real .btn:disabled, body.real .pg:disabled { border-image-source: url("/mc/button_disabled.png"); color: var(--mc-gray); opacity: 1; filter: none; }
body.real .btn-primary { color: var(--mc-green); }
body.real .btn-danger { color: var(--mc-red); }
body.real .btn-ghost { border-image: none; border-color: transparent; }
body.real .btn-ghost:hover:not(:disabled) { border-image: none; background: rgba(255,255,255,.08); }
body.real .pg.on, body.real .vp-item.on { color: var(--mc-yellow); border-image-source: url("/mc/button_highlighted.png"); background: none; box-shadow: none; }
body.real .icon-btn:hover { box-shadow: none; background: rgba(255,255,255,.1); }

/* text fields: widget/text_field.png */
body.real input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), body.real select, body.real textarea {
  border: 2px solid transparent; border-image: url("/mc/text_field.png") 1 fill / 2px stretch; background-color: transparent; box-shadow: none;
  color: var(--mc-text); font-size: 16px; text-shadow: 2px 2px 0 var(--mc-shadow);
}
body.real input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):focus, body.real select:focus, body.real textarea:focus { border-image-source: url("/mc/text_field_highlighted.png"); box-shadow: none; }
body.real select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 4' shape-rendering='crispEdges'%3E%3Cpath fill='%23e8e8e8' d='M0 0h7v1H0zM1 1h5v1H1zM2 2h3v1H2zM3 3h1v1H3z'/%3E%3C/svg%3E") right 12px center / 14px 8px no-repeat; }
body.real input::placeholder, body.real textarea::placeholder { color: #707070; text-shadow: none; }
body.real .cmd-row::before { color: var(--mc-text); }

/* checkbox + slider: widget textures */
body.real input[type=checkbox] { width: 20px; height: 20px; border: 0; box-shadow: none; background: url("/mc/checkbox.png") 0 0 / 20px 20px; }
body.real input[type=checkbox]:hover { background-image: url("/mc/checkbox_highlighted.png"); box-shadow: none; }
body.real input[type=checkbox]:checked { background: url("/mc/checkbox_selected.png") 0 0 / 20px 20px; }
body.real input[type=checkbox]:checked:hover { background-image: url("/mc/checkbox_selected_highlighted.png"); }
body.real .switch input[type=checkbox] { background: none; }
body.real input[type=range]::-webkit-slider-runnable-track { height: 20px; border: 0; box-shadow: none; background: url("/mc/slider.png") 0 0 / 100% 20px; }
body.real input[type=range]::-webkit-slider-thumb { width: 8px; height: 20px; margin-top: 0; border: 0; box-shadow: none; background: url("/mc/slider_handle.png") 0 0 / 8px 20px; }
body.real input[type=range]:hover::-webkit-slider-thumb { background-image: url("/mc/slider_handle_highlighted.png"); }
body.real input[type=range]::-moz-range-track { height: 20px; border: 0; background: url("/mc/slider.png") 0 0 / 100% 20px; }
body.real input[type=range]::-moz-range-thumb { width: 8px; height: 20px; border: 0; box-shadow: none; background: url("/mc/slider_handle.png") 0 0 / 8px 20px; }

/* tabs: the same labelled tab bar as Blend/Classic, skinned with real button textures */
body.real .tabs { background: rgba(0, 0, 0, .55); box-shadow: inset 0 0 0 2px rgba(255,255,255,.06); }
body.real .tab { border: 2px solid transparent; border-image: url("/mc/button.png") 3 fill / 6px stretch; padding: 0 12px; /* border-box: same size as Blend */ background: none; box-shadow: none; color: var(--mc-text); text-shadow: 2px 2px 0 var(--mc-shadow); }
body.real .tab:hover { border-image-source: url("/mc/button_highlighted.png"); background: none; color: var(--mc-yellow); }
body.real .tab.active { border-image-source: url("/mc/button_highlighted.png"); background: none; color: var(--mc-yellow); outline: 2px solid #fff; outline-offset: 0; }
body.real .tab img.mci { width: 22px; height: 22px; }
body.real .tab img.mci.cube { width: 26px; height: 26px; }

/* real item / block icons */
img.mci { width: 20px; height: 20px; image-rendering: pixelated; flex: none; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.45)); }
body.real .si-icon { background: rgba(0,0,0,.4); box-shadow: none; border: 2px solid #000; }
body.mc .si-icon img.mci { width: 26px; height: 26px; }
body.mc .btn img.mci { width: 20px; height: 20px; }
body.mc .hero-stats img.mci { width: 18px; height: 18px; }

/* advancement toasts (gui/sprites/toast/advancement.png) */
body.real .toast {
  width: 320px; min-height: 64px; padding: 10px 14px 10px 12px; gap: 14px; grid-template-columns: 32px 1fr;
  border: 8px solid transparent; border-image: url("/mc/toast_advancement.png") 4 fill / 8px stretch; background: none; box-shadow: none;
  font-size: 16px; color: var(--mc-text); text-shadow: 2px 2px 0 var(--mc-shadow);
}
body.mc .toast::before { width: 32px; height: 32px; background: url("/mc/grass_block_cube.png") center / 32px 32px no-repeat; image-rendering: auto; }
body.mc .toast.err::before { background-image: url("/mc/tnt_cube.png"); }
body.real .toast b { font-size: 16px; font-weight: 400; color: var(--mc-yellow); }
body.real .toast.err b { color: var(--mc-red); }

/* title screen: the real panorama */
body.mc .auth {
  background: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.55)), url("/mc/panorama.png") center / cover no-repeat;
  image-rendering: auto;
}
body.mc .auth::before { content: ""; position: fixed; inset: 0; backdrop-filter: blur(2px); pointer-events: none; }
body.mc .auth-card { z-index: 1; }
body.real .splash { color: var(--mc-yellow); text-shadow: 2px 2px 0 #3f3f00; font-size: 16px; font-weight: 400; }
body.real .empty .splash { font-size: 24px; }

/* misc */
body.real .dot.online { background: var(--mc-green); box-shadow: 0 0 6px rgba(85,255,85,.6); }
body.real .tag.ok, body.real .kind.auto { background: rgba(85,255,255,.12); color: var(--mc-aqua); }
body.real .tag.warn, body.real .kind.safety { background: rgba(255,170,0,.14); color: var(--mc-gold); }
body.real .notice { color: var(--mc-yellow); background: rgba(0,0,0,.5); border-color: var(--mc-gold); }
body.real .notice.err { color: var(--mc-red); border-color: var(--mc-red); }
body.real .meter span { background-color: var(--mc-green); }
body.mc .chip img { width: 24px; height: 24px; }

@media (max-width: 1080px) {
  .mods-layout, .settings-grid, .players-grid, .perf-grid, .world-grid, .opt-grid { grid-template-columns: 1fr; }
  .live { grid-template-columns: 1fr 1fr; }
  .type-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  body { grid-template-columns: minmax(0, 1fr); }
  .sidebar { min-width: 0; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 3px solid var(--bev-lo); }
  .server-list { max-height: 220px; }
  main { padding: 22px 16px 40px; }
  .hero { grid-template-columns: minmax(0, 1fr); justify-items: start; padding: 26px 18px 20px; }
  .hero-body { width: 100%; }
  .power .lamp { width: 104px; height: 104px; }
  .addr-big { flex-direction: column; }
  .addr-big code { font-size: 18px; border-right: 2px solid #0c0d10; border-bottom: 0; }
  .addr-big .btn { min-height: 46px; }
  .head h1 { font-size: 30px; }
  .head .actions { margin-left: 0; }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .empty h1 { font-size: 34px; }
  .empty-steps, .adv-grid, .perm-grid { grid-template-columns: 1fr; }
  .tabs { width: 100%; }
  .toasts { left: 12px; right: 12px; }
}
@media (max-width: 400px) {
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 3D inventory blocks rendered from the game's own textures: drawn large, scaled down smoothly */
img.mci.cube { image-rendering: auto; filter: drop-shadow(1px 2px 0 rgba(0,0,0,.4)); }
img.mci.muted { filter: grayscale(1) brightness(.6); }
img.mc-logo { image-rendering: auto; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.45)); }
body.mc .brand img.mc-logo { width: 38px; height: 38px; }
.block-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.block-row img { width: 40px; height: 40px; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.45)); transition: transform .15s var(--ease); }
.block-row img:hover { transform: translateY(-4px); }
@media (max-width: 400px) { .block-row img { width: 32px; height: 32px; } }
.side-foot { flex-wrap: wrap; }
.side-foot #sysInfo { flex: 1 0 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.mc .btn img.mci.cube { width: 22px; height: 22px; }

/* =========================================================================================
   BLEND (default): the classic cartoony panels and chunky buttons, with the real blocks
   ========================================================================================= */
body.mc:not(.real) .tab img.mci { width: 22px; height: 22px; }
body.mc:not(.real) .tab img.mci.cube { width: 26px; height: 26px; }
body.mc:not(.real) .tab.active img.mci { transform: translateY(-2px) scale(1.12); }
body.mc:not(.real) .tab img.mci { transition: transform .15s var(--ease); }
body.mc:not(.real) .tab:hover img.mci { transform: translateY(-2px); }
body.mc:not(.real) .si-icon img.mci.cube { width: 28px; height: 28px; }
body.mc:not(.real) .power .lamp-img { width: 120px; height: 120px; background-size: 120px 120px; }
body.mc:not(.real) .empty-steps div, body.mc:not(.real) .auth-card { background-color: var(--ds-2); }

/* =========================================================================================
   THEMES: colour palettes for Classic / Blend, background blocks for Realistic
   ========================================================================================= */
body[data-theme=overworld] {
  --ds-0: #15211a; --ds-1: #1a2a20; --ds-2: #213328; --ds-3: #2a3f31; --ds-4: #36503e; --bev-hi: #3f5c47; --bev-lo: #0c140f;
  --line: #2e4434; --muted: #9db3a2; --bg-tex: url("/mc/mossy_cobblestone.png");
}
body[data-theme=nether] {
  --ds-0: #1e1112; --ds-1: #261516; --ds-2: #311b1c; --ds-3: #3d2223; --ds-4: #4d2c2d; --bev-hi: #5a3535; --bev-lo: #120809;
  --line: #432728; --text: #f5e6df; --text-2: #d6bfb8; --muted: #b99a97;
  --grass: #148a7c; --grass-hi: #1fb3a1; --grass-lo: #0a4d45; --gold: #ffb347; --lamp: #ff9d3b; --lamp-hi: #ffc46b; --lamp-glow: rgba(255, 140, 50, .4);
  --bg-tex: url("/mc/netherrack.png");
}
body[data-theme=end] {
  --ds-0: #17131f; --ds-1: #1d1827; --ds-2: #261f33; --ds-3: #30273f; --ds-4: #3d3250; --bev-hi: #4a3d61; --bev-lo: #0d0a13;
  --line: #352b45; --muted: #a99bbd; --grass: #9a5fb0; --grass-hi: #b77fcc; --grass-lo: #5a3268; --gold: #e9f0a5; --select: #e9f0a5;
  --bg-tex: url("/mc/purpur_block.png");
}
body[data-theme=ocean] {
  --ds-0: #0f1b20; --ds-1: #132329; --ds-2: #182c33; --ds-3: #1f3840; --ds-4: #29474f; --bev-hi: #33565f; --bev-lo: #081013;
  --line: #24404a; --muted: #93b2b6; --grass: #2f8f83; --grass-hi: #4fb3a5; --grass-lo: #18554d; --diamond: #8ff0e4;
  --bg-tex: url("/mc/dark_prismarine.png");
}
body[data-theme=cherry] {
  --ds-0: #22151b; --ds-1: #2a1a22; --ds-2: #34212b; --ds-3: #3f2934; --ds-4: #4e3341; --bev-hi: #5c3d4d; --bev-lo: #140b10;
  --line: #45303b; --text: #fbeef2; --text-2: #e0c8d0; --muted: #c0a3af; --grass: #c25d8a; --grass-hi: #e483ae; --grass-lo: #7a3352; --select: #ffc2dc;
  --bg-tex: url("/mc/cherry_planks.png");
}
body[data-theme=snow] { --bg-tex: url("/mc/snow.png"); }
body[data-theme=snow]:not(.real) { /* light mode (Realistic keeps the game's dark menus) */
  color-scheme: light;
  --ds-0: #dfe7ee; --ds-1: #cfd9e2; --ds-2: #eef3f7; --ds-3: #f8fbfd; --ds-4: #b7c4cf; --bev-hi: #ffffff; --bev-lo: #9aaab8;
  --line: #c3cfd9; --text: #1d2530; --text-2: #3a4553; --muted: #5d6b7a; --gold: #b07d00; --lamp-hi: #9a6400; --diamond: #0f8a7e;
  --select: #1d2530; --slot: #b9c6d1; --tab: #e4ebf1; --console: #1b2027; --field: #ffffff; --field-line: #9aaab8;
  text-shadow: none;
}
body[data-theme=snow]:not(.real) :is(h1, h2, h3, .head h1, .empty h1, .brand-name, .power) { text-shadow: 2px 2px 0 rgba(0, 0, 0, .14); }
body[data-theme=snow]:not(.real) .btn { text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); color: #fff; }
body[data-theme=snow]:not(.real) .btn-ghost, body[data-theme=snow]:not(.real) .icon-btn { color: var(--text); text-shadow: none; }
body[data-theme=snow]:not(.real) .console { color: #dfe4ea; }
body[data-theme=snow]:not(.real) .toast { background: #f8fbfd; box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #9aaab8, 0 10px 30px rgba(0,0,0,.2); }
body[data-theme=snow]:not(.real) .notice { color: #8a4a1c; }

/* appearance picker */
.ap-sec { margin-bottom: 18px; }
.ap-sec > b { display: block; font: 600 16px var(--pixel); margin-bottom: 8px; }
.ap-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ap-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.ap-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px 10px; background: var(--ds-1); border: 2px solid #000; box-shadow: var(--bevel); color: var(--text); cursor: pointer; font: 600 14px var(--pixel); text-align: center; }
.ap-opt small { color: var(--muted); font: 400 12.5px/1.35 var(--body); }
.ap-opt:hover { background: var(--ds-3); }
.ap-opt[aria-pressed=true] { outline: 3px solid var(--select); outline-offset: -1px; background: var(--ds-3); }
.ap-opt img { width: 44px; height: 44px; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.4)); }
.ap-opt .sw { width: 44px; height: 44px; border: 2px solid #000; box-shadow: inset 0 -10px 0 var(--sw2); background: var(--sw1); }
.ap-opt .st { width: 100%; height: 46px; display: grid; place-items: center; }
body.real .ap-opt { background: rgba(0,0,0,.45); box-shadow: inset 0 0 0 2px rgba(255,255,255,.06); }
body.real .ap-sec > b, body.real .ap-opt { font-size: 16px; font-weight: 400; }
@media (max-width: 520px) { .ap-styles { grid-template-columns: 1fr; } }
#acFunnel { display: block; }
#acFunnel > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#acFunnel .desc, #acFunnel .steps { margin: 8px 0 0; }
#acFunnel .row { margin-top: 10px; flex-wrap: wrap; }
